protected override void OnEnter(Collider2D p_collision) { HealthBehaviour healthSystem = p_collision.gameObject.GetComponent <HealthBehaviour>(); if (healthSystem) { healthSystem.Heal(m_healAmount); } Destroy(gameObject); }
protected override void OnEnter(Collider2D p_collision) { HealthBehaviour healthSystem = p_collision.gameObject.GetComponent <HealthBehaviour>(); if (healthSystem) { healthSystem.Heal(m_healAmount); } Destroy(gameObject); }