コード例 #1
0
ファイル: Sprite.cs プロジェクト: vtserej/Battleship-XNA-4.0
        static public void DrawBoxFrame(Rectangle rectangle, Color colorBorder, Color colorFill, int frameSize)
        {
            spriteBatch.Draw(EngineContent.GetTextureByName("white"), rectangle, colorBorder);
            Rectangle rect = new Rectangle(rectangle.X + frameSize, rectangle.Y + frameSize,
                                           rectangle.Width - frameSize * 2, rectangle.Height - frameSize * 2);

            spriteBatch.Draw(EngineContent.GetTextureByName("white"), rect, colorFill);
        }
コード例 #2
0
ファイル: Sprite.cs プロジェクト: vtserej/Battleship-XNA-4.0
 static public void DrawSprite(Rectangle rectangle, Color color)
 {
     spriteBatch.Draw(EngineContent.GetTextureByName("white"), rectangle, color);
 }
コード例 #3
0
ファイル: Sprite.cs プロジェクト: vtserej/Battleship-XNA-4.0
 static public void DrawAlphaSprite(Rectangle rectangle, Color color, byte transparency)
 {
     color.A = transparency;
     spriteBatch.Draw(EngineContent.GetTextureByName("white"), rectangle, color);
 }