Apply touch functions to character movements(The UP function for now)

main
tihgs 2025-06-20 15:30:09 +08:00
parent c3ce788fd1
commit 62c8857f05
Signed by: tihgs
GPG Key ID: 4E80959CDE5EDCA0
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ func _physics_process(delta):
if is_on_floor():
if Input.is_action_pressed("ui_up"):
motion.y = JUMP_HEIGHT
elif Input.is_action_pressed("up"):
motion.y = JUMP_HEIGHT
motion = move_and_slide(motion, UP)
pass