mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 18:34:32 -05:00
Added animator to no debug
This commit is contained in:
@@ -14,10 +14,12 @@ public class DashDashingState : DashBaseState
|
||||
|
||||
public override void EnterState(DashStateManager dSM, DashBaseState previousState){
|
||||
currentDashTime = 0; // resets dash time
|
||||
dSM.GetComponent<Animator>().SetBool("isDashing", true);
|
||||
}
|
||||
|
||||
public override void ExitState(DashStateManager dSM, DashBaseState nextState){
|
||||
moveDirection = Vector3.zero; // resets moveDirection
|
||||
dSM.GetComponent<Animator>().SetBool("isDashing", false);
|
||||
}
|
||||
|
||||
public override void UpdateState(DashStateManager dSM){
|
||||
|
||||
@@ -18,13 +18,15 @@ public class DashStateManager : NetworkBehaviour
|
||||
|
||||
////Components Section
|
||||
public CharacterController moveController; // Character Controller
|
||||
Animator animator; // Animation Controller
|
||||
public Animator animator; // Animation Controller
|
||||
////
|
||||
|
||||
////Scripts Section
|
||||
public PlayerStats pStats; // Player Stats
|
||||
public MoveStateManager mSM; // movement state manager
|
||||
public CoolDown driver; // cooldown driver
|
||||
//// AnimatorManagerScript
|
||||
private AnimationManager animationManager;
|
||||
////
|
||||
|
||||
////Items Section
|
||||
@@ -42,6 +44,7 @@ public class DashStateManager : NetworkBehaviour
|
||||
////Initialize Scripts
|
||||
pStats = GetComponent<PlayerStats>(); // set PlayerStats
|
||||
mSM = GetComponent<MoveStateManager>(); // set move state manager
|
||||
animationManager = GetComponent<AnimationManager>();
|
||||
////
|
||||
}
|
||||
|
||||
@@ -77,6 +80,7 @@ public class DashStateManager : NetworkBehaviour
|
||||
|
||||
//updates current state and calls logic for entering
|
||||
currentState = state;
|
||||
animationManager.updateCurrentPriority();
|
||||
currentState.EnterState(this, previousState);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user