TheKingsRace/Assets/Scripts/PlayerScripts/DebugPlayer/DebugStateStuff/AerialState/Wallrun/AerialWallRunState.cs
Melbyj1125 833183d034 Finished the Movement and Aerial groups
Working on the Dash, Nitro, and offense groups now
2022-02-15 21:19:12 -06:00

35 lines
1007 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AerialWallRunState : AerialBaseState
{
public override void EnterState(AerialStateManager aSM, AerialBaseState previousState){
Debug.Log("Wallrun State");
aSM.pStats.GravVel = 0;
}
public override void ExitState(AerialStateManager aSM, AerialBaseState nextState){
}
public override void UpdateState(AerialStateManager aSM){
if(Input.GetButton("Jump")){
aSM.SwitchState(aSM.JumpingState);
}
else if(!aSM.isWallRunning){
aSM.SwitchState(aSM.FallingState);
}
if(aSM.CheckGrapple() && (aSM.mSM.currentState != aSM.mSM.SlideState && aSM.mSM.currentState != aSM.mSM.RagdollState && aSM.mSM.currentState != aSM.mSM.RecoveringState)){
aSM.SwitchState(aSM.GrappleAirState);
}
}
public override void FixedUpdateState(AerialStateManager aSM){
aSM.GravityCalculation(2);
}
}