Esempio n. 1
0
 public void AddClientGameState(string stateName, ClientStateBase state)
 {
     if (this.m_dicClientStates.ContainsKey(stateName))
     {
         return;
     }
     this.m_dicClientStates[stateName] = state;
 }
Esempio n. 2
0
 private void DoChangeToNewState()
 {
     this.m_sCurrentState   = this.m_sNextGameState;
     this.m_sNextGameState  = "Max";
     this.m_bResourceLoaded = false;
     this.m_bScenePrepared  = true;
     //说明是有切换场景的
     if (this.m_eCurrentLoadingStyle == ELoadingType.LoadingChangeScene)
     {
         this.m_bScenePrepared = false;
         CaomaoDriver.SceneLoadModule.RegisterScenePerparedCallback(this.SceneLoadFinished);
     }
     this.m_oCurrentClientState = this.m_dicClientStates[this.CurrentClientState];
     this.m_oCurrentClientState.OnEnter();
     CaomaoDriver.ResourceModule.SetAllLoadFinishedEventHandler(this.ResourceLoadFinished);
 }