using Godot; using System; public partial class SharkHud : CanvasLayer { public void LoadCog(Shark shark) { RichTextLabel name = (RichTextLabel)GetNode("CogName"); Sprite2D sprite = (Sprite2D)GetNode("Icon"); RichTextLabel health = (RichTextLabel)GetNode("HealthValue"); RichTextLabel energy = (RichTextLabel)GetNode("EnergyValue"); RichTextLabel bandwidth = (RichTextLabel)GetNode("BandwidthValue"); RichTextLabel healthMax = (RichTextLabel)GetNode("HealthMax"); RichTextLabel energyMax = (RichTextLabel)GetNode("EnergyMax"); RichTextLabel bandwidthMax = (RichTextLabel)GetNode("BandwidthMax"); name.Text = shark._name; health.Text = shark._health.ToString(); energy.Text = shark._energy.ToString(); bandwidth.Text = shark._turnBandwidth.ToString(); healthMax.Text = shark._healthMax.ToString(); energyMax.Text = shark._energyMax.ToString(); bandwidthMax.Text = shark._turnBandwidthMax.ToString(); } }