public void ProvideGameObjects(LevelInstantiation levelStructure) { levelStructure.enemyNote2 = enemyNote2; levelStructure.enemyNote4 = enemyNote4; levelStructure.enemyNote8 = enemyNote8; levelStructure.pause2 = pause2; levelStructure.pause4 = pause4; levelStructure.pause8 = pause8; levelStructure.finish = finish; }
private void Start() { int currentLevel = 0; if (!isForCountPointsOnly) { currentLevel = mainMenuManager.currentLevel; } Debug.Log("Cur lev: " + currentLevel); LevelInstantiation levelStructure = null; switch (currentLevel) { case 1: { levelStructure = gameObject.AddComponent <LevelOneStructure>(); break; } case 2: { levelStructure = gameObject.AddComponent <LevelTwoStructure>(); break; } case 3: { levelStructure = gameObject.AddComponent <LevelThreeStructure>(); break; } case 4: { levelStructure = gameObject.AddComponent <LevelFourStructure>(); break; } case 5: { levelStructure = gameObject.AddComponent <LevelFiveStructure>(); break; } case 6: { levelStructure = gameObject.AddComponent <LevelSixStructure>(); break; } case 7: { levelStructure = gameObject.AddComponent <LevelSevenStructure>(); break; } case 8: { levelStructure = gameObject.AddComponent <LevelEightStructure>(); break; } case 9: { levelStructure = gameObject.AddComponent <LevelNineStructure>(); break; } case 10: { levelStructure = gameObject.AddComponent <LevelTenStructure>(); break; } case 11: { levelStructure = gameObject.AddComponent <LevelElevenStructure>(); break; } case 12: { levelStructure = gameObject.AddComponent <LevelTwelveStructure>(); break; } case 13: { levelStructure = gameObject.AddComponent <LevelThirteenStructure>(); break; } case 14: { levelStructure = gameObject.AddComponent <LevelFourteenStructure>(); break; } case 15: { levelStructure = gameObject.AddComponent <LevelFifteenStructure>(); break; } case 16: { levelStructure = gameObject.AddComponent <LevelSixteenStructure>(); break; } case 17: { levelStructure = gameObject.AddComponent <LevelSeventeenStructure>(); break; } case 18: { levelStructure = gameObject.AddComponent <LevelEighteenStructure>(); break; } } if (currentLevel != 0) { ProvideGameObjects(levelStructure); ProvideLevelSound(currentLevel); } if (levelStructure != null) { levelStructure.CreateLevelElements(); } }