Afterglow.Input.SlimDX.SlimDXKeyboard.Update C# (CSharp) Метод

Update() публичный Метод

Updates the input device.
public Update ( ) : void
Результат void
        public override void Update()
        {
            if (mKeyboard.Acquire().IsFailure)
            {
                //MessageBox.Show("Failed to acquire the keyboard");
                return;
            }

            if (mKeyboard.Poll().IsFailure)
            {
                //MessageBox.Show("Failed to poll the keyboard");
                return;
            }

            KeyboardState state = mKeyboard.GetCurrentState();
            if (Result.Last.IsFailure)
            {
                return;
            }

            foreach (Key key in state.PressedKeys)
            {
                CheckDownButton((Button)key);
            }

            foreach (var key in state.ReleasedKeys)
            {
                CheckReleasedButton((Button)key);
            }
        }