Beispiel #1
0
        private void DrawLevelState(GameTime gameTime)
        {
            mainGame.GraphicsDevice.Clear(Color.White);

            spriteBatch.Begin();
            board.Draw(spriteBatch);

            stairs.Draw(spriteBatch);

            darwin.Draw(spriteBatch);
            firstZombie.Draw(spriteBatch);
            secondZombie.Draw(spriteBatch);
            thirdZombie.Draw(spriteBatch);
            fourthZombie.Draw(spriteBatch);
            cannibalZombie.Draw(spriteBatch);

            potion.Draw(spriteBatch);
            zTime.Draw(spriteBatch);

            if (!isAllZombiesDead())
            {
                foreach (BasicObject bo in removableWalls)
                {
                    // Draw the walls visible
                    Rectangle source = new Rectangle(0, 0, board.getSquareLength(), board.getSquareLength());
                    spriteBatch.Draw(removableWallTex, board.getPosition(bo), source, Color.White);
                }
            }


            foreach (BasicObject a in walls)
            {
                spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White);
            }

            if (messageMode)
            {
                zombieMessage.Draw(spriteBatch, messageFont);
                darwinMessage.Draw(spriteBatch, messageFont);
                cannibalMessage.Draw(spriteBatch, messageFont);
            }

            spriteBatch.DrawString(messageFont, "HUMANITY: ",
                                   new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y),
                                   Color.Black);

            spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(),
                                   new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y),
                                   Color.Black);

            spriteBatch.End();
        }
Beispiel #2
0
        private void DrawLevelState(GameTime gameTime)
        {
            mainGame.GraphicsDevice.Clear(Color.White);

            spriteBatch.Begin();
            board.Draw(spriteBatch);

            secondStair.Draw(spriteBatch);

            foreach (Leaf leaf in this.leaves)
            {
                leaf.Draw(spriteBatch);
            }

            darwin.Draw(spriteBatch);
            firstZombie.Draw(spriteBatch);

            fastZombie1.Draw(spriteBatch);


            //secondZombie.Draw(spriteBatch);
            //thirdZombie.Draw(spriteBatch);
            firstSwitch.Draw(spriteBatch);
            secondSwitch.Draw(spriteBatch);
            brain.Draw(spriteBatch);
            zTime.Draw(spriteBatch);

            if (messageMode)
            {
                //zombieMessage.Draw(spriteBatch, messageFont);
                darwinMessage.Draw(spriteBatch, messageFont);
                //brainMessage.Draw(spriteBatch, messageFont);
                fastMessage.Draw(spriteBatch, messageFont);
                //switchMessage.Draw(spriteBatch, messageFont);
            }

            spriteBatch.DrawString(messageFont, "HUMANITY: ",
                                   new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y),
                                   Color.Black);

            spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(),
                                   new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y),
                                   Color.Black);

            spriteBatch.End();
        }
Beispiel #3
0
        private void DrawLevelState(GameTime gameTime)
        {
            mainGame.GraphicsDevice.Clear(Color.White);

            spriteBatch.Begin();

            board.Draw(spriteBatch);

            stairs.Draw(spriteBatch);

            if (!fatBossZombie.eatingDarwin)
            {
                darwin.Draw(spriteBatch);
            }

            zTime.Draw(spriteBatch);

            nurseryOne.Draw(spriteBatch);
            nurseryTwo.Draw(spriteBatch);

            if (fatBossZombie.isZombieAlive())
            {
                fatBossZombie.Draw(spriteBatch);
            }

            foreach (BasicObject a in walls)
            {
                spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White);
            }

            if (messageMode)
            {
            }

            spriteBatch.DrawString(messageFont, "HUMANITY: ",
                                   new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y),
                                   Color.Black);

            spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(),
                                   new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y),
                                   Color.Black);

            spriteBatch.End();
        }
Beispiel #4
0
        private void DrawLevelState(GameTime gameTime)
        {
            mainGame.GraphicsDevice.Clear(Color.White);

            spriteBatch.Begin();
            board.Draw(spriteBatch);
            stairs.Draw(spriteBatch);

            vortex.Draw(spriteBatch);
            darwin.Draw(spriteBatch);
            firstZombie.Draw(spriteBatch);
            secondZombie.Draw(spriteBatch);
            thirdZombie.Draw(spriteBatch);
            fourthZombie.Draw(spriteBatch);
            fifthZombie.Draw(spriteBatch);
            sixthZombie.Draw(spriteBatch);
            firstSwitch.Draw(spriteBatch);
            brain.Draw(spriteBatch);
            zTime.Draw(spriteBatch);
            potion.Draw(spriteBatch);

            if (messageMode)
            {
                zombieMessage.Draw(spriteBatch, messageFont);
                darwinMessage.Draw(spriteBatch, messageFont);
                brainMessage.Draw(spriteBatch, messageFont);
                //switchMessage.Draw(spriteBatch, messageFont);
            }

            foreach (BasicObject a in walls)
            {
                spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White);
            }

            spriteBatch.DrawString(messageFont, "HUMANITY: ",
                                   new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y),
                                   Color.Black);

            spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(),
                                   new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y),
                                   Color.Black);

            spriteBatch.End();
        }
Beispiel #5
0
        private void DrawLevelState(GameTime gameTime)
        {
            mainGame.GraphicsDevice.Clear(Color.White);

            spriteBatch.Begin();
            board.Draw(spriteBatch);

            pattern.Draw(spriteBatch);

            foreach (Vortex v in vortexes)
            {
                v.Draw(spriteBatch);
            }

            darwin.Draw(spriteBatch);

            zTime.Draw(spriteBatch);
            potion.Draw(spriteBatch);

            snake.Draw(spriteBatch);
            snake2.Draw(spriteBatch);
            snake3.Draw(spriteBatch);
            snake4.Draw(spriteBatch);

            northZombie.Draw(spriteBatch);
            southZombie.Draw(spriteBatch);
            eastZombie.Draw(spriteBatch);
            westZombie.Draw(spriteBatch);

            foreach (Flame flame in flames)
            {
                flame.Draw(spriteBatch, mainGame.Content.Load <Texture2D>("flame"));
            }

            if (messageMode)
            {
                zombieMessage.Draw(spriteBatch, messageFont);
                darwinMessage.Draw(spriteBatch, messageFont);
            }

            foreach (BasicObject a in walls)
            {
                spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White);
            }

            foreach (Box b in boxes)
            {
                b.Draw(spriteBatch);
            }

            // only show the stairs after the pattern is complete
            if (pattern.isComplete(board, boxes))
            {
                if (pattern.shouldSparkle())
                {
                    //PUT THE SOUND HERE
                    if (playSound)
                    {
                        revealStairsSound.Play();
                        playSound = false;
                    }
                    Console.Out.WriteLine("here");

                    stairs.Draw(spriteBatch);
                    Rectangle rect   = stairs.destination;
                    Rectangle source = new Rectangle(0, 0, 100, 100);
                    if (pattern.getSparkleCount() >= 0 && pattern.getSparkleCount() < 25)
                    {
                        rect.Height = 100;
                        rect.Width  = 100;
                        rect.X     -= 30;
                        rect.Y     -= 50;

                        spriteBatch.Draw(sparkleTex, rect, source, Color.White);
                    }
                    else if (pattern.getSparkleCount() >= 25 && pattern.getSparkleCount() < 50)
                    {
                        rect.Height = 100;
                        rect.Width  = 100;
                        rect.X     -= 30;
                        rect.Y     -= 50;

                        source.X = 100;

                        spriteBatch.Draw(sparkleTex, rect, source, Color.White);
                    }
                    else if (pattern.getSparkleCount() >= 50)
                    {
                        rect.Height = 100;
                        rect.Width  = 100;
                        rect.X     -= 30;
                        rect.Y     -= 50;

                        source.X = 200;

                        spriteBatch.Draw(sparkleTex, rect, source, Color.White);
                    }
                }
                else
                {
                    stairs.Draw(spriteBatch);
                }
            }

            spriteBatch.DrawString(messageFont, "HUMANITY: ",
                                   new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y),
                                   Color.Black);

            spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(),
                                   new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y),
                                   Color.Black);

            spriteBatch.End();
        }