void OnTriggerEnter(Collider collider) { if (m_disabled) { return; } HealthComponent health = collider.gameObject.GetComponent <HealthComponent>(); if (health != null) { if (!health.HasMaxHealth()) { health.Health += RestoreQuantity; Disable(); } } }