A UI Razor component for the top bar HUD that shows the game mode time-left label when non-empty. It inherits Panel, uses a style sheet attribute, and forces re-render by returning a hash based on Time.Now.
@namespace KOTH.UI
@inherits Panel
@attribute [StyleSheet]
<root>
@if (GameMode.Instance.GetTimeLeftString() != "")
{
<label class="timer">@(GameMode.Instance.GetTimeLeftString())</label>
}
</root>
@code
{
protected override int BuildHash()
{
return HashCode.Combine(Time.Now);
}
}