コード例 #1
0
    void Start()
    {
        this.networkObserver = (NetworkObserver)GameObject.FindObjectOfType(typeof(NetworkObserver));
        if (Config.Instance.UseWii)
        {
            __buttonConnector = new ButtonObserverConnector <WiiMote.ButtonId> (this);
            ((WiiController)GameObject.FindObjectOfType(typeof(WiiController))).WiiMote.addButtonObserver(__buttonConnector);
        }
        if (Config.Instance.UseKinect)
        {
            __kinectController = (KinectController)GameObject.FindObjectOfType(typeof(KinectController));
        }

        for (int i = 0; i < 20; i++)
        {
            __joints[i] = Instantiate(SkeletonJointOriginal, Vector3.zero, Quaternion.identity) as GameObject;
            __joints[i].transform.parent = this.transform;
            __joints[i].name             = "SkeletonJoint" + i;
            __joints[i].renderer.enabled = __enabled;
        }
    }
コード例 #2
0
 public void addButtonObserver(ButtonObserverConnector<Kinect.ButtonId> observer)
 {
     __addButtonObserver(NativePointer, observer.NativePointer);
 }