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