AIA.Game1.Update C# (CSharp) Method

Update() protected method

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.
return void
        protected override void Update( GameTime gameTime )
        {
            // Allows the game to exit
            if ( GamePad.GetState ( PlayerIndex.One ).Buttons.Back == ButtonState.Pressed )
                this.Exit ( );

            //Updates all mouse and keyboard presses.
            _InputManager.UpdateInput();

            //Updates position of buildings
            _BuildingManager.Update(gameTime);

            if ( _InputManager.CurrentKey.IsKeyDown ( Keys.E ) )
            {
                _Emitter.Fire ( );
            }

            _unitOne.Update ( gameTime );

            _Emitter.Update ( gameTime );

            base.Update ( gameTime );
        }