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

+12 -2
View File
@@ -33,11 +33,21 @@ func _on_approach(body) -> void:
return
_is_interactable = true
self.add_to_group("nearby_interactables")
$Sprite2D/ButtonPrompt.show()
if %Player2D.controller_ui:
print("CONTROLLER UI")
$Sprite2D/ButtonPrompt.show()
$Sprite2D/KeyPrompt.hide()
else:
print("KEYBOARD UI")
$Sprite2D/KeyPrompt.show()
$Sprite2D/ButtonPrompt.hide()
func _on_abandon(body) -> void:
if body!=%Player2D:
return
_is_interactable = false
self.remove_from_group("nearby_interactables")
$Sprite2D/ButtonPrompt.hide()
if %Player2D.controller_ui:
$Sprite2D/ButtonPrompt.hide()
else:
$Sprite2D/KeyPrompt.hide()