Files
hotdesking/Gameplay/SharkHud.cs
cojoedmo 9057a21613 7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am7-10-25
11:32am7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am7-10-25
11:32am7-10-25 11:32am
2025-07-10 11:31:52 -04:00

26 lines
941 B
C#

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();
}
}