mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-25 16:15:39 -05:00
cant slide when falling
This commit is contained in:
parent
fc525861d4
commit
ba3ac228f7
|
|
@ -16,7 +16,7 @@ public class MoveIdleState : MoveBaseState
|
|||
}
|
||||
|
||||
//If Q or joystick button1 crouch state
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q))){
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) && mSM.aSM.currentState != mSM.aSM.FallingState){
|
||||
mSM.SwitchState(mSM.CrouchState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class MoveJogState : MoveBaseState
|
|||
}
|
||||
|
||||
//move to slide if Q or JoystickButton1
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q))){
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) && mSM.aSM.currentState != mSM.aSM.FallingState){
|
||||
mSM.SwitchState(mSM.SlideState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class MoveRunState : MoveBaseState
|
|||
}
|
||||
|
||||
//move to slide if Q or JoystickButton1
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q))){
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) && mSM.aSM.currentState != mSM.aSM.FallingState){
|
||||
mSM.SwitchState(mSM.SlideState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class MoveWalkState : MoveBaseState
|
|||
}
|
||||
|
||||
//move to slide if Q or JoystickButton1
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q))){
|
||||
if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) && mSM.aSM.currentState != mSM.aSM.FallingState){
|
||||
mSM.SwitchState(mSM.SlideState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user