ugh
This commit is contained in:
@@ -50,6 +50,9 @@ public class PlayerMovement : MonoBehaviour
|
||||
bool wasGrappling = false;
|
||||
bool unlockedTrumpet;
|
||||
|
||||
//clarinet
|
||||
public bool isDashing = false;
|
||||
|
||||
//Set all of these up in the inspector
|
||||
[Header("Checks")]
|
||||
//Size of groundCheck depends on the size of your character generally you want them slightly small than width (for ground) and height (for the wall check)
|
||||
@@ -88,7 +91,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
void OnMove(InputValue value)
|
||||
{
|
||||
if (playerBehavior.playerIsAlive) {
|
||||
if (playerBehavior.playerIsAlive && !isDashing) {
|
||||
this._moveInput = value.Get<Vector2>();
|
||||
} else {
|
||||
this._moveInput = Vector2.zero;
|
||||
@@ -97,13 +100,15 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
void OnJump()
|
||||
{
|
||||
if (playerBehavior.playerIsAlive) {
|
||||
if (playerBehavior.playerIsAlive && !isDashing) {
|
||||
OnJumpInput();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
isDashing = playerBehavior.isDash;
|
||||
if(!isDashing){
|
||||
unlockedTrumpet = stateController.unlockedTrumpet;
|
||||
#region TIMERS
|
||||
LastOnGroundTime -= Time.deltaTime;
|
||||
@@ -313,10 +318,12 @@ public class PlayerMovement : MonoBehaviour
|
||||
gameUI.ToggleTrumpet(false);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if(!isDashing){
|
||||
//Handle Run
|
||||
if (IsWallJumping)
|
||||
Run(Data.wallJumpRunLerp);
|
||||
@@ -326,6 +333,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
//Handle Slide
|
||||
if (IsSliding)
|
||||
Slide();
|
||||
}
|
||||
}
|
||||
|
||||
#region INPUT CALLBACKS
|
||||
|
||||
Reference in New Issue
Block a user