This commit is contained in:
cemt1363
2026-06-06 12:21:21 +02:00
22 changed files with 2130 additions and 29 deletions
+13
View File
@@ -23,6 +23,7 @@ public class DropletMovement : MonoBehaviour
public float dashingCooldown = 1f;
[SerializeField] private TrailRenderer tr;
[SerializeField] private Animator animator;
void Start()
{
@@ -51,6 +52,18 @@ public class DropletMovement : MonoBehaviour
{
rb.linearVelocity = new Vector2(rb.linearVelocity.x, jumpingPower);
}
if (movement.x > 0) {
animator.SetBool("WalkingRight", true);
animator.SetBool("WalkingLeft", false);
} else if (movement.x <0 && movement.x != 0)
{
animator.SetBool("WalkingRight", false);
animator.SetBool("WalkingLeft", true);
} else
{
animator.SetBool("WalkingRight", false);
animator.SetBool("WalkingLeft", false);
}
if (Input.GetKeyDown(KeyCode.LeftShift) && canDash)
{
StartCoroutine(Dash());