Ejemplo n.º 1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            if (gameStates == GameStates.Menu)
            {
                menu.DrawMenu(spriteBatch, level.Width * 32, arial);
            }

            else if (gameStates == GameStates.Running)
            {
                level.Draw(spriteBatch);
                //enemy1.Draw(spriteBatch);
                //wave.Draw(spriteBatch);
                player.Draw(spriteBatch);
                waveManager.Draw(spriteBatch);
                toolbar.Draw(spriteBatch, player);
                //tower.Draw(spriteBatch);
                arrowButton.Draw(spriteBatch);
            }

            else if (gameStates == GameStates.End)
            {
                menu.DrawEndScreen(spriteBatch, level.Width * 32, arial);
            }
            spriteBatch.End();

            base.Draw(gameTime);
        }
Ejemplo n.º 2
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            if (gameStates == GameStates.Menu)
            {
                Texture2D texture = Content.Load <Texture2D>("start_screen");
                spriteBatch.Draw(texture, new Vector2(0f, 0f), Color.White);
            }

            else if (gameStates == GameStates.Running)
            {
                level.Draw(spriteBatch);
                //enemy1.Draw(spriteBatch);
                //wave.Draw(spriteBatch);
                player.Draw(spriteBatch);
                waveManager.Draw(spriteBatch);
                toolbar.Draw(spriteBatch, player);
                //tower.Draw(spriteBatch);
                arrowButton.Draw(spriteBatch);
            }

            else if (gameStates == GameStates.End)
            {
                menu.DrawEndScreen(spriteBatch, level.Width * 32, lucida);
            }
            spriteBatch.End();

            base.Draw(gameTime);
        }