Refactor HUD and MainMenu components to use Node attribute for better scene integration

This commit is contained in:
2025-08-15 03:15:54 +02:00
parent 2cc54f7b37
commit 817bd96433
8 changed files with 29 additions and 41 deletions

View File

@@ -12,9 +12,9 @@ public partial class Hud : Node
public override void _Notification(int what) => this.Notify(what);
[Export] public HealthComponent Health { get; set; } = null!;
[Export] public Label CoinsLabel { get; set; } = null!;
[Export] public ProgressBar HealthBar { get; set; } = null!;
[Export] public Label LivesLabel { get; set; } = null!;
[Node] public Label CoinsLabel { get; set; } = null!;
[Node] public ProgressBar HealthBar { get; set; } = null!;
[Node] public Label LivesLabel { get; set; } = null!;
[Dependency] public PlayerRepository Player => this.DependOn<PlayerRepository>();