mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 02:14:30 -05:00
created a debug prefab
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class dMoveIdleState : dMoveBaseState
|
||||
{
|
||||
public override void EnterState(dMoveStateManager mSM, dMoveBaseState previousState){
|
||||
|
||||
}
|
||||
|
||||
public override void ExitState(dMoveStateManager mSM, dMoveBaseState nextState){
|
||||
|
||||
}
|
||||
|
||||
public override void UpdateState(dMoveStateManager mSM){
|
||||
|
||||
//Move to Walk State after speed increases
|
||||
if(mSM.calculatedCurVel >= mSM.idleLimit){
|
||||
mSM.SwitchState(mSM.WalkState);
|
||||
}
|
||||
|
||||
//If Q or joystick button1 crouch state
|
||||
else if((Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) && (mSM.aSM.currentState != mSM.aSM.FallingState && mSM.aSM.currentState != mSM.aSM.WallRunState && mSM.aSM.currentState != mSM.aSM.WallIdleState && mSM.aSM.currentState != mSM.aSM.GrappleGroundedState)){
|
||||
mSM.SwitchState(mSM.CrouchState);
|
||||
}
|
||||
}
|
||||
|
||||
public override void FixedUpdateState(dMoveStateManager mSM){
|
||||
|
||||
//actual directional movement
|
||||
mSM.DirectionalMovement();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user