void OnEndTurnButton() { if (GameControlTB.IsActionInProgress()) { return; } if (GameControlTB.GetTurnMode() != _TurnMode.SingleUnitPerTurn) { if (GameControlTB.GetMoveOrder() == _MoveOrder.Free) { if (UnitControl.selectedUnit != null) { UnitControl.selectedUnit.moved = true; UnitControl.selectedUnit.attacked = true; UnitControl.MoveUnit(UnitControl.selectedUnit); } } } GameControlTB.OnEndTurn(); }
void NoActionForUnit(UnitTB unit) { UnitControl.MoveUnit(unit); unit.CompleteAllAction(); unitInAction = false; }