コード例 #1
0
 public void OnUpdate(SimplePlayerController fsm)
 {
     if (fsm.IsGrounded())
     {
         // transition back to idle when back on ground
         fsm.Transition(SimplePlayerController.IdleState);
     }
 }
コード例 #2
0
 public void OnUpdate(SimplePlayerController fsm)
 {
     if (fsm.IsGrounded())
     {
         // transition back to idle when back on ground
         fsm.Transition(SimplePlayerController.IdleState);
     }
 }
コード例 #3
0
 public void OnUpdate(SimplePlayerController fsm)
 {
     if (Mathf.Abs(Input.GetAxis("Horizontal")) < 0.0001f)
     {
         fsm.Transition(SimplePlayerController.IdleState);
     }
     if (Input.GetButtonDown("Jump") && fsm.IsGrounded())
     {
         fsm.Transition(SimplePlayerController.JumpState);
     }
 }
コード例 #4
0
 public void OnUpdate(SimplePlayerController fsm)
 {
     if (Mathf.Abs(Input.GetAxis("Horizontal")) < 0.0001f)
     {
         fsm.Transition(SimplePlayerController.IdleState);
     }
     if (Input.GetButtonDown("Jump") && fsm.IsGrounded())
     {
         fsm.Transition(SimplePlayerController.JumpState);
     }
 }