Esempio n. 1
0
    /**
     * Use this for initialization
     */
    void Start()
    {
        // find the reference to the flaps and get the script reference from it
        epiglottisObject = GameObject.Find("Flaps").GetComponent <openFlap>();
        Epiglottis       = GameObject.Find("Epiglottis");
        EpiglottisClosed = GameObject.Find("EpiglottisClosed");
        Uvula            = GameObject.Find("Uvula");
        UvulaClosed      = GameObject.Find("UvulaClosed");

        Epiglottis.SetActive(true);
        EpiglottisClosed.SetActive(false);
        Uvula.SetActive(true);
        UvulaClosed.SetActive(false);
    }
Esempio n. 2
0
 void Update()
 {
     if (epiglottisObject.isEpiglotisOpen())
     {
         Epiglottis.SetActive(false);
         EpiglottisClosed.SetActive(true);
         Uvula.SetActive(false);
         UvulaClosed.SetActive(true);
     }
     else
     {
         Epiglottis.SetActive(true);
         EpiglottisClosed.SetActive(false);
         Uvula.SetActive(true);
         UvulaClosed.SetActive(false);
     }
 }