Esempio n. 1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.BlanchedAlmond);

            // TODO: Add your drawing code here
            spriteBatch.Begin();

            if (state == "StartScreen")
            {
                background.Draw(spriteBatch);
                StartButton.Draw(spriteBatch);
            }
            else if (state == "Menu")
            {
                Stage1Button.Draw(spriteBatch);
                Stage2Button.Draw(spriteBatch);
                Stage3Button.Draw(spriteBatch);
            }
            else if (state == "Stage1")
            {
                level.Draw(spriteBatch);
                waveManeger.Draw(spriteBatch);
                player.Draw(spriteBatch);
                toolBar.Draw(spriteBatch, player);
                arrowButton.Draw(spriteBatch);
                slowButton.Draw(spriteBatch);
                snipeButton.Draw(spriteBatch);
                player.DrawPreview(spriteBatch);
            }
            else if (state == "Stage2")
            {
                level2.Draw(spriteBatch);
                waveManeger2.Draw(spriteBatch);
                player.Draw(spriteBatch);
                toolBar.Draw(spriteBatch, player);
                arrowButton.Draw(spriteBatch);
                slowButton.Draw(spriteBatch);
                snipeButton.Draw(spriteBatch);
                player.DrawPreview(spriteBatch);
            }
            else
            {
                level3.Draw(spriteBatch);
                //waveManeger.Draw(spriteBatch);
                player.Draw(spriteBatch);
                toolBar.Draw(spriteBatch, player);
                arrowButton.Draw(spriteBatch);
                slowButton.Draw(spriteBatch);
                snipeButton.Draw(spriteBatch);
                player.DrawPreview(spriteBatch);
            }



            base.Draw(gameTime);


            spriteBatch.End();
        }
Esempio n. 2
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            background.Draw(spriteBatch);
            level.Draw(spriteBatch);
            waveManeger.Draw(spriteBatch);
            player.Draw(spriteBatch);
            spriteBatch.End();


            base.Draw(gameTime);
        }
Esempio n. 3
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.BlanchedAlmond);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            //background.Draw(spriteBatch);
            level.Draw(spriteBatch);
            waveManeger.Draw(spriteBatch);
            player.Draw(spriteBatch);
            toolBar.Draw(spriteBatch, player);
            arrowButton.Draw(spriteBatch);
            slowButton.Draw(spriteBatch);
            snipeButton.Draw(spriteBatch);
            player.DrawPreview(spriteBatch);
            spriteBatch.End();


            base.Draw(gameTime);
        }