public override void EnterState() { bool canJumpInMidAir = false; characterMovement.Jump(canJumpInMidAir); stateMachine.ChangeState(ActionStates.Idle); }
//-------------------------------------------------------------------- // アクション遷移判定式 //-------------------------------------------------------------------- public bool CanNeutral() { if (Utility.StickLXSlople() > 0.0f) { return(false); } ActionStateMachine.ChangeState(new Neutral()); return(true); }
public bool CanRun() { if (Utility.StickLXSlople() < mRunLowerLim || mRunUpperLim < Utility.StickLXSlople()) { return(false); } ActionStateMachine.ChangeState(new Run()); return(true); }
public override void FixedUpdateState() { bool finished = teleport.UpdateTeleport(); if (finished) { stateMachine.ChangeState(ActionStates.Idle); } }
public override void UpdateState() { if (playerInput.jumped) { stateMachine.ChangeState(ActionStates.Jumping); } if (playerInput.targeted) { cameraStateMachine.ToggleTargeting(); } if (playerInput.teleported) { stateMachine.ChangeState(ActionStates.Teleporting); } if (!playerInput.shooting) { stateMachine.ChangeState(ActionStates.Idle); } }
public override void FixedUpdateState() { float t = (Time.time - respawnStartTime) / respawnTime; Vector3 nextPosition = Vector3.Lerp(startingPosition, checkpoint.transform.position, t); player.transform.position = nextPosition; if (t >= 1) { stateMachine.ChangeState(ActionStates.Idle); } }