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

        characterMovement.Jump(canJumpInMidAir);
        stateMachine.ChangeState(ActionStates.Idle);
    }
예제 #2
0
파일: Player.cs 프로젝트: mNozomi/Zetsu
 //--------------------------------------------------------------------
 // アクション遷移判定式
 //--------------------------------------------------------------------
 public bool CanNeutral()
 {
     if (Utility.StickLXSlople() > 0.0f)
     {
         return(false);
     }
     ActionStateMachine.ChangeState(new Neutral());
     return(true);
 }
예제 #3
0
파일: Player.cs 프로젝트: mNozomi/Zetsu
 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);
        }
    }