Esempio n. 1
0
        protected override void Draw(GameTime gameTime)
        {
            while (Drawing.Manager.isUsingGraphicsDevice)
            {
                Thread.Sleep(10);
            }
            isDrawing = true;
            GraphicsDevice.Clear(Color.Black);

            if (isInitialized)
            {
                drawingManager.Draw(gameTime);
            }
            else
            {
                SpriteBatch temp = new SpriteBatch(graphics.GraphicsDevice);
                temp.Begin();
                temp.Draw(PleaseWaitTexture
                          , new Vector2(graphics.PreferredBackBufferWidth - PleaseWaitTexture.Width
                                        , graphics.PreferredBackBufferHeight - PleaseWaitTexture.Height) / 2.0f
                          , Color.White);
                temp.End();
            }

            base.Draw(gameTime);
            isDrawing = false;
        }