private void OnTriggerEnter(Collider other) { DamageController damageController = other.gameObject.GetComponent <DamageController>(); if (damageController != null) { damageController.TakeHit(); } }