feat: Implement initial main game scene including game world, player UI, and touch controls, along with a new UI manager script and ranking graphic asset.
This commit is contained in:
@@ -230,14 +230,19 @@ func _connect_powerup_manager_deferred(player):
|
||||
# =============================================================================
|
||||
|
||||
var powerup_bar: PanelContainer
|
||||
var powerup_ready_rect: TextureRect
|
||||
var powerup_segments: Array = []
|
||||
|
||||
func setup_powerup_bar_ui(main_node):
|
||||
"""Get reference to existing PowerUpBar in scene and cache segment references."""
|
||||
powerup_bar = main_node.get_node_or_null("PowerUpBar")
|
||||
powerup_bar = main_node.get_node_or_null("PowerBar/PowerUpBar")
|
||||
if not powerup_bar:
|
||||
powerup_bar = main_node.get_node_or_null("PowerUpBar")
|
||||
if not powerup_bar:
|
||||
push_warning("PowerUpBar node not found in scene")
|
||||
return
|
||||
|
||||
powerup_ready_rect = main_node.get_node_or_null("PowerBar/PowerUpReady")
|
||||
|
||||
# Get segment references from scene
|
||||
powerup_segments.clear()
|
||||
@@ -276,6 +281,12 @@ func update_powerup_bar(current_points: int, _max_points: int):
|
||||
style.texture = load(tex_path)
|
||||
|
||||
segment.add_theme_stylebox_override("panel", style)
|
||||
|
||||
if powerup_ready_rect:
|
||||
if current_points >= _max_points and _max_points > 0:
|
||||
powerup_ready_rect.visible = true
|
||||
else:
|
||||
powerup_ready_rect.visible = false
|
||||
|
||||
var _previous_bars: int = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user