Files
gm_construct_port/code/ui/Health.cs
2021-08-05 17:54:51 +03:00

22 lines
324 B
C#

using Sandbox;
using Sandbox.UI;
using Sandbox.UI.Construct;
public class Health : Panel
{
public Label Label;
public Health()
{
Label = Add.Label( "100", "value" );
}
public override void Tick()
{
var player = Local.Pawn;
if ( player == null ) return;
Label.Text = $"{player.Health.CeilToInt()}";
}
}