Files
skelly/scenes/ui/DebugMenu.gd
Vladimir nett00n Budylnikov ea8c85d7ad feature/match3/move-gems (#7)
Reviewed-on: #7
Co-authored-by: Vladimir nett00n Budylnikov <git@nett00n.org>
Co-committed-by: Vladimir nett00n Budylnikov <git@nett00n.org>
2025-09-25 11:48:08 +02:00

30 lines
847 B
GDScript

extends DebugMenuBase
func _find_target_scene():
# Fixed: Search more thoroughly for match3 scene
if match3_scene:
# Already found, stop searching
_stop_search_timer()
return
# Search in current scene tree
var current_scene = get_tree().current_scene
if current_scene:
# Try to find match3 by script path first
match3_scene = _find_node_by_script(current_scene, target_script_path)
# Fallback: search by common node names
if not match3_scene:
for possible_name in ["Match3", "match3", "Match3Game"]:
match3_scene = current_scene.find_child(possible_name, true, false)
if match3_scene:
break
if match3_scene:
DebugManager.log_debug("Found match3 scene: " + match3_scene.name, log_category)
_update_ui_from_scene()
_stop_search_timer()
else:
# Continue searching if not found
_start_search_timer()