Files
LuckerGame/code/UI/Hud.razor

28 lines
490 B
Plaintext

@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 );
}
}