Cascade.Game1.Update C# (CSharp) Метод

Update() защищенный Метод

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
Результат void
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Controls.GetKey(Keys.Escape) == ControlState.Pressed)
            {
                this.Exit();
                tcp.Close();
            } 
            
            
            
            TouchManager.Update();
            Global.Update(gameTime);
            MusicManager.Update();
            VolumeMeter.Update();
            clearColor.Update();
            if (Controls.GetKey(Keys.Space) == ControlState.Pressed)
            {
                Global.SetSpeed(0.1f, 0.1f);
            }
            else if (Controls.GetKey(Keys.Space) == ControlState.Released)
            {
                Global.SetSpeed(1f, 0.1f);
            }
            if (Controls.GetKey(Keys.Down) == ControlState.Held)
            {
                Global.Camera.LookAtPos = new Vector3(Global.Camera.LookAtPos.X, Global.Camera.LookAtPos.Y - 5, Global.Camera.LookAtPos.Z);
            }
            foreach (var touch in Global.Touches)
            {
                //Global.Output += touch.State;
                foreach (var emit in emitters)
                {
                    if (emit.Touch == null && touch.State == TouchState.Touched)
                    {
                        emit.Touch = touch;
                        emit.Pos = touch.Position.ToVector3();
                       // emit.EmitParticle();
                        break;
                    }
                }
            }
            for (int i = 0; i < Touches.Count; i++)
            {
                Touches[i].Update();
                if (Touches[i].State == TouchState.None)
                {
                    Touches.RemoveAt(i);
                    i--;
                }
            }
            //emitter.Pos = new Vector3(-Controls.MousePos, 1000);
            //Global.Output += Global.ParticleManager.NumberofParticles + ", " + Controls.MousePos + ", " + emitter.Pos;
            //Global.Output += GC.GetTotalMemory(false) / 1000000f;
            // TODO: Add your update logic here

            base.Update(gameTime);
        }