From 203c51c61a68fddd36dc0a49b5c4535a4a76dea7 Mon Sep 17 00:00:00 2001 From: tihgs Date: Fri, 20 Jun 2025 16:00:04 +0800 Subject: [PATCH] Implement left and right script to character Character can be fully controllable now --- char/char.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/char/char.gd b/char/char.gd index b384bbe..01b25ec 100644 --- a/char/char.gd +++ b/char/char.gd @@ -12,9 +12,15 @@ func _physics_process(delta): if Input.is_action_pressed("ui_right"): $Sprite.flip_h = false motion.x = SPEED + elif Input.is_action_pressed("right"): + $Sprite.flip_h = false + motion.x = SPEED elif Input.is_action_pressed("ui_left"): $Sprite.flip_h = true motion.x = -SPEED + elif Input.is_action_pressed("left"): + $Sprite.flip_h = true + motion.x = -SPEED else: motion.x = 0 if is_on_floor():