mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-03-23 02:04:17 -05:00
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class NitroNoneState : NitroBaseState
|
|
{
|
|
public override void EnterState(NitroStateManager nSM, NitroBaseState previousState){
|
|
|
|
}
|
|
|
|
public override void ExitState(NitroStateManager nSM, NitroBaseState nextState){
|
|
|
|
}
|
|
|
|
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 pressing left shift then nitroing
|
|
else if ((Input.GetKeyDown(GameManager.GM.bindableActions["nitroKey"]) || Input.GetKeyDown(KeyCode.JoystickButton4)) && !nSM.pStats.IsPaused)
|
|
{
|
|
nSM.SwitchState(nSM.NitroingState);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public override void FixedUpdateState(NitroStateManager nSM){
|
|
|
|
}
|
|
}
|