本文整理汇总了C#中MiswGame2007.GraphicsDevice.DrawImageAdd方法的典型用法代码示例。如果您正苦于以下问题:C# GraphicsDevice.DrawImageAdd方法的具体用法?C# GraphicsDevice.DrawImageAdd怎么用?C# GraphicsDevice.DrawImageAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MiswGame2007.GraphicsDevice
的用法示例。
在下文中一共展示了GraphicsDevice.DrawImageAdd方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (direction == Direction.Left)
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 128, 1, animation / 2, drawX - 16, drawY, energy < 16 ? 16 * energy : 255);
}
else
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 128, 1, animation / 2, drawX + 16, drawY, energy < 16 ? 16 * energy : 255);
}
}
示例2: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 0, 0, drawX - 16, drawY - 16, 255);
}
示例3: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int r = (color <= 1 || color == 5) ? 255 : 0;
int g = (color >= 3 && color <= 5) ? 255 : 0;
int b = (color >= 1 && color <= 3) ? 255 : 0;
graphics.DrawImageAdd(GameImage.Father, 128, 256, 0, 0, drawX, drawY, 255 - 32 * animation, r, g, b);
}
示例4: DrawBackground
public override void DrawBackground(GraphicsDevice graphics)
{
graphics.DrawImage(GameImage.Background4, 1024, 512, IntBackgroundX, IntBackgroundY, 64, 64, 64);
for (int i = 0; i < 512; i++)
{
int y = (int)Math.Round(16 * Math.Sin(2 * Math.PI * (i + 0.5 * Ticks) / 128));
int color = i + 2 * Ticks;
graphics.DrawImageAdd(GameImage.Aurora, 2, 256, 0, i, IntBackgroundX + 2 * i, y, 128, GetAuroraColorR(color), GetAuroraColorG(color), GetAuroraColorB(color));
}
}
示例5: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) + game.IntBackgroundX;
int drawY = (int)Math.Round(position.Y) + game.IntBackgroundY;
if (big)
{
if (!exploding)
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 1, 0, drawX - 16, drawY - 16, 255, GetRed(), GetGreen(), GetBlue());
}
else
{
if (!flip)
{
graphics.DrawImageAdd(GameImage.BigHanabi, 256, 256, animation / 2 / 4, animation / 2 % 4, drawX - 128, drawY - 128, 255, GetRed(), GetGreen(), GetBlue());
}
else
{
graphics.DrawImageAddFlipRotate90(GameImage.BigHanabi, 256, 256, animation / 2 / 4, animation / 2 % 4, drawX - 128, drawY - 128, 1, GetRed(), GetGreen(), GetBlue());
}
}
}
else
{
if (!exploding)
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 1, 1, drawX - 16, drawY - 16, 255, GetRed(), GetGreen(), GetBlue());
}
else
{
if (!flip)
{
graphics.DrawImageAdd(GameImage.SmallHanabi, 128, 128, animation / 2 / 4, animation / 2 % 4, drawX - 64, drawY - 64, 255, GetRed(), GetGreen(), GetBlue());
}
else
{
graphics.DrawImageAddFlipRotate90(GameImage.SmallHanabi, 128, 128, animation / 2 / 4, animation / 2 % 4, drawX - 64, drawY - 64, 1, GetRed(), GetGreen(), GetBlue());
}
}
}
}
示例6: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (part == 0)
{
graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 2, (animation / 2 % 8) * 2, drawX - 16, drawY - 64, 255 - animation * 8);
}
else if (part == 1)
{
graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 2, (animation / 2 % 8) * 2 + 1, drawX, drawY - 64, 255 - animation * 8);
}
else if (part == 2)
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 16, 64, 3, (animation / 2 % 8) * 2, drawX - 16, drawY, 255 - animation * 8);
}
else
{
graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 3, (animation / 2 % 8) * 2 + 1, drawX, drawY, 255 - animation * 8);
}
}
示例7: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
if (animation < 32)
{
graphics.DrawRect(drawX - 2, drawY - 512, 4, 512, animation % 2 == 0 ? 255 : 0, 255, 255, 4 * animation);
graphics.DrawRect(drawX - 1, drawY - 512, 2, 512, animation % 2 == 0 ? 255 : 0, 255, 255, 8 * animation);
}
else
{
graphics.DrawImageAdd(GameImage.OyajiThunder, 32, 512, 0, animation / 2 % 8, drawX - 16, drawY - 512, 255 - 16 * (animation - 32), animation % 2 == 0 ? 255 : 0, 255, 255);
}
}
示例8: Draw
public void Draw(GraphicsDevice graphics)
{
graphics.FillScreen(0, 0, 0, 192);
graphics.DrawImageAdd(GameImage.Message, 256, 32, 3, 0, (Settings.SCREEN_WIDTH - 256) / 2, Settings.SCREEN_HEIGHT / 2 - 80, 255);
if (currentStageIndex + 1 < 10)
{
graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, currentStageIndex + 1, (Settings.SCREEN_WIDTH - 32) / 2, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
}
else
{
graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, (currentStageIndex + 1) / 10, (Settings.SCREEN_WIDTH - 64) / 2, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, (currentStageIndex + 1) % 10, (Settings.SCREEN_WIDTH - 64) / 2 + 32, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
}
if (currentStageIndex > 0)
{
graphics.DrawImage(GameImage.Hud, 32, 32, 0, 0, Settings.SCREEN_WIDTH / 2 - 80, Settings.SCREEN_HEIGHT / 2 - 16);
}
if (currentStageIndex + 1 < numUnlockedStages)
{
graphics.DrawImage(GameImage.Hud, 32, 32, 0, 4, Settings.SCREEN_WIDTH / 2 + 48, Settings.SCREEN_HEIGHT / 2 - 16);
}
if (gotoGameCount > 0)
{
if (gotoGameCount < 16)
{
graphics.FillScreen(255, 255, 255, 16 * gotoGameCount);
}
else
{
graphics.FillScreen(255, 255, 255, 255);
}
}
}
示例9: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
int r = (color <= 1 || color == 5) ? 255 : 0;
int g = (color >= 3 && color <= 5) ? 255 : 0;
int b = (color >= 1 && color <= 3) ? 255 : 0;
if (stateCount < timer)
{
graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 2, stateCount / 2 % 8, drawX - 16, drawY - 16, 255, r, g, b);
}
else
{
graphics.DrawImageRotateAdd(GameImage.EnemyBullet, 64, 32, 0, 3, drawX, drawY, 48, 16, (int)Math.Round(direction * 180 / Math.PI), 255, r, g, b);
}
}
示例10: DrawMessage
private void DrawMessage(int beginTick, int endTick, int dy, GraphicsDevice graphics, Message message)
{
if (numTicks < beginTick)
{
return;
}
if (endTick < numTicks)
{
return;
}
int alpha = 255;
if (numTicks < (beginTick + endTick) / 2)
{
if (numTicks - beginTick < 64)
{
alpha = 4 * (numTicks - beginTick);
}
}
else if ((beginTick + endTick) / 2 < numTicks)
{
if (endTick - numTicks < 64)
{
alpha = 4 * (endTick - numTicks);
}
}
switch (message)
{
case Message.Macoto:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 0, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Sinshu:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 1, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Zhon:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 2, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Crimson:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 3, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Iori:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 4, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Yutaka:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 5, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Yousuke:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 6, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Tetsu:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 7, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.MiswMember:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 8, 0, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.ProjectLeader:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 0, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Program:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 1, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Music:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 2, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Graphics:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 3, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.StageConstruction:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 4, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.Voice:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 5, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.SpecialThanks:
graphics.DrawImageAdd(GameImage.Staff, 256, 32, 6, 1, (Settings.SCREEN_WIDTH - 256) / 2, (Settings.SCREEN_HEIGHT - 32) / 2 + dy, alpha);
break;
case Message.ChaoslugStaff:
graphics.DrawImageAdd(GameImage.Staff, 512, 64, 6, 0, (Settings.SCREEN_WIDTH - 512) / 2, (Settings.SCREEN_HEIGHT - 64) / 2 + dy, alpha);
break;
case Message.ThankYouForPlaying:
graphics.DrawImageAdd(GameImage.Staff, 512, 64, 7, 0, (Settings.SCREEN_WIDTH - 512) / 2, (Settings.SCREEN_HEIGHT - 64) / 2 + dy, alpha);
break;
}
}
示例11: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX - 32;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 32;
graphics.DrawImageAdd(GameImage.ItemExplosion, 64, 64, animation / 8, animation % 8, drawX, drawY, 255);
}
示例12: Draw
public void Draw(GraphicsDevice graphics)
{
int topRow = game.IntCameraY / Settings.BLOCK_WDITH;
int bottomRow = (game.IntCameraY + Settings.SCREEN_HEIGHT) / Settings.BLOCK_WDITH;
int leftCol = game.IntCameraX / Settings.BLOCK_WDITH;
int rightCol = (game.IntCameraX + Settings.SCREEN_WIDTH) / Settings.BLOCK_WDITH;
for (int row = topRow; row <= bottomRow; row++)
{
for (int col = leftCol; col <= rightCol; col++)
{
int block = this[row, col];
if (block > 0)
{
int drawX = col * Settings.BLOCK_WDITH - game.IntCameraX;
int drawY = row * Settings.BLOCK_WDITH - game.IntCameraY;
int textureRow = block / 8;
int textureCol = block % 8;
if (block != 16 && block != 24)
{
graphics.DrawImage(GameImage.Block, Settings.BLOCK_WDITH, Settings.BLOCK_WDITH, textureRow, textureCol, drawX, drawY);
}
else
{
if (block == 16)
{
graphics.DrawImageAlpha(GameImage.Block, Settings.BLOCK_WDITH, Settings.BLOCK_WDITH, textureRow, textureCol, drawX, drawY, 128);
}
else
{
graphics.DrawImageAdd(GameImage.Block, Settings.BLOCK_WDITH, Settings.BLOCK_WDITH, textureRow, textureCol, drawX, drawY, 64);
}
}
}
}
}
}
示例13: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX - 16;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 16;
graphics.DrawImageAdd(GameImage.PlayerBullet, 32, 32, animation / 2 / 8 + 6, animation / 2 % 8, drawX, drawY, 192);
}
示例14: Draw
public void Draw(GraphicsDevice graphics)
{
game.Draw(graphics);
if (numTicks < 16)
{
graphics.FillScreen(0, 0, 0, 255 - numTicks * 16);
}
if (numTicks == 165)
{
graphics.FillScreen(255, 255, 255, 255);
}
if (numTicks > 180)
{
for (int i = 0; i < 3; i++)
{
graphics.DrawImageAdd(GameImage.Message, 256, 32, i, 0, (Settings.SCREEN_WIDTH - 256) / 2, Settings.SCREEN_HEIGHT / 2 + 112 + 32 * i, (i <= 1 || !arcadeMode) ? 255 : 32);
}
graphics.DrawImage(GameImage.Hud, 32, 32, 0, 4, (Settings.SCREEN_WIDTH - 256) / 2 - 32 + 48, Settings.SCREEN_HEIGHT / 2 + 112 + currentSelectIndex * 32);
graphics.DrawImage(GameImage.Hud, 32, 32, 0, 0, (Settings.SCREEN_WIDTH - 256) / 2 + 256 - 48, Settings.SCREEN_HEIGHT / 2 + 112 + currentSelectIndex * 32);
}
if (gotoGameCount > 0)
{
if (gotoGameCount < 16)
{
graphics.FillScreen(255, 255, 255, 16 * gotoGameCount);
}
else
{
graphics.FillScreen(255, 255, 255, 255);
}
}
if (exitCount > 0)
{
if (exitCount < 16)
{
graphics.FillScreen(0, 0, 0, 16 * exitCount);
}
else
{
graphics.FillScreen(0, 0, 0, 255);
}
}
}