void OnExitComplete(GameScene gameScene, GameSceneParam param) { state = State.EnterGameScene; GameEvent.SceneEvent.FireOnExitSceneComplete(m_CurGameScene.type); GameEvent.SceneEvent.FireOnBeginEnterScene(m_NextGameScene.type); m_NextGameScene.EnterScene(param); }
void OnDestroyLevelComplete(LevelInstance level, ExitLevelType type) { GameEvent.LevelEvent.onExitLevel.RemoveListener(OnExitLevel); GameEvent.LevelEvent.onDestroyLevelComplete.RemoveListener(OnDestroyLevelComplete); ExitComplete(m_Param); m_Param = null; }
protected override void OnEnterScene(GameSceneParam param) { LevelManager.instance.BuildLevel(-1, GameManager.instance.seed); GameEvent.LevelEvent.onBuildLevelComplete.AddListener(OnBuildLevelComplete); GameEvent.RoomEvent.onEnterRoom.AddListener(OnEnterRoom); GameEvent.RoomEvent.onBeforeEnterRoom.AddListener(OnBeforeEnterRoom); }
protected override void OnExitScene(GameSceneParam param) { GameEvent.LevelEvent.onExitLevel.AddListener(OnExitLevel); GameEvent.LevelEvent.onDestroyLevelComplete.AddListener(OnDestroyLevelComplete); m_Param = param; LevelManager.instance.ExitLevel(m_Param.exitLevelType); }
public void ExitScene(GameSceneParam param) { OnExitScene(param); //关闭共同的窗口 UIManager.instance.CloseUI <UICombatMenuWnd>(); UIManager.instance.CloseUI <UICombatMainWnd>(); UIManager.instance.CloseUI <UIHeadWnd>(); }
void OnEnterComplete(GameScene gameScene, GameSceneParam param) { m_OldGameScene = m_CurGameScene; m_CurGameScene = m_NextGameScene; m_NextGameScene = null; GameEvent.SceneEvent.FireOnEnterSceneComplete(gameScene.type); state = State.Done; }
void EnterGameScene(GameScene nextScene, GameSceneParam param) { if (state == State.Done) { state = State.ExitGameScene; m_NextGameScene = nextScene; GameEvent.SceneEvent.FireOnBeginExitScene(m_CurGameScene.type); m_CurGameScene.ExitScene(param); } }
protected abstract void OnEnterScene(GameSceneParam param);
protected override void OnEnterScene(GameSceneParam param) { UIManager.instance.OpenUI <UITitleWnd>(false); EnterComplete(null); }
protected override void OnExitScene(GameSceneParam param) { UIManager.instance.CloseUI <UITitleWnd>(); ExitComplete(null); }
protected override void OnEnterScene(GameSceneParam param) { EnterComplete(null); }
protected override void OnExitScene(GameSceneParam param) { ExitComplete(null); }
public void EnterScene(GameSceneParam param) { OnEnterScene(param); }
protected void ExitComplete(GameSceneParam param) { onExitComplete.Invoke(this, param); }
protected override void OnExitScene(GameSceneParam param) { m_Param = param; GameEvent.LevelEvent.onDestroyLevelComplete.AddListener(OnDestroyLevelComplete); }
protected override void OnEnterScene(GameSceneParam param) { m_Param = param; LevelManager.instance.BuildLevel(-1, GameManager.instance.seed); GameEvent.LevelEvent.onBuildLevelComplete.AddListener(OnEnterLevel); }
public void EnterGameScene(GameSceneType nextScene, GameSceneParam param = null) { EnterGameScene(GetGameScene(nextScene), param); }
protected abstract void OnExitScene(GameSceneParam param);
void OnEnterLevel(LevelInstance level) { GameEvent.LevelEvent.onBuildLevelComplete.RemoveListener(OnEnterLevel); EnterComplete(m_Param); m_Param = null; }