Пример #1
0
        public Substate Update(DateTime timeStamp)
        {
            input.JoystickState state = _controller.GetState();

            if (state != null)
            {
                return(Update(timeStamp, state));
            }
            return(Substate.None);
        }
Пример #2
0
        public Substate Update(DateTime timestamp, input.JoystickState state)
        {
            _timeStamp = timestamp;

            Substate updated = Substate.None;

            updated |= _axes.Update(timestamp, state);
            updated |= _buttons.Update(timestamp, state.Buttons);
            updated |= _sliders.Update(timestamp, state.Sliders);
            updated |= _povHats.Update(timestamp, state.PovHats);

            return(updated);
        }
Пример #3
0
        public Substate Update(DateTime timestamp, input.JoystickState state)
        {
            Substate updated = Substate.None;

            if (_x != state.X ||
                _y != state.Y ||
                _z != state.Z ||
                _rx != state.Rx ||
                _ry != state.Ry ||
                _rz != state.Rz)
            {
                _x  = state.X;
                _y  = state.Y;
                _z  = state.Z;
                _rx = state.Rx;
                _ry = state.Ry;
                _rz = state.Rz;

                _timeStamp = timestamp;

                updated = Substate.Axes;
            }
            return(updated);
        }