fix(candy-survival): ensure Ghost mode button is always visible on HUD and syncs correctly on player load

This commit is contained in:
2026-07-08 16:32:30 +08:00
parent c5f691b861
commit 8410679890
2 changed files with 12 additions and 2 deletions
+9 -2
View File
@@ -199,5 +199,12 @@ func _on_inventory_updated(inventory: Dictionary):
power_up_button.modulate = Color.WHITE
_update_btn_shortcut(power_up_button)
else:
power_up_button.visible = false
power_up_button.disabled = true
if LobbyManager.game_mode == "Candy Survival":
power_up_button.visible = true
power_up_button.icon = effect_textures.get(3) # ghost.png
power_up_button.disabled = true
power_up_button.modulate = Color(0.5, 0.5, 0.5, 0.5)
_update_btn_shortcut(power_up_button)
else:
power_up_button.visible = false
power_up_button.disabled = true