mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
Did some bugfixing and commented on everything
This commit is contained in:
@@ -13,14 +13,20 @@ public class DashNoneState : DashBaseState
|
||||
}
|
||||
|
||||
public override void UpdateState(DashStateManager dSM){
|
||||
|
||||
//checks if player has dash
|
||||
if(dSM.pStats.HasDash){
|
||||
if ((Input.GetKeyDown(KeyCode.R) || Input.GetAxis("Dash") != 0)){
|
||||
|
||||
//if incapacitated then incapacitated
|
||||
if(dSM.mSM.currentState == dSM.mSM.RagdollState || dSM.mSM.currentState == dSM.mSM.SlideState || dSM.mSM.currentState == dSM.mSM.CrouchState || dSM.mSM.currentState == dSM.mSM.CrouchWalkState){
|
||||
dSM.SwitchState(dSM.IncapacitatedState);
|
||||
}
|
||||
|
||||
//if R key then Dashing
|
||||
else if ((Input.GetKeyDown(KeyCode.R) || Input.GetAxis("Dash") != 0)){
|
||||
dSM.SwitchState(dSM.DashingState);
|
||||
}
|
||||
|
||||
if(dSM.mSM.currentState == dSM.mSM.RagdollState || dSM.mSM.currentState == dSM.mSM.SlideState || dSM.mSM.currentState == dSM.mSM.CrouchState || dSM.mSM.currentState == dSM.mSM.CrouchWalkState){
|
||||
dSM.SwitchState(dSM.IncapacitatedState);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user