Пример #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player") {
         sceneCue = SceneCue.START;
         if (!audio.isPlaying) {
             audio.Play();
         }
     }
 }
Пример #2
0
 IEnumerator FadeOut()
 {
     sceneCue = SceneCue.WAIT;
     while (audio.volume > 0.0f) {
         audio.volume -= Time.deltaTime * 0.1f;
         Debug.Log(audio.volume);
         yield return null;
     }
     sceneCue = SceneCue.SCENE_CHANGE;
 }
Пример #3
0
 IEnumerator FlyAround()
 {
     sceneCue = SceneCue.WAIT;
     while (sceneCue == SceneCue.WAIT) {
         if (GameObject.FindWithTag("Monster")) {
             follow_monster = true;
             GameObject.FindWithTag("Monster").animation.Play("fly_around_monster");
             yield return new WaitForSeconds(1.0f);
         } else {
             sceneCue = SceneCue.EXPLOSION;
         }
     }
 }
Пример #4
0
 IEnumerator PutOutTorches()
 {
     sceneCue = SceneCue.WAIT;
     GameObject.FindWithTag("Monster").animation.Play("grab_teddy");
     foreach (TorchSet ts in torchSets) {
         yield return new WaitForSeconds(ts.delay);
         Debug.Log("Turning off some torches");
         foreach (Transform torch in ts.torches) {
             torch.FindChild("Fire").gameObject.active = false;
         }
     }
     sceneCue = SceneCue.GRAB_TEDDY;
     Debug.Log("Done with torches");
 }
Пример #5
0
 IEnumerator ExplodeCrystals()
 {
     //Explode crystals from here
     follow_monster = false;
     foreach (ParticleSystem o in particle_emitters) {
         o.enableEmission = true;
     }
     //		yield return new WaitForSeconds(2.0f);
     //		foreach (GameObject o in particle_emitters) {
     //			o.particleSystem.enableEmission = false;
     //		}
     sceneCue = SceneCue.END;
     GameObject.FindWithTag("Teddy").transform.position = Teddy_placeholder.transform.position;
     //GameObject.FindWithTag("Teddy").transform.GetChild(0).animation.Play("float_down");
     return null;
 }
Пример #6
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player") {
         sceneCue = SceneCue.START;
     }
 }