public void loadNextScene() { if (!canChangeLevel) { return; } ; LevelChanger.Scene nextScene = scenes.Dequeue(); switch (nextScene) { case LevelChanger.Scene.WayToFacility: fadeToLevel("WayToFacilityScene"); break; case LevelChanger.Scene.Facility: fadeToLevel("Facility"); break; case LevelChanger.Scene.video: fadeToLevel("video"); break; case LevelChanger.Scene.sound: fadeToLevel("sound"); break; } onLevelChange(nextScene); }
void onLevelChange(LevelChanger.Scene scene) { print("on level change"); switch (scene) { case LevelChanger.Scene.WayToFacility: startWayToFacility(); break; } }