Adding Match State controller

This commit is contained in:
Matt F 2026-05-12 10:31:23 -07:00
parent c100db52e5
commit abcefcd7f1
13 changed files with 445 additions and 99 deletions

View file

@ -8,6 +8,38 @@ namespace TD.Core
/// Player1..Player9 cover the maximum supported player count. Maps using fewer players use a
/// contiguous prefix (e.g., a 3-player map uses Player1, Player2, Player3 only).
/// </remarks>
/// <summary>
/// Global phase of a match, driven by <c>MatchState</c>.
/// </summary>
/// <remarks>
/// Transitions are server-authoritative. Clients react to
/// <c>NetworkVariable&lt;MatchPhase&gt;.OnValueChanged</c>.
/// </remarks>
public enum MatchPhase : byte
{
/// <summary>Pre-match; players are connecting and the server hasn't started the countdown.</summary>
Lobby = 0,
/// <summary>Brief count-down before waves begin. Placement is still allowed.</summary>
CountDown = 1,
/// <summary>Waves are in progress; normal gameplay.</summary>
Playing = 2,
/// <summary>All waves cleared; co-op win state.</summary>
Victory = 3,
/// <summary>All lives lost; co-op defeat state.</summary>
Defeat = 4,
}
/// <summary>
/// Identifies the race a player has chosen in the race-pick phase.
/// Backed by byte. Specific race values are defined in Phase 1.8.
/// </summary>
public enum RaceId : byte
{
/// <summary>No race selected yet (lobby / pre-pick).</summary>
None = 0,
// Race entries added in Phase 1.8.
}
public enum PlayerSlot : byte
{
None = 0,