Ejemplo n.º 1
0
    public void ReleaseData()
    {
        m_RegisteredDevice.OnInputReceived    -= OnInputReceived;
        m_RegisteredDevice.OnDeviceDisconnect -= OnInputDisconnect;

        m_OnInputReceived   = null;
        m_OnInputDisconnect = null;
        m_RegisteredDevice  = null;
    }
Ejemplo n.º 2
0
    public InputDeviceListener(IInputDevice device, OnInputReceivedDelegate onInputReceived, OnDeviceDisconnectDelegate onDeviceDisconnect)
    {
        Debug.Assert(device != null);
        Debug.Assert(onInputReceived != null);
        Debug.Assert(onDeviceDisconnect != null);

        m_RegisteredDevice  = device;
        m_OnInputReceived   = onInputReceived;
        m_OnInputDisconnect = onDeviceDisconnect;

        device.OnInputReceived    += OnInputReceived;
        device.OnDeviceDisconnect += OnInputDisconnect;
    }