private void Start() { ggm = GlobalGameManager.instance; levelLength = ggm.GetLevelLength(); obstacleFrequency = ggm.GetObstacleFrequency(); obstaclePrefabs = ggm.GetObstaclePrefabs(); obstacleSpawnOrder = ggm.GetObstacleSpawnOrder(); renderDistance = ggm.GetRenderDistance(); seed = ggm.GetSeed(); specialObjectLocations = ggm.GetSpecialObjectLocations(); specialObjectPrefabs = ggm.GetSpecialObjectPrefabs(); obstaclePointer = 0; playerTransform = GameObject.Find("Player").transform; pseudoRandom = new System.Random(seed.GetHashCode()); // TODO: Adjust count for obstacle & obstacle difficulty int count = 3; if (obstaclePrefabs.Count > 0) { PopulatePool(obstaclePrefabs, obstaclePrefabPool, count); } PopulateRandomLocations(); PopulateSpawnOrder(); if (specialObjectPrefabs.Count > 0) { PopulateLocatedObjects(terrainParent, specialObjectPrefabs, specialObjectLocations); } }