예제 #1
0
    public override void NextTurn(int turn)
    {
        MELEE_MOVE_TYPE type = DecideMove(turn);

        ExecuteMove(type, turn);
        VisualTurn(type, turn);
    }
예제 #2
0
    public void ExecuteMove(MELEE_MOVE_TYPE type, int turn)
    {
        switch (type)
        {
        case MELEE_MOVE_TYPE.MOVE:
            cell.occupant = 0;
            cell.enemy    = null;
            cell          = targetCell;
            cell.occupant = 1;
            cell.enemy    = this;
            break;

        case MELEE_MOVE_TYPE.ATTACK:
            barbarian.Damage(5);
            break;

        case MELEE_MOVE_TYPE.NOTHING:
            // Reset debuff to none
            if (status == CURRENT_STATUS.STUNNED)
            {
                status = CURRENT_STATUS.NONE;
            }
            break;
        }
    }
예제 #3
0
    public void VisualTurn(MELEE_MOVE_TYPE type, int turn)
    {
        switch (type)
        {
        case MELEE_MOVE_TYPE.MOVE:
            anim.PlayAnimation("Slime_Move");
            StartCoroutine(Move(targetCell.position, 0.2f));
            StartCoroutine(Rotate(Helper.QDIR(targetCell.position - transform.position), 0.1f));
            break;

        case MELEE_MOVE_TYPE.ATTACK:
            anim.PlayAnimation("Slime_Attack");
            StartCoroutine(Rotate(Helper.QDIR(targetCell.position - transform.position), 0.1f));
            break;

        case MELEE_MOVE_TYPE.NOTHING:

            break;
        }
    }