private IEnumerator SpawnGroupTick() { label_1: do { yield return((object)CoroutineEx.waitForEndOfFrame); }while (!this.spawnTick || !Spawn.respawn_groups); yield return((object)CoroutineEx.waitForSeconds(1f)); for (int i = 0; i < this.SpawnGroups.Count; ++i) { ISpawnGroup spawnGroup = this.SpawnGroups[i]; if (spawnGroup != null) { try { spawnGroup.SpawnRepeating(); } catch (Exception ex) { Debug.LogError((object)ex); } yield return((object)CoroutineEx.waitForEndOfFrame); } } goto label_1; }
private IEnumerator SpawnGroupTick() { SpawnHandler spawnHandler = null; while (true) { yield return(CoroutineEx.waitForEndOfFrame); if (spawnHandler.spawnTick && Spawn.respawn_groups) { yield return(CoroutineEx.waitForSeconds(1f)); for (int i = 0; i < spawnHandler.SpawnGroups.Count; i++) { ISpawnGroup item = spawnHandler.SpawnGroups[i]; if (item != null) { try { item.SpawnRepeating(); } catch (Exception exception) { UnityEngine.Debug.LogError(exception); } yield return(CoroutineEx.waitForEndOfFrame); } } } } }