Example #1
0
        /// <summary>
        /// Draw the map on the screen.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Gray);

            spriteBatch.Begin();

            // Draw the map
            bingMapsViewer.Draw();

            switchViewButton.Draw();


            spriteBatch.End();

            base.Draw(gameTime);
        }
        /// <summary>
        /// DrawTank the map on the screen.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Gray);

            spriteBatch.Begin();

            // DrawTank the map
            bingMapsViewer.Draw();

            foreach (PushPin pushPin in pushPins)
            {
                pushPin.Draw();
            }

            spriteBatch.End();

            spriteBatch.Begin();
            tank.DrawTank(gameTime);
            spriteBatch.End();

            spriteBatch.Begin();

            switchViewButton.Draw();

            serachButton.Draw();

            changeRotuingModeButton.Draw();


            if (tank.IsMoving)
            {
                drawRouteButton.Draw();
                clearPushPinsButton.Draw();
            }
            spriteBatch.End();


            base.Draw(gameTime);
        }