Exemplo n.º 1
0
    //Player interface
    public void PlayerUseInstant(Abilities ability, Transform target)
    {
        SetTarget(target);

        if (SelectedAbility == ability)
        {
            if (currentTarget != null)
            {
                if (targetEnemy != null)
                {
                    targetEnemy.Influence(gameObject, Emotion.Anger, statComponent.agro);
                }
                UseAbility();
            }
            else
            {
                Debug.Log("Invalid target: " + currentTarget.name);
            }
        }
        else
        {
            SelectAbility(ability);
            if (OnPlayerAbilitySelected != null)
            {
                OnPlayerAbilitySelected.Invoke();
            }
            UseAbility();
        }
    }
Exemplo n.º 2
0
 //Player interface
 public void PlayerUseAoE(Abilities ability)
 {
     SelectAbility(ability);
     if (OnPlayerAbilitySelected != null)
     {
         OnPlayerAbilitySelected.Invoke();
     }
     UseAbility();
 }