mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
cant slide when falling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user