本文整理汇总了C#中IGraphics.DrawObject方法的典型用法代码示例。如果您正苦于以下问题:C# IGraphics.DrawObject方法的具体用法?C# IGraphics.DrawObject怎么用?C# IGraphics.DrawObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGraphics
的用法示例。
在下文中一共展示了IGraphics.DrawObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Kurage, drawX, drawY, 32, 32, type, waitCount == 0 ? 1 : 0, angle);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.Kurage, drawX, drawY, 32, 32, type, waitCount == 0 ? 1 : 0, angle);
graphics.DisableAddBlend();
}
}
示例2: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.OrangeEnemy, drawX, drawY, 32, 32, 0, 0, angle);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.OrangeEnemy, drawX, drawY, 32, 32, 0, 0, angle);
graphics.DisableAddBlend();
}
}
示例3: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.RedEnemy, drawX, drawY, 32, 32, 0, 0, angle);
}
示例4: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Smoke, drawX, drawY, 32, 32, animation / 4, animation % 4, angle);
}
示例5: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Clipper, drawX, drawY, 32, 32, 1, 0, 0);
}
示例6: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 0, 255, 255);
graphics.DrawObject(Image.Bullet, drawX, drawY, 16, 16, 6, 0, 0);
}
示例7: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, type == 0 ? 255 : 0, type == 1 ? 255 : 0, type == 2 ? 255 : 0);
graphics.DrawObject(Image.Teki, drawX, drawY, 32, 32, 0, 0, angle);
}
示例8: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Mushi, drawX, drawY, 32, 64, type, animation % 3 == 1 ? 1 : 0, angle);
}
示例9: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, r, g, b);
graphics.DrawObject(Image.BigExplosion, drawX, drawY, 64, 64, animation / 4, animation % 4, angle);
}
示例10: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
int a = 15 - animation;
graphics.SetColor(255, type != 0 ? 255 : 128, type == 2 ? 255 : 128, type == 0 ? 255 : 128);
graphics.DrawObject(Image.BigExplosion, drawX, drawY, 64, 64, a / 4, a % 4, angle);
}
示例11: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.LastBoss, drawX, drawY, 64, 64, 0, animation / 2, 0);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.LastBoss, drawX, drawY, 64, 64, 0, animation / 2, 0);
graphics.DisableAddBlend();
}
}
示例12: Draw
public override void Draw(IGraphics graphics)
{
if (isDead)
{
return;
}
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Player, drawX, drawY, 32, 32, 0, 0, 0);
if (warpSpeed > 8)
{
graphics.EnableAddBlend();
int phase = Game.Ticks % 3;
for (int i = 0; i < 11; i++)
{
graphics.SetColor(255, (i + phase) % 3 == 0 ? 255 : 0, (i + phase) % 3 == 1 ? 255 : 0, (i + phase) % 3 == 2 ? 255 : 0);
graphics.DrawObject(Image.Player, drawX, drawY + i * 48 + phase * 16, 32, 32, 0, 0, 0);
}
graphics.DisableAddBlend();
}
}
示例13: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
int angle = (int)Math.Round(3 * Utility.Sin(Game.Ticks * 8));
int index;
index = Game.Ticks / 2 % 6;
if (index > 3)
{
index = 6 - index;
}
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.FirstBoss, drawX, drawY, 128, 64, 0, index, angle);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.FirstBoss, drawX, drawY, 128, 64, 0, index, angle);
graphics.DisableAddBlend();
}
}
示例14: Draw
public override void Draw(IGraphics graphics)
{
foreach (SnakeBody body in bodies)
{
if (body.IsRemoved)
{
continue;
}
body.Draw(graphics);
if (damaged)
{
graphics.EnableAddBlend();
body.Draw(graphics);
graphics.DisableAddBlend();
}
}
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.SnakeHead, drawX, drawY, 64, 64, 0, 0, angle);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.SnakeHead, drawX, drawY, 64, 64, 0, 0, angle);
graphics.DisableAddBlend();
}
}
示例15: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.SnakeBody, drawX, drawY, 64, 32, tail ? 1 : 0, 0, angle);
}