This commit is contained in:
allylikesfrogs 2023-05-04 17:16:43 -07:00
parent ce71c20acb
commit 608173221e

View File

@ -19,12 +19,11 @@ public class PlayerBehavior : MonoBehaviour
[Header("Clarinet:")]
bool unlockedClarinet;
private float currentDashTime;
public bool isDash = false;
public float bonk = 2f;
private Vector2 saveVelocity;
public bool isInWater = false;
public float dashForce = 1.5f;
public float dashForce = 1.2f;
[Header("Grappling:")]
[SerializeField] public Tutorial_GrapplingGun grapplingGun;
@ -62,8 +61,6 @@ public class PlayerBehavior : MonoBehaviour
void Start()
{
gameUI.UpdateInstrumentUI();
// for clarinet
currentDashTime = maxDashTime;
}
void Update()
@ -98,6 +95,8 @@ public class PlayerBehavior : MonoBehaviour
{
isDash = true;
playerInput.DeactivateInput();
// set so if in water dash will still be true
// otherwise turn dash off
}
if (!playerController.IsGrounded() && isDash)
{
@ -224,7 +223,7 @@ public class PlayerBehavior : MonoBehaviour
{
Vector2 reflect = new Vector2(saveVelocity.x,-(saveVelocity.y) * bonk);
_rb.AddForce(reflect, ForceMode2D.Impulse);
print("boing");
reflect = Vector2.zero;
}
void Water()
@ -233,7 +232,6 @@ public class PlayerBehavior : MonoBehaviour
{
saveVelocity = Vector2.zero;
isInWater = true;
print("buoy");
}
else
{