Ejemplo n.º 1
0
 public override void resolveTurn()
 {
     if (isSyncDone)
     {
         CoroutineMaster.startCoroutine(doResolveTurn());
     }
 }
Ejemplo n.º 2
0
 public virtual void prepareNewTurn(long startTurnTimestamp)
 {
     currentTurn++;
     currentTurnState = TURN_STATE_PREP;
     startTurnDate    = DateTime.FromFileTimeUtc(startTurnTimestamp);
     endTurnDate      = startTurnDate.AddSeconds(TURN_DURATION_SECONDS);
     CoroutineMaster.startCoroutine(waitForTurnStart());
 }
Ejemplo n.º 3
0
 public override void endTurn()
 {
     if (isActing)
     {
         synchronizeActions();
         CoroutineMaster.startCoroutine(waitForServerData());
     }
 }
Ejemplo n.º 4
0
 private void ExecuteClick(JoyButtonState state, int i)
 {
     switch (state)
     {
     case JoyButtonState.Pressed:
         SimulatorMethods.KeyDown(keyCode[i]);
         CoroutineMaster.ExecuteAfterNFrames(
             1, delegate { SimulatorMethods.KeyUp(keyCode[i]); }
             );
         break;
     }
 }
Ejemplo n.º 5
0
 public override void endTurn()
 {
     if (isActing)
     {
         // wait for player ready
         currentTurnState       = TURN_STATE_SYNC_WAIT;
         preparingPlayersNumber = players.Count;
         foreach (Player p in players.Values)
         {
             p.isReady = false;
         }
         CoroutineMaster.startCoroutine(waitForClientsSendData());
     }
 }
Ejemplo n.º 6
0
 private void Awake()
 {
     instance   = this;
     endOfFrame = new WaitForEndOfFrame();
 }
Ejemplo n.º 7
0
 public virtual void startTurn()
 {
     currentTurnState = TURN_STATE_ACT;
     CoroutineMaster.startCoroutine(waitForTurnEnd());
 }