Ejemplo n.º 1
0
        public virtual void Update()
        {
            if (Client == null)
            {
                return;
            }

            PlayerName = Client.Name;
            Score      = Client.GetInt("score").ToString();
            Karma      = Client.GetInt("karma").ToString();

            SetClass("me", Client == Local.Client);

            PlayerAvatar.SetTexture($"avatar:{Client.PlayerId}");

            if (Client.Pawn is Player player && player.Role is not NoneRole && player.Role is not InnocentRole)
            {
                Style.BackgroundColor = player.Role.Color.WithAlpha(0.15f);
            }