本文整理汇总了C#中MiswGame2007.GraphicsDevice类的典型用法代码示例。如果您正苦于以下问题:C# GraphicsDevice类的具体用法?C# GraphicsDevice怎么用?C# GraphicsDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphicsDevice类属于MiswGame2007命名空间,在下文中一共展示了GraphicsDevice类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:27,代码来源:EggMachine.cs
示例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);
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:HouseBullet.cs
示例3: Draw
public void Draw(GraphicsDevice graphics)
{
foreach (Particle particle in particles)
{
particle.Draw(graphics);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:ParticleList.cs
示例4: Draw
public void Draw(GraphicsDevice graphics)
{
foreach (Thing thing in things)
{
thing.Draw(graphics);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:ThingList.cs
示例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);
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:34,代码来源:EndingScene.cs
示例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);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:GameSceneForTitleScene.cs
示例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);
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:29,代码来源:House.cs
示例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));
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:PlayerRocket.cs
示例9: Draw
public void Draw(GraphicsDevice graphics)
{
foreach (Bullet bullet in bullets)
{
bullet.Draw(graphics);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:7,代码来源:BulletList.cs
示例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);
}
开发者ID:sinshu,项目名称:chaos,代码行数:9,代码来源:FatherGhost.cs
示例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));
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:10,代码来源:GameScene20.cs
示例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);
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:13,代码来源:ExitDoor.cs
示例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);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:13,代码来源:AtField.cs
示例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);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:13,代码来源:BlackDebris.cs
示例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);
}
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:51,代码来源:Kyoro.cs
示例16: 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);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:14,代码来源:OyajiThunder.cs
示例17: Draw
public override void Draw(GraphicsDevice graphics)
{
if (!background)
{
int drawX = (int)Math.Round(position.X) - game.IntCameraX;
int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 32;
graphics.DrawImageAlpha(GameImage.Rain, 1, 64, 0, 0, drawX, drawY, 64);
}
else
{
int drawX = (int)Math.Round(position.X) + game.IntBackgroundX;
int drawY = (int)Math.Round(position.Y) + game.IntBackgroundY - 32;
graphics.DrawImageAlpha(GameImage.Rain, 1, 64, 0, 1, drawX, drawY, 32);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:15,代码来源:Rain.cs
示例18: 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 / 2;
graphics.DrawImageFix(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
}
else
{
int textureCol = animation / 2;
graphics.DrawImageFixFlip(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:15,代码来源:TestEnemy.cs
示例19: 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);
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:17,代码来源:FatherBullet.cs
示例20: MiswGame2007Application
public MiswGame2007Application()
{
{
FileArchiverZip zip = new FileArchiverZip();
zip.ZipExtName = ".btw";
FileSys.Archiver.Add(zip);
}
UnmanagedResourceManager.Instance.VideoMemory.LimitSize = 64 * 1024 * 1024;
settings = new Settings("settings.cfg");
CreateWindow(settings.Fullscreen);
inputDevice = new InputDevice(!settings.Fullscreen, settings.JumpButton, settings.AttackButton, settings.StartButton);
graphicsDevice = new GraphicsDevice(window);
audioDevice = new AudioDevice();
LoadStageData();
title = new TitleScene(0, settings.ArcadeMode);
title.AudioDevice = audioDevice;
currentState = State.Title;
currentStageIndex = settings.StartStageIndex;
if (settings.StartStageIndex < settings.NumUnlockedStages)
{
numUnlockedStages = settings.NumUnlockedStages;
}
else
{
numUnlockedStages = settings.StartStageIndex + 1;
}
if (numUnlockedStages < 25)
{
numUnlockedStages = 25;
}
log = null;
if (settings.ArcadeMode)
{
for (int i = 1; i <= 9999; i++)
{
if (!File.Exists("log" + (10000 + i).ToString().Substring(1) + ".txt"))
{
log = new StreamWriter("log" + (10000 + i).ToString().Substring(1) + ".txt");
break;
}
}
}
}
开发者ID:sinshu,项目名称:chaos,代码行数:46,代码来源:MiswGame2007Application.cs
注:本文中的MiswGame2007.GraphicsDevice类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论