public void Tick() { switch (_state) { case State.Spawn: _logic.OnSpawn(); _state = State.Turn; break; case State.Move: _battle.AskMoveUnitTo(this, _destX, _destY); _state = State.Turn; break; case State.Turn: if (Mana != 0 && Mana == MaxMana && _logic.OnAbility()) { SubMana(MaxMana); break; } _logic.OnTurn(); break; case State.Stun: _logic.OnStun(); _stunTurnsLeft--; if (_stunTurnsLeft <= 0) { RemoveStun(); } break; } }
public void Stun() { _logic.OnStun(); }