Exemple #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public void Draw(Renderer spriteBatch)
        {
            spriteBatch.Draw(Assets.Background, new Rectangle(0, 0, m_iScreenWidth, m_iScreenHeight), Color.White);

            if (m_CurrentScene != null)
            {
                m_CurrentScene.Draw(spriteBatch);
            }

            m_Tutorial.Draw(spriteBatch);
        }
Exemple #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);

            spriteBatch.Begin(SpriteSortMode.Immediate, null, null, null, m_RasterizerState);
            spriteBatch.Draw(Assets.Background, new Rectangle(0, 0, m_iScreenWidth, m_iScreenHeight), Color.White);

            if (m_CurrentScene != null)
            {
                m_CurrentScene.Draw(spriteBatch);
            }

            m_Tutorial.Draw(spriteBatch);

            spriteBatch.End();

            base.Draw(gameTime);
        }