feat: Add core manager scripts for camera context, player input, special tiles, and a powerup inventory UI.
This commit is contained in:
@@ -27,16 +27,22 @@ func _ready():
|
||||
# 14: INVISIBLE_MODE (3) -> GhostBtn
|
||||
|
||||
# We use 0, 1, 2, 3 to match SpecialTilesManager.SpecialEffect enum
|
||||
_setup_btn(0, container.get_node_or_null("SpeedBtn"))
|
||||
_setup_btn(1, container.get_node_or_null("FreezeAreaBtn"))
|
||||
var speed_btn = container.get_node_or_null("SpeedBtn")
|
||||
var freeze_btn = container.get_node_or_null("FreezeAreaBtn")
|
||||
var wall_btn = container.get_node_or_null("WallBtn")
|
||||
_setup_btn(2, wall_btn)
|
||||
var ghost_btn = container.get_node_or_null("GhostBtn")
|
||||
|
||||
var mode = LobbyManager.get_game_mode()
|
||||
var is_restricted = GameMode.is_restricted(mode)
|
||||
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"))
|
||||
|
||||
_setup_btn(0, speed_btn)
|
||||
_setup_btn(1, freeze_btn)
|
||||
_setup_btn(2, wall_btn)
|
||||
_setup_btn(3, ghost_btn)
|
||||
|
||||
if is_restricted:
|
||||
if wall_btn: wall_btn.visible = false
|
||||
if freeze_btn: freeze_btn.visible = false
|
||||
|
||||
print("[PowerUpUI] UI Initialization Complete. Mapped %d buttons." % icon_containers.size())
|
||||
|
||||
@@ -108,11 +114,11 @@ func _setup_btn(effect_id: int, btn: Button):
|
||||
var mode = LobbyManager.get_game_mode()
|
||||
var is_restricted = GameMode.is_restricted(mode)
|
||||
if is_restricted:
|
||||
# Restricted Mapping: 1, 2, 3 (No Wall)
|
||||
# Restricted Mapping: 1, 2
|
||||
match effect_id:
|
||||
0: key_text = "1"
|
||||
1: key_text = "2" # Freeze is now 2
|
||||
3: key_text = "3" # Ghost is now 3
|
||||
3: key_text = "2" # Ghost is now 2
|
||||
_: key_text = ""
|
||||
else:
|
||||
# Free Mode Mapping: 1, 2, 3, 4 (Original)
|
||||
match effect_id:
|
||||
|
||||
Reference in New Issue
Block a user