// Release character to be playable again private void ReleaseStun() { if (currentSubState != SubStates.Stunned && !blockStunned) return; if (!isBlocking && comboHits > 1) { UFE.FireAlert(UFE.config.selectedLanguage.combo, opInfo); } currentSubState = SubStates.Resting; blockStunned = false; stunTime = 0; comboHits = 0; comboDamage = 0; comboHitDamage = 0; airJuggleHits = 0; CheckBlocking(false); standUpOverride = StandUpOptions.None; myPhysicsScript.ResetWeight(); if (!isDead) ToggleHeadLook(true); if (myPhysicsScript.IsGrounded()) currentState = PossibleStates.Stand; translateInputs(inputController); myHitBoxesScript.HideHitBoxes(false); }
// Imediately cancels any move being executed public void KillCurrentMove() { if (currentMove == null) return; currentMove.currentFrame = 0; currentMove.currentTick = 0; //myMoveSetScript.SetAnimationSpeed(currentMove.name, currentMove.animationSpeed); myHitBoxesScript.activeHurtBoxes = null; myHitBoxesScript.blockableArea = null; myHitBoxesScript.HideHitBoxes(false); ignoreCollisionMass = false; if (UFE.config.blockOptions.blockType == BlockType.HoldBack || UFE.config.blockOptions.blockType == BlockType.AutoBlock) opControlsScript.CheckBlocking(false); if (currentMove.applyRootMotion) { character.transform.localPosition = new Vector3(0, 0, 0); Vector3 newPosition = character.transform.position; if (currentMove.rootMotionNode != BodyPart.none){ newPosition = myHitBoxesScript.GetPosition(currentMove.rootMotionNode); } newPosition.z = 0; transform.position = newPosition; if (currentMove.forceGrounded) myPhysicsScript.ForceGrounded(); } if (currentMove.disableHeadLook) ToggleHeadLook(true); if (currentMove.invertRotationLeft && mirror == -1) InvertRotation(); if (currentMove.forceMirrorLeft && mirror == -1) ForceMirror(false); if (currentMove.invertRotationRight && mirror == 1) InvertRotation(); if (currentMove.forceMirrorRight && mirror == 1) ForceMirror(UFE.config.characterRotationOptions.autoMirror); testCharacterRotation(100); if (stunTime > 0){ standUpOverride = currentMove.standUpOptions; if (standUpOverride != StandUpOptions.None) currentState = PossibleStates.Down; } currentMove = null; ReleaseCam(); }