IEnumerator LocalGoalSpawning() { for (; ;) { yield return(new WaitForSeconds(RandomLib.RandFloatRange(spawnTime, spawnTimeVariance))); spawnSuperGoals(Random.Range(0, spawnPositions.Length)); } }
IEnumerator ServerGoalSpawning() { for (; ;) { yield return(new WaitForSeconds(RandomLib.RandFloatRange(spawnTime, spawnTimeVariance))); node.BinaryWriter.Write(PacketType.SUPERGOALSPAWNING); byte spawnPointIndex = (byte)Random.Range(0, spawnPositions.Length); node.BinaryWriter.Write(spawnPointIndex); node.Send(node.AllCostChannel); spawnSuperGoals(spawnPointIndex); } }