public override void EnterState()
    {
        bool canJumpInMidAir = false;

        characterMovement.Jump(canJumpInMidAir);
        stateMachine.ChangeState(ActionStates.Idle);
    }
Пример #2
0
 //--------------------------------------------------------------------
 // アクション遷移判定式
 //--------------------------------------------------------------------
 public bool CanNeutral()
 {
     if (Utility.StickLXSlople() > 0.0f)
     {
         return(false);
     }
     ActionStateMachine.ChangeState(new Neutral());
     return(true);
 }
Пример #3
0
 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);
        }
    }
Пример #5
0
 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);
     }
 }
Пример #6
0
    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);
        }
    }