Compare commits

2 Commits

Author SHA1 Message Date
10c6caca0d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	code/UI/Lobby.razor
2024-12-23 03:17:01 -08:00
0fffa21ff1 Refactors, Introduce GameManager, Lobby work, Docs 2024-12-23 03:16:30 -08:00
2 changed files with 42 additions and 0 deletions

22
code/GameManager.cs Normal file
View File

@@ -0,0 +1,22 @@
namespace LuckerParty;
/// <summary>
/// Manages the Game state, which right now is either Lobby or Round.
/// Maintains the lifecycle of the Lobby and Round Managers.
/// </summary>
public sealed class GameManager : Component
{
public enum State
{
Lobby,
Round
}
public State CurrentState { get; private set; } = State.Lobby;
protected override void OnStart()
{
// Start Lobby
GameObject.AddComponent<LobbyManager>();
}
}

20
code/UI/Lobby.razor Normal file
View File

@@ -0,0 +1,20 @@
@namespace LuckerParty.UI
@using System
@inherits PanelComponent
<root>
<div class="title">This is the Lobby</div>
</root>
@code
{
public List<Client> Clients { get; set; }
/// <summary>
/// the hash determines if the system should be rebuilt. If it changes, it will be rebuilt
/// </summary>
protected override int BuildHash()
{
return HashCode.Combine( Clients );
}
}