basic Party Manager

This commit is contained in:
anonoe 2026-02-15 17:08:46 +01:00
parent c141e6a169
commit 6f1d5ea681
Signed by: anonoe
SSH key fingerprint: SHA256:OnAs6gNQelOnDiY5tBpDYKQiuTgBvnmIdMo5P09cdqg
10 changed files with 158 additions and 8 deletions

22
scripts/ui/PartyHUD.cs Normal file
View file

@ -0,0 +1,22 @@
using Godot;
using System.Linq;
public partial class PartyHUD : CanvasLayer
{
[Export] public NodePath PartyManagerPath { get; set; }
private PartyManager? _party;
private Label _label = null!;
public override void _Ready()
{
_label = GetNode<Label>("PartyLabel");
_party = GetNodeOrNull<PartyManager>(PartyManagerPath);
if (_party == null) GD.PrintErr("PartyHUD: PartyManagerPath not set.");
}
public override void _Process(double delta)
{
if (_party == null) return;
_label.Text = "Party: " + string.Join(", ", _party.PartyCreatureIds.Take(6));
}
}