示例#1
0
 // Use this for initialization
 void Start()
 {
     held = null;
     //create arm
     handL = gameObject.AddComponent <DetectJoints>() as DetectJoints;
     handL.SetTrackedJoint(handLeft);
     elbowL = elbow.AddComponent <DetectJoints>() as DetectJoints;
     elbowL.SetTrackedJoint(elbowLeft);
 }
示例#2
0
    void OnTriggerEnter2D(Collider2D otherCollider)
    {
        DetectJoints ta = otherCollider.gameObject.GetComponent <DetectJoints>();

        if (ta != null && DetectJoints.state == 2)
        {
            MoveTheObjK = true;
        }
    }
示例#3
0
    public float openBookW, openBookH;     //how close to the center of books do you need to be?


    // Use this for initialization
    void Start()
    {
        held = null;
        //create arm
        handR = gameObject.AddComponent <DetectJoints>() as DetectJoints;
        handR.SetTrackedJoint(handRight);
        elbowR = elbow.AddComponent <DetectJoints>() as DetectJoints;
        elbowR.SetTrackedJoint(elbowRight);
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        held = null;        //casual reminder that this might break all of the things and should probably be cleaned up later
        Debug.Log("Grab script running");

        //create hand
        DetectJoints handL    = gameObject.AddComponent <DetectJoints>() as DetectJoints;
        JointType    handLeft = JointType.HandLeft;

        handL.SetTrackedJoint(handLeft);
    }
 // Use this for initialization
 void Start()
 {
     paintScript = gameObject.GetComponent <DetectJoints>();
 }