Added flying bullets

This commit is contained in:
2015-09-17 21:02:27 +02:00
parent bfc181b8a5
commit 18d1aa4977
10 changed files with 144 additions and 26 deletions

View File

@@ -7,19 +7,19 @@ void Main()
{
Image input = Image.FromFile(@"F:\Eigene Dateien\Dropbox\Programming\Java\workspace\Cannon Shooter\data\cannon_barrel_base.png");
Image output = new Bitmap(input.Width * 4, input.Height * 4, PixelFormat.Format32bppArgb);
Image output = new Bitmap(input.Width * 4, input.Height * 8, PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(output))
{
for (int x = 0; x < 4; x++)
{
for (int y = 0; y < 4; y++)
for (int y = 0; y < 8; y++)
{
int idx = y*4 + x;
g.DrawImageUnscaledAndClipped(input, new Rectangle(input.Width * x, input.Height * y, input.Width - idx * 8 - 22, input.Height));
g.DrawImageUnscaledAndClipped(input, new Rectangle(input.Width * x, input.Height * y, input.Width - idx * 4 - 22, input.Height));
g.DrawImage(input, new Rectangle(input.Width * (x+1) - idx * 8 - 22, input.Height * y, 22, input.Height), new Rectangle(input.Width - 22, 0, 22, input.Height), GraphicsUnit.Pixel);
g.DrawImage(input, new Rectangle(input.Width * (x+1) - idx * 4 - 22, input.Height * y, 22, input.Height), new Rectangle(input.Width - 22, 0, 22, input.Height), GraphicsUnit.Pixel);
}
}
}

Binary file not shown.