public void ResetProgress() { buttonCanvas.HideOverlay(); #if DEVELOPMENT_BUILD || UNITY_EDITOR if (engine != null) { buttonCanvas.ShowQuestionOverlay("Since this is a development build, we will restart from the beginning of the current module.\n\nTesters: please test different ways to progress through the module!", "Reset", "Do not reset", delegate(string pressedButton) { buttonCanvas.HideOverlay(); if (pressedButton == "Do not reset") { buttonCanvas.ShowOptionsOverlay(closeDelegate); } else { gameState.ResetFlags(gameState.GetFlagsStartingWith(gameState.moduleName + "%")); gameState.BackToMapScene(); } }); } #endif buttonCanvas.ShowQuestionOverlay("Are you sure you want to reset your game progress?", "Reset", "Do not reset", delegate(string pressedButton) { buttonCanvas.HideOverlay(); if (pressedButton == "Do not reset") { buttonCanvas.ShowOptionsOverlay(closeDelegate); } else { buttonCanvas.ShowQuestionOverlay("Are you REALLY sure?\n\nALL YOUR CURRENT PROGRESS WILL BE LOST.\nYou will restart from the very beginning.", "Do not reset", "I'm sure, reset!", delegate(string pressedButton2) { buttonCanvas.HideOverlay(); if (pressedButton2 == "Do not reset") { buttonCanvas.ShowOptionsOverlay(closeDelegate); } else { gameState.ResetFlags(); gameState.BackToMapScene(); } }); } }); }