Compare commits
2 Commits
9e2fdafa48
...
10c6caca0d
| Author | SHA1 | Date | |
|---|---|---|---|
| 10c6caca0d | |||
| 0fffa21ff1 |
22
code/GameManager.cs
Normal file
22
code/GameManager.cs
Normal 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
20
code/UI/Lobby.razor
Normal 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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user