mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-03-23 10:14:27 -05:00
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DashNoneState : DashBaseState
|
|
{
|
|
public override void EnterState(DashStateManager dSM, DashBaseState previousState){
|
|
|
|
}
|
|
|
|
public override void ExitState(DashStateManager dSM, DashBaseState nextState){
|
|
|
|
}
|
|
|
|
public override void UpdateState(DashStateManager dSM){
|
|
|
|
//checks if player has dash
|
|
if(dSM.pStats.HasDash){
|
|
|
|
//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(GameManager.GM.bindableActions["dashKey"]) || Input.GetKeyDown(KeyCode.JoystickButton5) && !dSM.pStats.IsPaused)){
|
|
dSM.SwitchState(dSM.DashingState);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public override void FixedUpdateState(DashStateManager dSM){
|
|
|
|
}
|
|
}
|