Beispiel #1
0
        public void Draw()
        {
            if (!Visible)
            {
                return;
            }
            if (Transparency == 0)
            {
                return;
            }
            if (Sprite == 0)
            {
                return;
            }

            MouseButtons();

            ProcessMovement();
            ProcessAnimation();

            EngineCore.SpriteDevice.Begin(SpriteFlags);
            EngineCore.SpriteDevice.Draw(EngineTexture.FindTextureByID(Sprite, EngineTextureType.Sprites), new Color(Color.R, Color.G, Color.B, Transparency), SourceRect, new Vector3(0, 0, 0), new Vector3(PositionX, PositionY, 0));
            EngineCore.SpriteDevice.End();

            EngineFont.DrawText(Name, new Size2(30, 0), new Point(PositionX, PositionY - 5), Color.White, EngineFontStyle.Regular, FontDrawFlags.Center);
            EngineFont.DrawText(Legion, new Size2(30, 0), new Point(PositionX, PositionY - 20), Color.BlueViolet, EngineFontStyle.Bold, FontDrawFlags.Center);
        }
Beispiel #2
0
 /// <summary>
 /// Desenha o slot.
 /// </summary>
 /// <param name="texture"></param>
 public override void Draw(Texture texture)
 {
     EngineCore.SpriteDevice.Begin(SpriteFlags.AlphaBlend);
     EngineCore.SpriteDevice.Draw(texture, Color, SourceRect, null, _position);
     if (IconID > 0)
     {
         EngineCore.SpriteDevice.Draw(EngineTexture.FindTextureByID(IconID, EngineTextureType.Icons), _iconColor, null, null, new Vector3(_position.X + 4, _position.Y + 4, 0));
     }
     EngineCore.SpriteDevice.End();
 }