当前位置: 首页>>代码示例>>C#>>正文


C# IGraphics.DrawObject方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:13,代码来源:Kurage.cs

示例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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:13,代码来源:OrangeEnemy.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:RedEnemy.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:Smoke.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:Funnel.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:TekiBullet.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:Teki.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:Mushi.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:BigExplosionEffect.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:8,代码来源:KurageSpawner.cs

示例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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:13,代码来源:LastBoss.cs

示例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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:22,代码来源:Player.cs

示例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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:20,代码来源:FirstBoss.cs

示例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();
     }
 }
开发者ID:sinshu,项目名称:dtf,代码行数:27,代码来源:Snake.cs

示例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);
 }
开发者ID:sinshu,项目名称:dtf,代码行数:7,代码来源:SnakeBody.cs


注:本文中的IGraphics.DrawObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。