public void Notify() { if (solved) { return; } foreach (PillarControlButton button in buttons) { if (button.moveUp != null && !button.moveUp.PillarCentred()) { return; } if (button.moveDown != null && !button.moveDown.PillarCentred()) { return; } if (button.moveLeft != null && !button.moveLeft.PillarCentred()) { return; } if (button.moveRight != null && !button.moveRight.PillarCentred()) { return; } } outcome.Activate(); solved = true; }
public void UpdateProgress(Outcome activator) { if (ActivatedOutcomes.Contains(activator)) { return; } puzzlesSolved++; if (puzzlesSolved >= puzzlesToSolve) { StartCoroutine(OverTime.FadeVolume(musicPlayer, fadeDuration)); outcome.Activate(); } }
public void Notify() { //If the puzzle has already been solved, don't continue; if (solved) { return; } Debug.Log(units.Count); //If combination is incorrect, don't proceed. foreach (CombinationUnit unit in units) { if (!unit.IsAtTargetValue()) { return; } } //Else, raise the bridge and set as solved. Debug.Log("Correct!"); outcome.Activate(); solved = true; }
protected virtual void SetSolved() { puzzleSolved = true; result.Activate(); }