okay re-add up/down movement

This commit is contained in:
archfan 2020-04-18 17:31:00 -04:00
parent 7f141665f1
commit d60b10844d

View File

@ -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))