Example #1
0
 // method: adjust set of hand models and play cycling audio //
 public void adjustSetOfHandModelsAndPlayAudio(SetOfHandModels setOfHandModels)
 {
     // adjust set of hand models //
     adjustSetOfHandModels(setOfHandModels);
     // play cycling audio //
     playCyclingAudio();
 }
Example #2
0
    // methods for: set of hand models changing in general //

    // method: adjust the hand's set of hand models to be just the given set of hand models out of all the managed hand models, as well as according to the inclusions of default controller models within the set of sets //
    public void adjustSetOfHandModels(SetOfHandModels setOfHandModels)
    {
        foreach (GameObject handModelToDisable in managedHandModels)
        {
            handModelToDisable.SetActive(false);
        }
        foreach (GameObject handModelToEnable in setOfHandModels.array)
        {
            handModelToEnable.SetActive(true);
        }
        if (hand.GetComponentInChildren <SpawnRenderModel>())
        {
            if (setOfHandModels.includesControllerModel)
            {
                foreach (Transform childTransform in hand.GetComponentInChildren <SpawnRenderModel>().transform)
                {
                    childTransform.gameObject.SetActive(true);
                }
            }
            else
            {
                foreach (Transform childTransform in hand.GetComponentInChildren <SpawnRenderModel>().transform)
                {
                    childTransform.gameObject.SetActive(false);
                }
            }
        }
    }
Example #3
0
 // method: adjust set of hand models globally (by both the left and right instances of this class) to the given set of hand models, optionally playing cycling audio //
 public static void adjustSetOfHandModelsGlobally(SetOfHandModels setOfHandModels, bool playAudio)
 {
     // adjust set of hand models for the left instance //
     left.adjustSetOfHandModels(setOfHandModels);
     // adjust set of hand models for the right instance //
     right.adjustSetOfHandModels(setOfHandModels);
     // optionally have both hands play cycling audio //
     if (playAudio)
     {
         left.playCyclingAudio();
         right.playCyclingAudio();
     }
 }
Example #4
0
 // method: adjust set of hand models globally (by both the left and right instances of this class) to the given set of hand models, optionally playing cycling audio //
 public void adjustSetOfHandModelsGlobally_(SetOfHandModels setOfHandModels, bool playAudio)
 {
     adjustSetOfHandModelsGlobally(setOfHandModels, playAudio);
 }