예제 #1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            foreach (KeyValuePair <Texture2D, Rectangle> pair in graphicHolder)
            {
                spriteBatch.Draw(pair.Key, pair.Value, Color.White);
            }

            // display column 1
            foreach (KeyValuePair <ICommands, string> pair in columnOne)
            {
                spriteBatch.DrawString(font, pair.Value, Column1StartingPosition + (adjust * menuNumber), Color.Black);
                menuNumber++;
            }
            menuNumber = 0;

            // display column 2
            foreach (KeyValuePair <ICommands, string> pair in columnTwo)
            {
                spriteBatch.DrawString(font, pair.Value, Column2StartingPosition + (adjust * menuNumber), Color.Black);
                menuNumber++;
            }
            menuNumber = 0;

            arrow.Draw(spriteBatch, arrowStartingPosition + (adjust * selection), Color.White);
        }
예제 #2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     game.level.Draw(spriteBatch);
     if (setLogo)
     {
         logo.Draw(spriteBatch, new Vector2(100, 280), Color.White);
     }
     menu.Draw(spriteBatch);
 }
예제 #3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     foreach (Tile tile in levelBackground)
     {
         if (game.camera.IsInView(tile.GetBoundingBox()))
         {
             tile.Draw(spriteBatch, tile.position, Color.White);
         }
     }
     foreach (Ledge ledge in levelLedges)
     {
         if (game.camera.IsInView(ledge.GetBoundingBox()))
         {
             ledge.Draw(spriteBatch, ledge.position, Color.White);
         }
     }
     foreach (Tile tile in levelTiles)
     {
         if (game.camera.IsInView(tile.GetBoundingBox()))
         {
             tile.Draw(spriteBatch, tile.position, Color.White);
         }
     }
     foreach (Grass grass in levelGrass)
     {
         if (game.camera.IsInView(grass.GetBoundingBox()))
         {
             grass.Draw(spriteBatch, grass.position, Color.White);
         }
     }
     foreach (Building building in levelBuildings)
     {
         if (game.camera.IsInView(building.GetBoundingBox()))
         {
             building.Draw(spriteBatch, building.position, Color.White);
         }
     }
     foreach (Enemy enemy in levelEnemies)
     {
         if (game.camera.IsInView(enemy.state.GetBoundingBox(enemy.position)))
         {
             enemy.Draw(spriteBatch);
         }
     }
     foreach (Exit exit in levelExits)
     {
         if (game.camera.IsInView(exit.sprite.GetBoundingBox(exit.position)))
         {
             exit.Draw(spriteBatch);
         }
     }
     player.Draw(spriteBatch);
     if (displaySign)
     {
         signTexture.Draw(spriteBatch, new Vector2(player.position.X - 100f, player.position.Y), Color.White);
     }
 }
예제 #4
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     if (!sfxPlayed)
     {
         launch.Play();
         sfxPlayed = true;
     }
     sprite.Draw(spriteBatch, location, Color.White);
 }
예제 #5
0
 public void Draw(SpriteBatch spriteBatch)
 {
     foreach (KeyValuePair <ICommands, String> pair in options)
     {
         spriteBatch.DrawString(font, pair.Value, textStartingPosition + (adjust * menuNumber), Color.Black);
         menuNumber++;
     }
     coin.Draw(spriteBatch, coinStartingPosition + (adjust * selection), Color.White);
     menuNumber = 0;
 }
예제 #6
0
        public static void Draw(SpriteBatch sb, String levelname)
        {
            if (COINS[currentPlayer] >= 100)
            {
                LIVES[currentPlayer]++;
                COINS[currentPlayer] = 0;
                SoundPanel.PlaySoundEffect(Sound.powerup1upEffect);
            }

            miniCoin.Update();
            miniCoin.Draw(sb, 90, 21);

            if (glowCount % 10 == 0)
            {
                glowFrame++;

                if (glowFrame == 6)
                {
                    glowFrame = 0;
                }
            }
            glowCount++;

            String timer = (TIME < 0 ? 0 : TIME).ToString("D3"), points = SCORE[currentPlayer].ToString("D6"), coin = HotDAMN.TEXT_X + COINS[currentPlayer].ToString("D2");

            sb.DrawString(Textures.font, playerName[currentPlayer], new Vector2(25, 5), Color.White);
            sb.DrawString(Textures.font, points, new Vector2(25, 16), Color.White);

            sb.DrawString(Textures.font, coin, new Vector2(100, 16), Color.White);

            sb.DrawString(Textures.font, world, new Vector2(140, 5), Color.White);
            sb.DrawString(Textures.font, levelname.Replace('0', ' '), new Vector2(155, 16), Color.White);

            sb.DrawString(Textures.font, time, new Vector2(210, 5), Color.White);
            sb.DrawString(Textures.font, timer, new Vector2(215, 16), Color.White);
        }
예제 #7
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location, Color color)
 {
     sprite.Draw(spriteBatch, location, color);
 }
예제 #8
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     sprite.Draw(spriteBatch, location, Color.White);
 }
예제 #9
0
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch, position, Color.White);
 }