private void HandleOnMove(ZMInputVector2EventArgs args) { if (IsValidInputControl(args.input)) { var notifyArgs = new Vector2EventArgs(args.value); _movement = args.value; _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveEvent, notifyArgs); } }
private void BroadcastAnalogGamepadEvents(InputDevice device, int userIndex) { var input = new ZMInput(ZMInput.State.HELD, userIndex); var args = new ZMInputVector2EventArgs(Vector2.zero, input); var floatArgs = new ZMInputFloatEventArgs(input, 0); args.value = device.LeftStick.Vector; Notifier.SendEventNotification(OnLeftAnalogStickMove, args); args.value = device.RightStick.Vector; Notifier.SendEventNotification(OnRightAnalogStickMove, args); args.value = device.DPad.Vector; Notifier.SendEventNotification(OnDirectionalPadMove, args); floatArgs.value = device.RightTrigger.Value; Notifier.SendEventNotification(OnRightTriggerAnalog, floatArgs); floatArgs.value = device.LeftTrigger.Value; Notifier.SendEventNotification(OnLeftTriggerAnalog, floatArgs); }