GearsDebug.Playable.DevTestArea.Collision.CollisionTestController.KeyDown C# (CSharp) Method

KeyDown() private method

Event based Input hook for CollisionTestController.
private KeyDown ( KeyboardState &currentKeyboardState, KeyboardState &oldKeyboardState ) : void
currentKeyboardState Microsoft.Xna.Framework.Input.KeyboardState Passed from Input class. The current keyboard state as of this update frame.
oldKeyboardState Microsoft.Xna.Framework.Input.KeyboardState Passed from Input class. The previous keyboard state with respect to this update frame.
return void
        internal void KeyDown(ref KeyboardState currentKeyboardState, ref KeyboardState oldKeyboardState)
        {
            if (_playerManager != null)
            {
                ///////////////////
                // Test Commands //
                ///////////////////

                if (currentKeyboardState.IsKeyDown(Keys.Space) &&
                    currentKeyboardState.IsKeyDown(Keys.Space) != oldKeyboardState.IsKeyDown(Keys.Space))
                {
                    //TODO: Trigger test for collision function!
                }
            }
        }