Ejemplo n.º 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);
    }
Ejemplo n.º 2
0
 protected virtual void DamageWithCombat(GameObject user)
 {
     EventOnDamage?.Invoke();
 }