UI/PlayerHud.razor

Razor UI component for the player's HUD. It renders two small panels showing the player's corn points and a timer string, and defines a Property for the Player controller and a BuildHash override for change detection.

@using Sandbox;
@using Sandbox.UI;
@inherits PanelComponent
@namespace Sandbox

<root>
	<div class="totalcorn">
		<p>🌽 @Player.cornpoints</p>
		
	</div>

	

</root>

<root>
<div class="timer">

	<p>🕰️ @Player.GetTimeString()</p>
</div>
</root>



@code
{

	[Property] ChickenControls Player { get; set; }
	
	

	protected override int BuildHash() 
	{
	return System.HashCode.Combine( Player.cornpoints, Player.gametime.ToString() );
	}
}