Did some bugfixing and commented on everything

This commit is contained in:
Melbyj1125
2022-02-17 20:55:23 -06:00
parent e74a1c61c0
commit 820b11dd61
40 changed files with 528 additions and 250 deletions

View File

@@ -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);
}
}
}