@using Sandbox; @using Sandbox.UI; @namespace MurderGame @inherits Panel
@GetTeamName()
@GetTeamDescription()
@code { public string GetTeamName() { if (Game.LocalPawn is Player player) { return TeamOperations.GetTeamName(player.CurrentTeam); } return ""; } public string GetTeamDescription() { if (Game.LocalPawn is Player player) { return TeamOperations.GetTeamDescription(player.CurrentTeam); } return ""; } public string GetTeamColour() { if (Game.LocalPawn is Player player) { return TeamOperations.GetTeamColour(player.CurrentTeam); } return ""; } public static RoleOverlay Instance { get; private set; } public bool ShowOverlay { get; set; } = false; public RoleOverlay() { SetClass( "hidden", true ); Instance = this; } protected override int BuildHash() { return ShowOverlay.GetHashCode(); } }