GearsDebug.Playable.DevTestArea.Collision.CollisionTestController.KeyDown C# (CSharp) 메소드

KeyDown() 개인적인 메소드

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.
리턴 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!
                }
            }
        }