IEnumerator CheckIfTileHurts(float interval) { while (playing) { for (int i = 0; i < ground.rings.Count; i++) { for (int j = 0; j < ground.rings[i].sections.Count; j++) { if (ground.rings[i].sections[j].hurts) { ground.Hurts(i, j); } } } yield return(new WaitForSeconds(interval)); } }