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