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