Esempio n. 1
0
 public void Init()
 {
     _curStage      = null;
     _curStageType  = StageType.None;
     _dictAllStages = new Dictionary <StageType, BaseStage>();
     _dictAllStages.Add(StageType.Home, new HomeStage());
     _dictAllStages.Add(StageType.Login, new LoginStage());
 }
Esempio n. 2
0
 public void ChangeStage(StageType type)
 {
     if (_curStageType == type)
     {
         return;
     }
     if (!_dictAllStages.ContainsKey(type))
     {
         Logger.LogError("[GameStageMgr.ChangeStage() => stage type:" + type + " can't find, change stage failed!!!]");
         return;
     }
     if (_curStage != null)
     {
         _curStage.Exit();
     }
     _curStage = _dictAllStages[type];
     _curStage.Enter();
     _curStageType = type;
 }