public void ApplyHit(GameObject gameObject) { IHit hit = gameObject.GetComponent <IHit>(); if (hit != null) { hit.DealDamage(Damage); } }