feat: Implement the "Stop N Go" arena with new assets, scenes, and associated game logic and UI.
This commit is contained in:
@@ -36,10 +36,10 @@ var button_positions: Dictionary = {
|
||||
var button_scale: float = 1.0
|
||||
|
||||
# Reference to main scene and player
|
||||
var main_scene: Node3D
|
||||
var local_player: Node3D
|
||||
var main_scene: Node
|
||||
var local_player: Node
|
||||
|
||||
func initialize(p_main: Node3D):
|
||||
func initialize(p_main: Node):
|
||||
main_scene = p_main
|
||||
_create_touch_ui()
|
||||
_load_settings()
|
||||
@@ -70,7 +70,7 @@ func _on_control_remapped(_action: String, _key: int):
|
||||
var b_name = child.name.replace("Btn", "")
|
||||
_ensure_shortcut_label(child, b_name)
|
||||
|
||||
func set_player(p_player: Node3D):
|
||||
func set_player(p_player: Node):
|
||||
local_player = p_player
|
||||
|
||||
# Connect to Tekton status updates
|
||||
@@ -191,19 +191,19 @@ func _create_touch_ui():
|
||||
if put_button:
|
||||
put_button.visible = true
|
||||
|
||||
# Use existing settings button (child of Main node)
|
||||
settings_button = main_scene.get_node_or_null("SettingsBtn")
|
||||
# SettingsBtn signal is handled by main.gd (_toggle_pause_menu).
|
||||
# We only grab the reference here in case touch_controls needs it in future,
|
||||
# but we do NOT connect a second handler to avoid double-toggle.
|
||||
settings_button = main_scene.get_node_or_null("TopMenuUI/SettingsBtn")
|
||||
if not settings_button:
|
||||
settings_button = main_scene.get_node_or_null("SettingsBtn")
|
||||
if not settings_button:
|
||||
# Fallback to local search just in case
|
||||
settings_button = container.get_node_or_null("SettingsBtn")
|
||||
|
||||
if settings_button:
|
||||
print("[TouchControls] Found existing SettingsBtn on main scene")
|
||||
# Ensure it's not hidden by mistake
|
||||
settings_button.visible = true
|
||||
|
||||
if not settings_button.pressed.is_connected(_on_settings_pressed):
|
||||
settings_button.pressed.connect(_on_settings_pressed)
|
||||
# Note: do NOT connect pressed here — main.gd already connects _toggle_pause_menu
|
||||
|
||||
# Always visible now - controlled by settings toggle
|
||||
# Can be hidden via settings if user doesn't want touch controls on desktop
|
||||
|
||||
Reference in New Issue
Block a user