Beispiel #1
0
 void ToggleAnimatorState(Collider c, bool boolean)
 {
     if (BriansEngine.IsItPlayer(c) && BriansEngine.IsItUnlocked(this))
     {
         if (!boolean)
         {
             StartCoroutine(DelayedDoorClose(10.0f));
         }
         else
         {
             animator.SetBool(ANIM_BOOL, boolean);
         }
     }
 }
Beispiel #2
0
 void PlayAudio(Collider c, AudioClip[] ac)
 {
     if (BriansEngine.IsItPlayer(c) && BriansEngine.IsItUnlocked(this))
     {
         if (!animator.name.Contains("Garage"))
         {
             int randIndex = Random.Range(0, ac.Length);
             AudioSource.PlayClipAtPoint(ac[randIndex], this.transform.position);
         }
         else
         {
             AudioSource.PlayClipAtPoint(bh.garageDoorSound, this.transform.position);
         }
     }
 }