feat: introduce core player logic with manager integration and power-up inventory UI.
This commit is contained in:
@@ -40,9 +40,9 @@ func _ready():
|
||||
_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
|
||||
# All skills available with new logic
|
||||
if wall_btn: wall_btn.visible = true
|
||||
if freeze_btn: freeze_btn.visible = true
|
||||
|
||||
print("[PowerUpUI] UI Initialization Complete. Mapped %d buttons." % icon_containers.size())
|
||||
|
||||
@@ -111,21 +111,12 @@ func _setup_btn(effect_id: int, btn: Button):
|
||||
|
||||
# Determine Label Text based on Effect ID
|
||||
var key_text = ""
|
||||
var mode = LobbyManager.get_game_mode()
|
||||
var is_restricted = GameMode.is_restricted(mode)
|
||||
if is_restricted:
|
||||
# Restricted Mapping: 1, 2
|
||||
match effect_id:
|
||||
0: key_text = "1"
|
||||
3: key_text = "2" # Ghost is now 2
|
||||
_: key_text = ""
|
||||
else:
|
||||
# Free Mode Mapping: 1, 2, 3, 4 (Original)
|
||||
match effect_id:
|
||||
0: key_text = "1"
|
||||
2: key_text = "2"
|
||||
1: key_text = "3"
|
||||
3: key_text = "4"
|
||||
# Consistent mapping: 1, 2, 3, 4
|
||||
match effect_id:
|
||||
0: key_text = "1" # Speed
|
||||
2: key_text = "2" # Wall
|
||||
1: key_text = "3" # Freeze
|
||||
3: key_text = "4" # Ghost
|
||||
|
||||
sc_lbl.text = key_text
|
||||
btn.add_child(sc_lbl)
|
||||
|
||||
Reference in New Issue
Block a user