public void BreakGrab(bool fromGrabbee, bool cancelGrab) { if (!fromGrabbee && Grabbee != null) { if (cancelGrab) { Grabbee.UpdateState(ActorState.RECOVERING); Actor.UpdateState(ActorState.RECOVERING); } else { Grabbee.UpdateState(ActorState.DEFAULT); Actor.UpdateState(ActorState.DEFAULT); } ActionManager manager = Grabbee.GetComponent <ActionManager>(); if (manager != null) { manager.CurrentAttack = null; manager.Grabbee = null; manager.Grabber = null; } } else if (fromGrabbee && Grabber) { ActionManager manager = Grabber.GetComponent <ActionManager>(); if (manager != null) { manager.BreakGrab(false, false); } } Grabber = null; Grabbee = null; }
public void NotifyGrabbeBeingThrown() { if (Grabbee != null) { Grabbee.Animator.Rebind(); Grabbee.UpdateState(ActorState.BEING_THROWN); ActionManager manager = Grabbee.GetComponent <ActionManager>(); if (manager != null) { Attack atk = WrestlerAttackManager.CONTACT; atk.Damage = new Damage(WrestlerAttackManager.PUNCH_DMG, WrestlerAttackManager.STRIKE_THROW_FORCE); manager.atkManager.ActivateAllHitboxes(Grabbee, atk); } } }