Exemple #1
0
 void Scare()
 {
     audioSource.clip = hiss;
     audioSource.Play();
     GameObject[] kids = GameObject.FindGameObjectsWithTag("Kid");
     foreach (GameObject kid in kids)
     {
         Kid kidScript = kid.GetComponent <Kid> ();
         if (kidScript.PlayerNear(true))
         {
             kidScript.GetScared(epower);
         }
     }
     epower = 0;
 }