protected void OnTriggerEnter2D(Collider2D other) { IDamageReceiver damageReceiver = other.GetComponent <IDamageReceiver>(); if (damageReceiver != null) { damageReceiver.TakeHealth(_healAmount); } Destroy(gameObject); }
protected void OnTriggerEnter2D(Collider2D other) { IDamageReceiver damageReceiver = other.GetComponent <IDamageReceiver>(); if (damageReceiver != null) { damageReceiver.TakeHealth(_healAmount); } Destroy(gameObject); }