Beispiel #1
0
 public override void StartTask()
 {
     base.StartTask();
     // MAP
     this.RegisterEvent("clientInitMap", this.OnClientReceiveMapObjects);
     // DICE
     this.RegisterEvent("clientReceiveDice", this.OnClientReceiveDice);
     // UPDATE CLIENT
     this.RegisterEvent("clientUpdated", this.OnClientUpdate);
     // WINNER
     this.RegisterEvent("clientWinningGame", this.OnClientWinningGame);
     // CLOSER
     this.RegisterEvent("clientClosingGame", this.OnClientClosingGame);
     // RESET RANDOM SEED.
     UnityEngine.Random.InitState((int)DateTime.Now.Ticks);
     this.m_IsLoadingTask = false;
     this.m_GameManager   = CGameManager.GetInstance();
     this.m_GameManager.OnEventLoadingCompleted -= this.OnLoadTaskCompleted;
     this.m_GameManager.OnEventLoadingCompleted += this.OnLoadTaskCompleted;
     this.m_GameManager.OnStartGame();
 }
Beispiel #2
0
 public FSMGameIdleState(IContext context) : base(context)
 {
     this.m_GameManager = context as CGameManager;
 }
Beispiel #3
0
 public FSMGameCompletedState(IContext context) : base(context)
 {
     this.m_GameManager = context as CGameManager;
 }