Exemplo n.º 1
0
        /// <summary>
        ///   Updates input device states.
        /// </summary>
        public void Update()
        {
            Keyboard.Update();
            Mouse.Update();
            Joystick.Update();

            if (Keyboard.AnyJustPressed() || Keyboard.AnyJustReleased())
            {
                LastDevice = InputDevice.Keyboard;
            }
            else if (Mouse.AnyJustPressed() || Mouse.AnyJustReleased() || Mouse.AnyJustMoved())
            {
                LastDevice = InputDevice.Mouse;
            }
            else
            if (Joystick.AnyJustPressed() || Joystick.AnyJustReleased() || Joystick.AnyJustMoved())
            {
                LastDevice = InputDevice.Joystick;
            }
        }