public void LaunchInteraction(IInteractableWithEnemy _targetObject) { interactionTarget = _targetObject.GetReferenceToMainObject(); var _interactionType = _targetObject.GetInteractionType(); if (_interactionType == InteractionType.Explosion) { //AnimateShake SubtractHp(interactionTarget.GetDamage()); } }
public void LaunchInteraction(IInteractableWithEnemy _targetObject) { interactionTarget = _targetObject.GetReferenceToMainObject(); var _interactionType = _targetObject.GetInteractionType(); if (_interactionType == InteractionType.Explosion) { PushOutFromExplosionPosition(interactionTarget.GetPosition(), interactionTarget.GetDamage()); SubtractHp(interactionTarget.GetDamage()); } else if (_interactionType == InteractionType.Implosion && alredyIteractingWithImploder == false) { alredyIteractingWithImploder = true; theObjectThatMeteorIsCathedBy = interactionTarget.GetReferenceToObject() as Imploder; ToggleToMoveTowardsTargetAsImploded(); } }