| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | 
							- using FairyGUI;
 
- using UnityEngine;
 
- using UI.Main;
 
- namespace GFGGame
 
- {
 
-     public class StoryFightSingleView : BaseView
 
-     {
 
-         private UI_StoryFightSingleUI _ui;
 
-         private GameObject _sceneObject;
 
-         private GameObject _scenePrefab;
 
-         public override void Dispose()
 
-         {
 
-             if (_scenePrefab != null)
 
-             {
 
-                 GameObject.Destroy(_scenePrefab);
 
-                 _scenePrefab = null;
 
-             }
 
-             base.Dispose();
 
-         }
 
-         protected override void Init()
 
-         {
 
-             base.Init();
 
-             _ui = UI_StoryFightSingleUI.Create();
 
-             viewCom = _ui.target;
 
-             isfullScreen = true;
 
-             _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFightSingle"));
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             if (_sceneObject == null)
 
-             {
 
-                 _sceneObject = GameObject.Instantiate(_scenePrefab);
 
-             }
 
-             SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
 
-             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
 
-             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
 
-             if (!string.IsNullOrEmpty(fightCfg.music))
 
-             {
 
-                 MusicManager.Instance.Play(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
 
-             }
 
-             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
 
-             Timers.inst.Add(0.9f, 1, (object param) =>
 
-             {
 
-                 this.Hide();
 
-                 ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_SCORE_VIEW);
 
-             });
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-             if (_sceneObject != null)
 
-             {
 
-                 GameObject.Destroy(_sceneObject);
 
-                 _sceneObject = null;
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |