Did some bugfixing and commented on everything

This commit is contained in:
Melbyj1125
2022-02-17 20:55:23 -06:00
parent e74a1c61c0
commit 820b11dd61
40 changed files with 528 additions and 250 deletions

View File

@@ -10,8 +10,8 @@ public class MoveCrouchState : MoveBaseState
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
//if not coming from slide state then rotate player and adjust height
if(previousState != mSM.SlideState){
//Initialize Important Stats On state enter
mSM.pStats.CurVel = 0;
mSM.gameObject.transform.eulerAngles = new Vector3(mSM.transform.localEulerAngles.x - 90, mSM.transform.localEulerAngles.y, mSM.transform.localEulerAngles.z);
mSM.moveController.height *= .5f;
@@ -19,6 +19,8 @@ public class MoveCrouchState : MoveBaseState
}
public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){
//if next state isn't crouch walk revert rotation, speed, and height
if(nextState != mSM.CrouchWalkState){
mSM.gameObject.transform.localEulerAngles = new Vector3(0, 0, 0);
mSM.pStats.CurVel = mSM.calculatedCurVel;