public virtual void ExitBuildMode() { tpInput.SetLockAllInput(false); currentBuild.ExitBuild(); if (currentBuild.strafeWhileCreate && tpInput.cc.locomotionType != vThirdPersonMotor.LocomotionType.OnlyStrafe) { tpInput.SetStrafeLocomotion(false); } tpInput.ResetCameraState(); onExitBuildMode.Invoke(); genericAction.SetLockTriggerEvents(false); }
public virtual void ResetTriggerSettings() { if (debugMode) { Debug.Log("Reset Trigger Settings"); } // reset player gravity and collision EnablePlayerGravityAndCollision(); // reset the Animator parameter ActionState back to 0 ResetActionState(); // reset the CameraState to the Default state tpInput.ResetCameraState(); // reset canTriggerAction so you can trigger another action //canTriggerAction = false; if (triggerAction != null && actions.ContainsKey(triggerAction._collider)) { actions.Remove(triggerAction._collider); } triggerAction = null; // reset triggerActionOnce so you can trigger again // triggerActionOnce = false; doingAction = false; actionStarted = false; }
protected virtual void ResetPlayerSettings() { if (debugMode) { Debug.Log("Reset Player Settings"); } if (!playingAnimation || tpInput.cc.animator.GetCurrentAnimatorStateInfo(0).normalizedTime >= triggerAction.endExitTimeAnimation) { tpInput.cc.EnableGravityAndCollision(0f); // enable again the gravity and collision tpInput.cc.animator.SetInteger("ActionState", 0); // Reset actions State to 0 } // reset camera state to default tpInput.ResetCameraState(); canTriggerAction = false; triggerActionOnce = false; }
public virtual void ResetTriggerSettings() { DebugAction("Reset Trigger Settings "); // reset player gravity and collision EnablePlayerGravityAndCollision(); // reset the Animator parameter ActionState back to 0 ResetActionState(); // reset the CameraState to the Default state tpInput.ResetCameraState(); // remove the collider from the actions list if (triggerAction != null && actions.ContainsKey(triggerAction._collider)) { actions.Remove(triggerAction._collider); } triggerAction = null; doingAction = false; actionStarted = false; }
public virtual void ResetTriggerSettings(bool removeTrigger = true) { if (debugMode) { Debug.Log($"<b>GenericAction: </b>Reset Trigger Settings "); } // reset player gravity and collision EnablePlayerGravityAndCollision(); // reset the Animator parameter ActionState back to 0 ResetActionState(); // reset the CameraState to the Default state tpInput.ResetCameraState(); // remove the collider from the actions list if (triggerAction != null && actions.ContainsKey(triggerAction._collider) && removeTrigger) { actions.Remove(triggerAction._collider); } triggerAction = null; doingAction = false; actionStarted = false; }