示例#1
0
    protected override void Start()
    {
        base.Start();
        try {
            sensor = new Perception.Kinect.KinectSensor(Perception.Kinect.KinectSensor.FrameType.Body);
        } catch (System.DllNotFoundException e) {
            Debug.LogWarning("Kinect DLL not available; SkeletonFrame module disabled");
            gameObject.SetActive(false);
            return;
        }

        //This code sets the function to be executed on the arribal of a frame
        sensor.MultiSourceFrameArrived += OnMultiSourceFrameArrived;
    }
示例#2
0
    protected override void Start()
    {
        base.Start();
        sensor = new Perception.Kinect.KinectSensor(Perception.Kinect.KinectSensor.FrameType.Depth);

        DataStore.Subscribe(handRightKey, Handler);
        DataStore.Subscribe(handLeftKey, Handler);
        DataStore.Subscribe(timestampKey, Handler);
        DataStore.Subscribe(engagedKey, Handler);


        //This code sets the function to be executed on the arribal of a frame
        sensor.MultiSourceFrameArrived += OnMultiSourceFrameArrived;
    }
示例#3
0
    protected override void Start()
    {
        base.Start();
        sw.Start();
        sensor = new Perception.Kinect.KinectSensor(Perception.Kinect.KinectSensor.FrameType.Color);

        //This code sets the function to be executed on the arribal of a frame
        sensor.MultiSourceFrameArrived += OnMultiSourceFrameArrived;
        detector  = GetComponent <Detector>();
        rectangle = new Rectangle(640, 300, 640, 480);

        //SetValue("user:joy", 0, "initialization");
        //SetValue("user:sadness", 0, "initialization");
    }