當前位置: 首頁>>代碼示例>>C#>>正文


C# MiswGame2007.GraphicsDevice類代碼示例

本文整理匯總了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);
         }
     }
 }
開發者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


注:本文中的MiswGame2007.GraphicsDevice類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。