Controller detection
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
debugman18 committed 2026-10-18 14:44:37 -05:00
1 parent baeb8c78ca
commit fe5d4dd4ba
14 files changed
+225 -13

No files matched your search

+9
View File
@@ -1,5 +1,7 @@
extends CharacterBody2D
var controller_ui = false
const SPEED = 380.0
const DASH_SPEED = 600
const HORIZONTAL_DASH_MULT = 1.8
@@ -119,6 +121,13 @@ func on_death(instant = false, player_position = position):
death_cooldown = 0
func _process(delta: float) -> void:
if Input.is_key_pressed(Key.KEY_W) or Input.is_key_pressed(Key.KEY_A) or Input.is_key_pressed(Key.KEY_S) or Input.is_key_pressed(Key.KEY_D):
print("KEYBOARD")
controller_ui = false
elif Input.get_action_strength("move_horizontal") > 0:
print("CONTROLLER")
controller_ui = true
if Input.is_action_just_released("restart") or (Input.is_action_pressed("controller_restart_left") and Input.is_action_pressed("controller_restart_right")):
get_tree().reload_current_scene()