コード例 #1
0
        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;
            }
        }
コード例 #2
0
 public void Stun()
 {
     _logic.OnStun();
 }