//Creates the next cave private void createCaveHelper(int cave, bool isExit) { //Deletes the current cave exits caveScript.deleteScene(); //Deletes all the objects on the screen destroyAll(); //If cave is the exit number if (isExit) { //Sets the new cave number and sets up the new cave currentCave = caveScript.SetupScene(cave, currentCave); } else { //If cave is the actual cave number, set new cave number and set up new cave currentCave = cave; caveScript.SetupScene(cave); } //If the cave you are in is adjacent to the APCS class (room 1 or 5), then play the monologue if (journal.availableIndex == 5) { float volume = 0f; if (currentCave == 1 || currentCave == 5) { volume = 0.9f; } if (currentCave == 2 || currentCave == 6 || currentCave == 10 || currentCave == 11) { volume = 0.6f; } if (currentCave == 3 || currentCave == 7) { volume = 0.3f; } //Change volume depending on proximity to APCS class sound.changeMonologueVolume(volume); } else { //If you don't have all journal pages, the volume is 0 sound.changeMonologueVolume(0f); } //Update the ui to show the currentCave ui.updateCave(currentCave); }