Exemple #1
0
    public override bool Interact(GameObject user)
    {
        Debug.Log(gameObject.name + " ineracted with " + user.name);
        var combat = user.GetComponent <Combat>();

        if (combat == null)
        {
            return(base.Interact(user));
        }
        if (!combat.Attack(MyStats))
        {
            return(base.Interact(user));
        }
        EventOnDamage?.Invoke();
        return(true);
    }
Exemple #2
0
 protected virtual void DamageWithCombat(GameObject user)
 {
     EventOnDamage?.Invoke();
 }