feat: fix some bug

This commit is contained in:
2026-04-24 22:56:11 +08:00
parent 8c5004d535
commit b76dd2e737
9 changed files with 105 additions and 156 deletions
+10 -6
View File
@@ -109,6 +109,7 @@ var admin_panel_instance: Control
var current_match_id: String = ""
var leaderboard_panel_instance: Control
var shop_panel_instance: Control
# Bot name tracking keyed by slot index to avoid re-generating on each update
var _bot_names: Dictionary = {}
@@ -787,13 +788,16 @@ func _on_shop_pressed() -> void:
connection_status.text = "Must be logged in"
return
var shop_scene = load("res://scenes/ui/shop_panel.tscn")
if shop_scene:
var shop = shop_scene.instantiate()
add_child(shop)
if not shop_panel_instance:
var shop_scene = load("res://scenes/ui/shop_panel.tscn")
if shop_scene:
shop_panel_instance = shop_scene.instantiate()
add_child(shop_panel_instance)
shop_panel_instance.closed.connect(func(): if main_menu_panel: main_menu_panel.show())
if shop_panel_instance:
if main_menu_panel: main_menu_panel.hide()
shop.closed.connect(func(): if main_menu_panel: main_menu_panel.show())
shop.show_panel()
shop_panel_instance.show_panel()
func _on_banner1_pressed() -> void:
var gacha_scene = load("res://scenes/ui/gacha_panel.tscn")