private void Damage(GameObject other) { if (other.tag == targetTag) { IDamagable damagable = other.GetComponent <IDamagable>(); if (damagable != null) { damagable.GetHit(this.damage); } } }