Exemplo n.º 1
0
        private void Start()
        {
            Shutdown();

            var connected = false;

            if (m_Use360Driver)
            {
                m_Kinect360Manager = new Kinect360Manager();

                if (m_Kinect360Manager.Start())
                {
                    m_Kinect360Manager.NewTrackingData += OnKinect360Data;
                    connected = true;
                }
            }
            else
            {
                m_KinectOneManager = new KinectOneManager();

                if (m_KinectOneManager.Start())
                {
                    m_KinectOneManager.NewTrackingData += OnKinectOneData;
                    connected = true;
                }
            }

            ConnectionStatus.Text = connected ? "Connected" : "Not Connected";
        }
Exemplo n.º 2
0
        private void Start()
        {
            Shutdown();

            Debug.WriteLine("Sanity Check");
            var UseGamepad = false;
            var connected  = false;

            m_Gamepad.Start();
            m_Gamepad.n_VridgeRemote = m_VridgeRemote;
            m_Gamepad.n_Window       = this;
            if (m_Gamepad.XInputDevice.IsConnected)
            {
                UseGamepad = true;
                Debug.WriteLine("Controller Connected");
            }

            if (m_Use360Driver)
            {
                m_Kinect360Manager = new Kinect360Manager();

                if (m_Kinect360Manager.Start())
                {
                    m_Kinect360Manager.NewTrackingData += OnKinect360Data;
                    connected = true;
                }
            }
            else
            {
                m_KinectOneManager = new KinectOneManager();

                if (m_KinectOneManager.Start())
                {
                    m_KinectOneManager.NewTrackingData += OnKinectOneData;
                    connected = true;
                }
            }

            ConnectionStatus.Text = connected ? "Connected" : "Not Connected";
        }