mirror of
https://github.com/celisej567/gm_construct_port.git
synced 2026-01-02 13:50:32 +03:00
22 lines
324 B
C#
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()}";
|
|
}
|
|
}
|