feat: Implement the new Stop N Go game mode with dedicated managers, models, and UI.

This commit is contained in:
Yogi Wiguna
2026-02-26 11:29:58 +08:00
parent 3cd67c02ab
commit c57b045bef
7 changed files with 36 additions and 24 deletions
+9 -6
View File
@@ -31,8 +31,10 @@ func _ready():
_setup_btn(1, container.get_node_or_null("FreezeAreaBtn"))
var wall_btn = container.get_node_or_null("WallBtn")
_setup_btn(2, wall_btn)
if wall_btn and LobbyManager.game_mode == "Stop n Go":
wall_btn.visible = false # Hide Wall Power-up only in Stop n Go
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
if wall_btn and is_restricted:
wall_btn.visible = false # Hide Wall Power-up in restricted modes
_setup_btn(3, container.get_node_or_null("GhostBtn"))
print("[PowerUpUI] UI Initialization Complete. Mapped %d buttons." % icon_containers.size())
@@ -107,12 +109,13 @@ func _setup_btn(effect_id: int, btn: Button):
# Determine Label Text based on Effect ID
var key_text = ""
if LobbyManager.game_mode == "Stop n Go":
# Stop n Go Mapping: 1, 2, 3 (No Wall)
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
if is_restricted:
# Restricted Mapping: 1, 2, 3 (No Wall)
match effect_id:
0: key_text = "1"
1: key_text = "2"
3: key_text = "3"
1: key_text = "2" # Freeze is now 2
3: key_text = "3" # Ghost is now 3
else:
# Free Mode Mapping: 1, 2, 3, 4 (Original)
match effect_id: