new void Update() { if (!Input.GetMouseButton(0) && !globalCanPick) { canPick = true; } if (isWaitingForActionToComplete) { return; } if (actionState == 0) { isWaitingForActionToComplete = true; } else if (actionState == 1) { string returnToLocation = mcRef.getSavedLocation(); if (!lose) { string currentWell = mcRef.getStorage().retrieveStringValue("CurrentWell"); mcRef.getStorage().storeBoolValue(currentWell, true); int num = mcRef.getStorage().retrieveIntValue("FirstWellDone"); mcRef.getStorage().storeIntValue("FirstWellDone", ++num); } int nWells; nWells = mcRef.getStorage().retrieveIntValue("TotalWells"); mcRef.getStorage().storeIntValue("TotalWells", nWells + 1); mcRef.setVolume(0.0f, 1.5f); mcRef.selectMixer(0); mcRef.playMusic(); mcRef.setVolume(1.0f, 1.5f); SceneManager.LoadScene(returnToLocation); } }