mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 18:04:27 -05:00
Did some bugfixing and commented on everything
This commit is contained in:
@@ -13,16 +13,21 @@ public class NitroNoneState : NitroBaseState
|
||||
}
|
||||
|
||||
public override void UpdateState(NitroStateManager nSM){
|
||||
|
||||
//if player has nitro
|
||||
if(nSM.pStats.HasNitro){
|
||||
|
||||
//if ragdolling then incapacitiated
|
||||
if(nSM.mSM.currentState == nSM.mSM.RagdollState){
|
||||
nSM.SwitchState(nSM.IncapacitatedState);
|
||||
}
|
||||
|
||||
if ((Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.JoystickButton8)))
|
||||
//if pressing left shift then nitroing
|
||||
else if ((Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.JoystickButton8)))
|
||||
{
|
||||
nSM.SwitchState(nSM.NitroingState);
|
||||
}
|
||||
|
||||
if(nSM.mSM.currentState == nSM.mSM.RagdollState){
|
||||
nSM.SwitchState(nSM.IncapacitatedState);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user