Пример #1
0
 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);
 }
Пример #2
0
 void OnDestroyLevelComplete(LevelInstance level, ExitLevelType type)
 {
     GameEvent.LevelEvent.onExitLevel.RemoveListener(OnExitLevel);
     GameEvent.LevelEvent.onDestroyLevelComplete.RemoveListener(OnDestroyLevelComplete);
     ExitComplete(m_Param);
     m_Param = null;
 }
Пример #3
0
 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);
 }
Пример #4
0
    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);
    }
Пример #5
0
 public void ExitScene(GameSceneParam param)
 {
     OnExitScene(param);
     //关闭共同的窗口
     UIManager.instance.CloseUI <UICombatMenuWnd>();
     UIManager.instance.CloseUI <UICombatMainWnd>();
     UIManager.instance.CloseUI <UIHeadWnd>();
 }
Пример #6
0
 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;
 }
Пример #7
0
 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);
     }
 }
Пример #8
0
 protected abstract void OnEnterScene(GameSceneParam param);
Пример #9
0
 protected override void OnEnterScene(GameSceneParam param)
 {
     UIManager.instance.OpenUI <UITitleWnd>(false);
     EnterComplete(null);
 }
Пример #10
0
 protected override void OnExitScene(GameSceneParam param)
 {
     UIManager.instance.CloseUI <UITitleWnd>();
     ExitComplete(null);
 }
Пример #11
0
 protected override void OnEnterScene(GameSceneParam param)
 {
     EnterComplete(null);
 }
Пример #12
0
 protected override void OnExitScene(GameSceneParam param)
 {
     ExitComplete(null);
 }
Пример #13
0
 public void EnterScene(GameSceneParam param)
 {
     OnEnterScene(param);
 }
Пример #14
0
 protected void ExitComplete(GameSceneParam param)
 {
     onExitComplete.Invoke(this, param);
 }
Пример #15
0
 protected override void OnExitScene(GameSceneParam param)
 {
     m_Param = param;
     GameEvent.LevelEvent.onDestroyLevelComplete.AddListener(OnDestroyLevelComplete);
 }
Пример #16
0
 protected override void OnEnterScene(GameSceneParam param)
 {
     m_Param = param;
     LevelManager.instance.BuildLevel(-1, GameManager.instance.seed);
     GameEvent.LevelEvent.onBuildLevelComplete.AddListener(OnEnterLevel);
 }
Пример #17
0
 public void EnterGameScene(GameSceneType nextScene, GameSceneParam param = null)
 {
     EnterGameScene(GetGameScene(nextScene), param);
 }
Пример #18
0
 protected abstract void OnExitScene(GameSceneParam param);
Пример #19
0
 void OnEnterLevel(LevelInstance level)
 {
     GameEvent.LevelEvent.onBuildLevelComplete.RemoveListener(OnEnterLevel);
     EnterComplete(m_Param);
     m_Param = null;
 }