feat: add game scene and player scene

This commit is contained in:
2025-03-01 15:04:45 +01:00
parent 121f612c27
commit c921728f4c
5 changed files with 42 additions and 0 deletions

10
scripts/player.gd Normal file
View File

@@ -0,0 +1,10 @@
extends CharacterBody2D
const SPEED = 300.0
const JUMP_VELOCITY = -400.0
func _physics_process(delta):
velocity.x = Input.get_axis("ui_left", "ui_right") * SPEED
velocity.y = Input.get_axis("ui_up", "ui_down") * SPEED
move_and_slide()