public void FirstLevelSpawning() { numCoins = 5; numHearts = 1; numVehicle = 2; powerUpNum = 1; if (roadObjectCheck != 4 || roadObjectCheck != 8) { objectSpawner.CoinSpawner(numCoins); objectSpawner.HeartSpawner(numHearts); objectSpawner.CarSpawner(numVehicle); if (archwayCheck == 2) { roadObjectSpawner.ArchwaySpawner(); archwayCheck = 0; } if (powerUpCheck == 2) { objectSpawner.PowerUpSpawner(powerUpNum); powerUpCheck = 0; } roadObjectCheck++; archwayCheck++; powerUpCheck++; } if (roadObjectCheck == 4) { roadObjectSpawner.RampSpawner(); roadObjectCheck++; } if (roadObjectCheck == 8) { roadObjectSpawner.BridgeSpawner(); roadObjectCheck = -1; } }
private void Level() { // Initial coin spawn if (coinStart == 0) { objectSpawner.CoinSpawner(coinsNum); coinStart++; } // Only spawns objects once track has reset if (trackCheck < 8) { int index = tracks.IndexOf(tracks[trackCheck]); trackCheck++; } else { LevelCheck(); CheckScenery(); } }