public void TriggerMonsterAction(int skillNumber)
    {
        statusEffectManager.ActivateStatusEffects();
        if (skillNumber > skillList.Length - 1)
        {
            Debug.Log("Invalid skill");
        }
        else
        {
            // Shake!
            Vector2 newPosition = transform.position;
            newPosition.x     += attackShakeAmount;
            transform.position = newPosition;
            attackShakeTimer.Go(attackShakeDelay);

            Skill      triggeredSkill = skillList[skillNumber].GetComponent <Skill>();
            GameObject target         = gameInfo.GetSelectedHero();
            if (tauntTarget != 0)
            {
                target = gameInfo.characters[tauntTarget];
            }
            lastHit = target;
            triggeredSkill.UseSkill(gameObject, target);
            turnManager.MonsterTookTurn();
        }
    }
예제 #2
0
 public void TriggerHeroAction(int skillNumber)
 {
     statusEffectManager.ActivateStatusEffects();
     triggeredSkillNumber = skillNumber;
     attackDelayTimer.Go(attackDelay);
 }