Esempio n. 1
0
 public void BeginTurn()
 {
     if (_IsDead)
     {
         _InMovePhase                     = false;
         _InAttackPhase                   = false;
         _AttacksLeftThisTurn             = 0;
         _MovesLeftThisTurn               = 0;
         _CurrentlyTakingTurn             = true;
         turnManager._CurrentlyActiveUnit = this;
         _FullTurnCounter                += 1000;
         turnManager.UpdateSidebarUi();
     }
     else
     {
         Debug.Log($"UnitCharacter starting turn for {this.tag}");
         _FullTurnCounter                += _TurnCostStart;
         _InMovePhase                     = false;
         _InAttackPhase                   = false;
         _AttacksLeftThisTurn             = _AvailableAttacksPerTurn;
         _MovesLeftThisTurn               = _AvailableMovesPerTurn;
         _CurrentlyTakingTurn             = true;
         turnManager._CurrentlyActiveUnit = this;
         unitMove.SetCurrentTile();
         _Ui.UpdateCurrentCharacter(this);
         turnManager.UpdateSidebarUi();
     }
 }