Beispiel #1
0
 public void StartRinging()
 {
     foreach (Transform child in transform)
     {
         SchoolBell bell = child.GetComponent <SchoolBell>();
         if (bell != null)
         {
             bell.StartRinging();
         }
     }
 }
Beispiel #2
0
 private void ChangeState(SchoolBell.State state)
 {
     foreach (Transform child in transform)
     {
         SchoolBell bell = child.GetComponent <SchoolBell>();
         if (bell != null)
         {
             bell.SetState(state);
         }
     }
 }