// Script to take in value indicating Yes button was clicked. public void SetYes() { // If the yes/no buttons are being used on a puzle completed screen. if (askingReplay) { // Hide the puzzle completion UI. ShowCompletion(false); //TODO fix this part. // Somewhere in here the references to each slider gets messed up. // reload the puzzle cubeMgr.InitializeSolution(cubeMgr.puzzleBeingSolved); // hide the puzzle selection menu after clicking the level button //cubeMgr.puzzleSelector.SetActive(!cubeMgr.puzzleSelector.activeSelf); // Get the name of the last puzzle that was run, and re-initialize it. return; } // If yes was clicked, save the puzzle anyway, overwriting the old version // then hide the input dialog and yes/no buttons. yesNoValue = 1; // Save the puzzle here, but now with having the yesNo value set to 1, so it will overwrite // the old puzzle solution with the same name. buildScript.MakePuzzle(); ToggleYesNo(); SetInputStatus(false); // Allow the rest of the UI to be used again. }
public void TaskOnClick() { // load the puzzle //cubeMgr.InitializePuzzle(puzzleName); cubeMgr.InitializeSolution(puzzleName); // hide the puzzle selection menu after clicking the level button cubeMgr.puzzleSelector.SetActive(!cubeMgr.puzzleSelector.activeSelf); }