diff --git a/Player.gd b/Player.gd index 918011e..e05b0d8 100644 --- a/Player.gd +++ b/Player.gd @@ -1,10 +1,14 @@ extends KinematicBody2D -# Also grid size + var speed = 3000 func _physics_process(delta): - if Input.is_action_just_pressed("left"): + if Input.is_action_just_pressed("up"): + self.move_and_slide(Vector2(0, -speed)) + elif Input.is_action_just_pressed("down"): + self.move_and_slide(Vector2(0, speed)) + elif Input.is_action_just_pressed("left"): self.move_and_slide(Vector2(-speed, 0)) elif Input.is_action_just_pressed("right"): self.move_and_slide(Vector2(speed, 0))