示例#1
0
    // Update is called once per frame
    void Update()
    {
        //First update of hand and finger positions to prevent destruction of stage
        if (firstUpdate)
        {
            manager = this.gameObject.GetComponent <LeapManager> ();
            UpdateBonePositions();
            UpdateFingerBonesPositions();
            firstUpdate = false;
        }

        if (manager.HandIsValid())
        {
            UpdateBonePositions();
            UpdateFingerBonesPositions();

            /*if (checkForWall (hand) == true) {
             *      CreateWall (hand);
             * } else{
             *      CreateHand (hand);
             * }*/
            CreateHand(manager.GetHand());
        }
        else
        {
            MakeBonesFlyUp();
        }
    }