IsKeyUp() private method

private IsKeyUp ( Keys key ) : bool
key Keys
return bool
Exemplo n.º 1
0
        public override void Keyboard(KeyboardManager keyboardManager)
        {
            if (keyboardManager.IsKeyDown(Keys.A))
            {
                _leftJoint.MotorSpeed = 20.0f;
                _rightJoint.MotorSpeed = -20.0f;
            }
            if (keyboardManager.IsKeyUp(Keys.A))
            {
                _leftJoint.MotorSpeed = -10.0f;
                _rightJoint.MotorSpeed = 10.0f;
            }

            base.Keyboard(keyboardManager);
        }