示例#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();
        }
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        //First update of hand and finger positions to prevent destruction of stage
        if (firstUpdate)
        {
            leapManager = this.gameObject.GetComponent <LeapManager> ();
            UpdateBonePositions();
            firstUpdate = false;
        }

        if (leapManager.HandIsValid())
        {
            UpdateBonePositions();
        }
        else
        {
            MakeBonesFlyUp();
        }

        UpdateActivity();

        //Apply activity to movement-volume
        audioManager.SetVolume(activity, audioplayerMovement);
    }