private void OnCollisionEnter2D(Collision2D other) { var otherObjectAttributes = other.gameObject.GetComponent <ObjectAttributes>(); var interactibleObject = other.gameObject.GetComponents <IInvocable>(); if (isActivateInvocableObjects && interactibleObject.Length > 0) { foreach (var invocable in interactibleObject) { invocable.InvokeAction(); } } if (otherObjectAttributes != null) { otherObjectAttributes.Hurt(_objectAttributes.Damage); _objectAttributes.Hurt(otherObjectAttributes.Damage * .5f); } }