예제 #1
0
 private void AddTurn()
 {
     if (turns.Count == 0 || turns[turns.Count - 1].finished)
     {
         Player.Turn turn = new Player.Turn();
         print(Unit.current);
         turn.playerIndex = Unit.current.playerIndex;
         turn.finished    = false;
         turn.actions     = new List <System.Action>();
         Player.turns.Add(turn);
     }
 }
예제 #2
0
 public void NextTurnLoop(Player.Turn turn)
 {
     if (turn.actions.Count > 0)
     {
         if (!inputsFrozen)
         {
             System.Action nextAction = turn.actions[0];
             nextAction();
             turn.actions.Remove(nextAction);
         }
     }
     else
     {
         Player.turns.RemoveAt(0);
         playingTurn   = false;
         readyToReplay = false;
     }
 }