Exemplo n.º 1
0
 protected override void Update()
 {
     audio.Update();
     frameinfo.Update();
     vsc.Update(timer.ElapsedSeconds);
     //vscp.Update(timer.ElapsedSeconds);
 }
Exemplo n.º 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)
        {
            Input.Update();
            frameinfo.Update();
            audio.Update();
            vsc.Update(gameTime.TotalGameTime.TotalSeconds);

            if (Input.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape))
            {
                this.Exit();
            }
            if (Input.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F2))
            {
                ToggleFullScreen();
            }
            if (Input.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.G))
            {
                SetGamma(new Vector3(2.1f, 2.1f, 2.1f));
            }

            base.Update(gameTime);
        }