fix clarinet ui
This commit is contained in:
parent
d703883d94
commit
418d0e5566
@ -110,9 +110,10 @@ public class PlayerBehavior : MonoBehaviour
|
||||
unlockedClarinet = StateController.Instance.HasClarinet();
|
||||
if (unlockedClarinet)
|
||||
{
|
||||
if (playerInput.actions["ClarinetDive"].WasPressedThisFrame() && !isInWater && !playerController.IsGrounded())
|
||||
if (playerInput.actions["ClarinetDive"].WasPressedThisFrame() && !isInWater && !playerController.IsGrounded() && !isDash)
|
||||
{
|
||||
isDash = true;
|
||||
this.gameUI.ToggleClarinet(false);
|
||||
playerInput.DeactivateInput();
|
||||
currentDash = 0.0f;
|
||||
}
|
||||
@ -131,6 +132,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
{
|
||||
if (!isInWater) {
|
||||
isDash = false;
|
||||
this.gameUI.ToggleClarinet(true);
|
||||
forceAdded = false;
|
||||
_rb.AddForce(-(dashVec), ForceMode2D.Impulse);
|
||||
playerInput.ActivateInput();
|
||||
@ -140,6 +142,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
}
|
||||
else {
|
||||
isDash = false;
|
||||
this.gameUI.ToggleClarinet(true);
|
||||
forceAdded = false;
|
||||
playerInput.ActivateInput();
|
||||
currentDash = 0.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user