Added animator to no debug

This commit is contained in:
Evan Nydahl
2022-03-07 14:10:49 -06:00
parent ab552e5467
commit ee02e1eb59
20 changed files with 208 additions and 55 deletions

View File

@@ -37,12 +37,14 @@ public class MoveStateManager : NetworkBehaviour
public CharacterController moveController; // Character Controller
public Rigidbody rB; // Players Rigidbody
public CapsuleCollider capCol; // Players Capsule Collider
private Animator animator; // Animation Controller
public Animator animator; // Animation Controller
////
////Scripts Section
public PlayerStats pStats; // Player Stats
public AerialStateManager aSM;
//// AnimatorManagerScript
private AnimationManager animationManager;
////
////State Transition Variables
@@ -88,6 +90,7 @@ public class MoveStateManager : NetworkBehaviour
capCol.enabled = true;
parentObj = transform.parent.gameObject; // set parent object
animator = GetComponent<Animator>(); // set animator
animationManager = GetComponent<AnimationManager>();
////
////Initialize Scripts
@@ -162,6 +165,7 @@ public class MoveStateManager : NetworkBehaviour
//updates current state and calls logic for entering
currentState = state;
animationManager.updateCurrentPriority();
currentState.EnterState(this, previousState);
}

View File

@@ -5,11 +5,13 @@ using UnityEngine;
public class MoveIdleState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
mSM.GetComponent<Animator>().SetBool("isIdle", true);
Debug.Log("Entered Idle");
}
public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){
mSM.GetComponent<Animator>().SetBool("isIdle", false);
Debug.Log("Exited Idle");
}
public override void UpdateState(MoveStateManager mSM){

View File

@@ -5,11 +5,13 @@ using UnityEngine;
public class MoveJogState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
mSM.GetComponent<Animator>().SetBool("isJogging", true);
Debug.Log("Entered Jog");
}
public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){
mSM.GetComponent<Animator>().SetBool("isJogging", false);
Debug.Log("Exited Jog");
}
public override void UpdateState(MoveStateManager mSM){

View File

@@ -5,11 +5,13 @@ using UnityEngine;
public class MoveRunState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
mSM.GetComponent<Animator>().SetBool("isRunning", true);
Debug.Log("Entered Run");
}
public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){
mSM.GetComponent<Animator>().SetBool("isRunning", false);
Debug.Log("Exit Run");
}
public override void UpdateState(MoveStateManager mSM){

View File

@@ -5,11 +5,13 @@ using UnityEngine;
public class MoveWalkState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
mSM.GetComponent<Animator>().SetBool("isWalking", true);
Debug.Log("Entered Walk");
}
public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){
mSM.GetComponent<Animator>().SetBool("isWalking", false);
Debug.Log("Exited Walk");
}
public override void UpdateState(MoveStateManager mSM){