Lil guy
This commit is contained in:
1 parent
9a2e3d8b58
commit
fa1050d017
7 files changed
+35
-5
No files matched your search
@@ -27,6 +27,11 @@ func _process(delta: float) -> void:
|
||||
#velocity.x = 0
|
||||
|
||||
var direction = Input.get_axis("move_left","move_right")
|
||||
if direction < 0:
|
||||
$Sprite2D.flip_h = true
|
||||
elif direction > 0:
|
||||
$Sprite2D.flip_h = false
|
||||
|
||||
if direction:
|
||||
velocity.x = direction * SPEED
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user