Ejemplo n.º 1
0
 public void PuzzleSolvedTrigger()
 {
     if (OnPuzzleSolved != null)
     {
         OnPuzzleSolved.Invoke();
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnSolve(GameObject solutionItem)
 {
     if (PuzzleSolved)
     {
         OnPuzzleSolved?.Invoke(solutionItem);
     }
 }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
        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();
            }
        }