feat: Implement core game systems including settings management, player input, and initial gameplay mechanics with associated UI.

This commit is contained in:
Yogi Wiguna
2026-03-12 10:35:26 +08:00
parent 4f6783b468
commit 93eda69ad6
10 changed files with 218 additions and 155 deletions
+1 -16
View File
@@ -146,7 +146,7 @@ func _update_btn_shortcut(_effect_id: int, btn: Button):
return
# Show only Shortcut 1 as per single-slot request
sc_lbl.text = "[%s]" % SettingsManager.get_control_text("powerup_1")
sc_lbl.text = "[%s]" % SettingsManager.get_control_text("use_powerup")
func _on_btn_pressed(effect_id: int):
print("[PowerUpUI] Clicked Button %d" % effect_id)
@@ -228,21 +228,6 @@ func _on_powerup_unlocked(effect: int, level: int):
else:
print("[PowerUpUI] ERROR: Unlocked Effect %d but no UI button found! Keys: %s" % [effect, icon_containers.keys()])
func _on_cooldown_updated(effect: int, time_left: float, max_time: float):
if icon_containers.has(effect):
var btn = icon_containers[effect]
var cd_lbl = btn.get_node_or_null("CooldownLabel")
if cd_lbl:
if time_left > 0:
cd_lbl.text = "%d" % int(time_left)
btn.disabled = true
btn.modulate = Color(0.7, 0.7, 0.7, 0.8)
else:
cd_lbl.text = ""
# Re-enable if we own it
if special_manager_ref and special_manager_ref.inventory.get(effect, false):
btn.disabled = false
btn.modulate = Color.WHITE
func _on_inventory_updated(inventory: Dictionary):
# Update UI icons (Only show ONE active slot as per user request)