本文整理汇总了C#中MiswGame2007.GraphicsDevice类的典型用法代码示例。如果您正苦于以下问题:C# GraphicsDevice类的具体用法?C# GraphicsDevice怎么用?C# GraphicsDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphicsDevice类属于MiswGame2007命名空间,在下文中一共展示了GraphicsDevice类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
{
if (idle)
{
graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
}
}
else
{
if (idle)
{
graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
}
}
}
示例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 void Draw(GraphicsDevice graphics)
{
foreach (Particle particle in particles)
{
particle.Draw(graphics);
}
}
示例4: Draw
public void Draw(GraphicsDevice graphics)
{
foreach (Thing thing in things)
{
thing.Draw(graphics);
}
}
示例5: Draw
public void Draw(GraphicsDevice graphics)
{
if (numTicks < 128)
{
int color = 255 - 2 * numTicks;
graphics.FillScreen(color, color, color, 255);
}
else
{
graphics.FillScreen(0, 0, 0, 255);
}
DrawMessage(4 * 60, 16 * 60, 0, graphics, Message.ChaoslugStaff);
DrawMessage(16 * 60, 24 * 60, 0, graphics, Message.ProjectLeader, Message.Macoto);
DrawMessage(24 * 60, 32 * 60, 0, graphics, Message.Program, Message.Sinshu);
DrawMessage(32 * 60, 40 * 60, 0, graphics, Message.Music, Message.Yutaka, Message.Yousuke, Message.Sinshu);
DrawMessage(40 * 60, 48 * 60, 0, graphics, Message.Graphics, Message.Macoto, Message.Sinshu, Message.Iori);
DrawMessage(48 * 60, 56 * 60, 0, graphics, Message.StageConstruction, Message.Crimson, Message.Zhon, Message.Tetsu, Message.Sinshu);
DrawMessage(56 * 60, 64 * 60, 0, graphics, Message.Voice, Message.Zhon);
DrawMessage(64 * 60, 72 * 60, 0, graphics, Message.SpecialThanks, Message.MiswMember);
DrawMessage(72 * 60, 88 * 60, -128, graphics, Message.ThankYouForPlaying);
DrawPenguin(72 * 60, 88 * 60, 32, graphics);
if (forceExit)
{
if (forceExitCount < 16)
{
graphics.FillScreen(0, 0, 0, 16 * forceExitCount);
}
else
{
graphics.FillScreen(0, 0, 0, 255);
}
}
}
示例6: DrawSomething
public override void DrawSomething(GraphicsDevice graphics)
{
if (showTitle)
{
graphics.DrawImage(GameImage.Title, 512, 256, (Settings.SCREEN_WIDTH - 512) / 2 - IntCameraX + 16, (Settings.SCREEN_HEIGHT - 256) / 2 - IntCameraY + 16);
}
}
示例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 (direction == Direction.Left)
{
int textureCol = animation / 4;
if (openCount == -1)
{
graphics.DrawImageFix(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
}
}
else
{
int textureCol = animation / 4;
if (openCount == -1)
{
graphics.DrawImageFixFlip(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
}
}
}
示例8: 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.DrawImageRotate(GameImage.PlayerBullet, 32, 32, 1, animation, drawX, drawY, 28, 16, (int)Math.Round(direction));
}
示例9: Draw
public void Draw(GraphicsDevice graphics)
{
foreach (Bullet bullet in bullets)
{
bullet.Draw(graphics);
}
}
示例10: 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);
}
示例11: 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));
}
}
示例12: Draw2
public void Draw2(GraphicsDevice graphics)
{
if (playerExited)
{
int drawX = (int)Math.Round(position.X - game.IntCameraX);
int drawY = (int)Math.Round(position.Y - game.IntCameraY);
if (slideCount > 0)
{
graphics.DrawImage2(GameImage.Block, 76 + slideCount, 196, 20 - slideCount, 60, drawX + 12, drawY + 4);
graphics.DrawImage2(GameImage.Block, 96, 196, 20 - slideCount, 60, drawX + 32 + slideCount, drawY + 4);
}
}
}
示例13: 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);
}
}
示例14: Draw
public override void Draw(GraphicsDevice graphics)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX - 8;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 8;
if (animation < 48)
{
graphics.DrawImage(GameImage.Debris, 16, 16, type, animation / 2 % 8, drawX, drawY, 64, 64, 64);
}
else
{
graphics.DrawImageAlpha(GameImage.Debris, 16, 16, type, animation / 2 % 8, drawX, drawY, 255 - 16 * (animation - 48), 64, 64, 64);
}
}
示例15: 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)
{
int textureCol = animation / 4;
if (!attacking)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
if (attackCount < 8)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
}
else if (attackCount < 24)
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
}
else
{
graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
}
}
}
else
{
int textureCol = animation / 4;
if (!attacking)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
}
else
{
if (attackCount < 8)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
}
else if (attackCount < 24)
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
}
else
{
graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
}
}
}
}