Create NetworkManager, Client, and Hud

This commit is contained in:
2024-12-22 05:56:05 -08:00
parent 5a0d82b0fc
commit 186c2e186e
6 changed files with 276 additions and 0 deletions

27
code/UI/Hud.razor Normal file
View File

@@ -0,0 +1,27 @@
@using System
@inherits PanelComponent
@namespace LuckerParty.UI
<root>
<div class="title">Hello, @_name</div>
</root>
@code
{
private string _name;
protected override void OnAwake()
{
base.OnAwake();
_name = GameObject.GetComponent<Client>().Connection.DisplayName;
}
/// <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( _name );
}
}