Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="channel"></param>
        public Receiver(RTCDataChannel channel)
        {
            _channel            = channel ?? throw new ArgumentNullException("channel is null");
            _channel.OnMessage += OnMessage;

            _onEvent   = (InputEventPtr ptr, InputDevice device) => { base.QueueEvent(ptr); };
            _corrector = new InputPositionCorrector(_onEvent);
        }
        public Sender()
        {
            InputSystem.onEvent        += OnEvent;
            InputSystem.onDeviceChange += OnDeviceChange;
            InputSystem.onLayoutChange += OnLayoutChange;

            _onEvent   = (InputEventPtr ptr, InputDevice device) => { onEvent?.Invoke(ptr, device); };
            _corrector = new InputPositionCorrector(_onEvent);
        }