public void Initialize() { #if DEBUG Debugger.Log(1, "Main", "Initializing level block manager."); #endif Initialized = true; chunks.Clear(); int x = 0; int amountOfTowers = (window.Width / groundWidth) + extraLength + 1; TowersCreated = amountOfTowers; CurrentTerrain.Generate(Rand.Next(30, 50), lastHeight); for (int i = 0; i < amountOfTowers; i++) { BlockChunk tower = CurrentTerrain.Construct(x); tower.Generate(); chunks.Add(tower); x += groundWidth; } }