initial commit

This commit is contained in:
2024-03-02 08:31:57 +01:00
commit af7ecc10e3
10 changed files with 212 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
extends CharacterBody2D
const SPEED = 300.0
func _physics_process(delta):
if Input.is_action_pressed(get_meta("UP_KEY")):
velocity.y = move_toward(velocity.y, -1, SPEED)
move_and_collide(Vector2.UP * SPEED * delta)
if Input.is_action_pressed(get_meta("DOWN_KEY")):
velocity.y = move_toward(velocity.y, 1, SPEED)
move_and_collide(Vector2.DOWN * SPEED * delta)