public void PuzzleSolvedTrigger() { if (OnPuzzleSolved != null) { OnPuzzleSolved.Invoke(); } }
protected virtual void OnSolve(GameObject solutionItem) { if (PuzzleSolved) { OnPuzzleSolved?.Invoke(solutionItem); } }
/// <summary> /// Triggers the game over. /// </summary> private void TriggerGameOver() { SoundController.Instance.PlayAudioClip(SoundSettingsKey.Postgamesoundsequence); iOSHapticFeedback.OnSelection(); print("[TEST] TriggerGameOver"); SceneActivationBehaviour <BoardUIActivator> .Instance.HintRequested -= TryDeliverHint; // disables input isPaused = true; // then fires OnPuzzleSolved?.Invoke(gameData); // stops time SetTimer(false); }
private void FlipSwitch(Grid <Switch> .Cell cell) { PlaySound(); for (var x = cell.X - Range; x <= cell.X + Range; x++) { for (var y = cell.Y - Range; y <= cell.Y + Range; y++) { if (grid.InBounds(x, y)) { grid[x, y].Value?.FlipSwitch(); } } } if (IsSolved()) { OnPuzzleSolved.Invoke(); } }