ui/CountdownDroneHud.razor

A UI Razor component for a countdown HUD shown by the CountdownDrone. It renders the remaining seconds or a "GO!" label when the timer hits zero, and computes a simple build hash from the current displayed seconds.

Networking
@using Sandbox
@using Sandbox.UI
@inherits PanelComponent

<root>
    @if (seconds >= 0)
    {
        <div class="screen">
            @if (seconds == 0)
            {
                <div class="value go">GO!</div>
            }
            else
            {
                <div class="value">@seconds</div>
            }
        </div>
    }
</root>

@code {
    // Computed fresh from GameManager.CountdownTimer on every BuildHash / re-render.
    private int seconds => CountdownDrone.Current?.DisplaySeconds ?? -1;

    protected override int BuildHash() => seconds;
}