Merge branch 'main' of https://github.com/orsolya-st/gamejam_050626
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user