コード例 #1
0
ファイル: RenderNameTag.cs プロジェクト: RobotCaleb/OpenRA
        public RenderNameTag(Actor self, RenderNameTagInfo info)
        {
            font = Game.Renderer.Fonts[info.Font];
            color = self.Owner.Color.RGB;

            if (self.Owner.PlayerName.Length > info.MaxLength)
                name = self.Owner.PlayerName.Substring(0, info.MaxLength);
            else
                name = self.Owner.PlayerName;
        }
コード例 #2
0
        public RenderNameTag(Actor self, RenderNameTagInfo info)
        {
            font  = Game.Renderer.Fonts["TinyBold"];
            color = self.Owner.Color.RGB;

            if (self.Owner.PlayerName.Length > info.MaxLength)
            {
                name = self.Owner.PlayerName.Substring(0, info.MaxLength);
            }
            else
            {
                name = self.Owner.PlayerName;
            }
        }