Exemple #1
0
        public void Update(double deltaTime, Renderer renderer)
        {
            // Cache local width/height
            m_iScreenWidth  = renderer.ViewportWidth;
            m_iScreenHeight = renderer.ViewportHeight;

            // Update tutorial
            m_Tutorial.Update(deltaTime);

            // Update the scene
            if (m_CurrentScene != null)
            {
                m_CurrentScene.Update(deltaTime);
            }
        }
Exemple #2
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Call base class
            base.Update(gameTime);

            // Cache local width/height
            m_iScreenWidth  = graphics.GraphicsDevice.Viewport.Width;
            m_iScreenHeight = graphics.GraphicsDevice.Viewport.Height;

            // Update tutorial
            m_Tutorial.Update(gameTime);

            // Update the scene
            if (m_CurrentScene != null)
            {
                m_CurrentScene.Update(gameTime);
            }
        }