public override void Enter(params object[] objs) { if (null != m_asyncOpera) { if (null != m_cb) { m_cb(LoadResult.Break, m_sceneName); } } this.Reset(); m_sceneName = objs[0] as string; m_cb = objs[1] as System.Action <LoadResult, string>; m_asyncOpera = SceneManager.LoadSceneAsync(m_sceneName); m_mono = App.my.uiRoot.GetComponentInChildren <UILoadingScene>(); if (null == m_mono) { Object prefab = Resources.Load("Art/UI/Prefabs/UILoadingScene"); GameObject go = GameObject.Instantiate(prefab) as GameObject; go.SetActive(true); m_mono = go.GetComponent <UILoadingScene>(); m_mono.transform.SetParent(App.my.uiRoot); m_mono.transform.localPosition = Vector3.zero; m_mono.transform.localScale = Vector3.one; } m_mono.loadingTxt.text = "Loading"; }
public void ExitFightScene() { GameCore.Instance.UIManager.DestoryAllUI(); DestoryFightLogic(); UILoadingScene.ShowAsyn(GameDefine.GAMELOGIC_SCENE_NAME); //UIMainFun.ShowAsynInFight(); }
public override void Exit(params object[] objs) { if (null != m_mono) { GameObject.Destroy(m_mono.gameObject); } m_mono = null; }