first work

This commit is contained in:
2024-03-07 22:17:10 +01:00
parent af7ecc10e3
commit f83f6989b4
10 changed files with 146 additions and 72 deletions
+14
View File
@@ -0,0 +1,14 @@
extends RigidBody2D
const SPEED = 300.0
func _ready():
contact_monitor = true
func _physics_process(delta):
if Input.is_action_pressed(get_meta("UP_KEY")):
move_and_collide(Vector2.UP * SPEED * delta)
if Input.is_action_pressed(get_meta("DOWN_KEY")):
move_and_collide(Vector2.DOWN * SPEED * delta)