public bool resetPuzzle() { print(this.GetType().Name + ": reseting puzzle"); UtilBools.puzzleInteractLock(false); EOTPPlayTurn = 0; //reset bool ok = true; for (int li = 0; li < realInput.Count; li++) { for (int i = 0; i < realInput[li].Count; i++) { print(this.GetType().Name + ":EOTPwaitFinish():li/i: " + li + "/" + i); print(this.GetType().Name + ":EOTPwaitFinish():Input Gotten:" + realInput[li][i]); print(this.GetType().Name + ":EOTPwaitFinish():Input Wanted:" + inputs[li].signal[i]); if (realInput[li][i] != inputs[li].signal[i]) { ok = false; } } //reset each list for next check logic realInput[li] = new List <int>(); } stepping = false; stepText.gameObject.SetActive(false); stopStepButton.SetActive(false); //reset powered for (int i = 0; i < outputs.Count; i++) { POutputController curOutObj = outputObjs[i].GetComponent <POutputController>(); curOutObj.beingPowered = false; curOutObj.tryPower(false); curOutObj.sendPower(-1); } return(ok); }
public void autoPlay() { resetPuzzle(); print(this.GetType().Name + ": Starting autoplay puzzle!"); UtilBools.puzzleInteractLock(true); puzzlePlay(false); GC.audioMixer.playButtonSFX(); }
//stepping logic public void stepPlay() { stopStepButton.SetActive(true); stepping = true; UtilBools.puzzleInteractLock(true); if (EOTPPlayTurn < outputs[0].signal.Length) { puzzlePlay(true); } else { checkResult(); stopStepButton.SetActive(false); //print(this.GetType().Name + ":puzzlePlay(): finished"); } GC.audioMixer.playButtonSFX(); }