Ejemplo n.º 1
0
    public void ProcessFirstAction(Dinosaur enemy)
    {
        switch (m_selectedAction)
        {
        case DinoAction.NormalAttack:
            m_dinoAnimationObject.AnimationState.SetAnimation(0, "attack_1", false);
            enemy.Damaged(m_currentAttackPower);
            break;

        case DinoAction.SpecialAttack:
            m_dinoAnimationObject.AnimationState.SetAnimation(0, "attack_3", false);
            enemy.Damaged(m_currentAttackPower);
            break;

        case DinoAction.Defence:
        case DinoAction.Counter:
            m_dinoAnimationObject.AnimationState.SetAnimation(0, "defense", false);
            // Damaged(enemy.currentAttackPower);
            break;
        }
        m_dinoAnimationObject.AnimationState.AddAnimation(0, "idle", true, 0f);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 카운터를 위한 후턴 계산
    /// </summary>
    /// <param name="enemy"></param>
    public void ProcessSecondAction(Dinosaur enemy)
    {
        if (m_currentHP <= 0)
        {
            return;
        }

        if (m_selectedAction != DinoAction.Counter)
        {
            return;
        }

        m_dinoAnimationObject.AnimationState.SetAnimation(0, "attack_1", false);
        enemy.Damaged(m_currentAttackPower);
        m_dinoAnimationObject.AnimationState.AddAnimation(0, "idle", true, 0f);
    }