UI/TutorialHealthArmorPanel.razor

A simple Razor UI panel that displays player health and armor values. It defines two float properties, Health and Armor, with default 100, and renders them in basic divs; BuildHash returns a combined hash of those values.

@using Sandbox;
@using Sandbox.UI;

<root>
	<div class="column InfoHud">
		<div class="health">HP: @Health</div>
	  	<div class="armor">Armor: @Armor</div>
	</div>
</root>

@code
{
	// https://sbox.game/dev/doc/ui/razor-panels/
	public float Health { get; set; } = 100f;
	public float Armor { get; set; } = 100f;

	protected override int BuildHash() => System.HashCode.Combine( Health, Armor );
}