public void CompletePuzzle() { if (completed) { return; } completed = true; Debug.Log("Block Push Puzzle Completed"); OnPuzzleCompleted?.Invoke(); }
public void TileFlipped(IntPair position) { if (GetIndex(position) == -1) { return; } //center FlipTile(position); //up FlipTile(new IntPair(position.x, position.y + 1)); //right FlipTile(new IntPair(position.x + 1, position.y)); //down FlipTile(new IntPair(position.x, position.y - 1)); //left FlipTile(new IntPair(position.x - 1, position.y)); if (PuzzleIsCompleted()) { OnPuzzleCompleted?.Invoke(); Debug.Log("Tile Lights Puzzle Completed"); } }
protected void OnPuzzleComplete() { Game.WorkingOnPuzzle = false; OnPuzzleCompleted?.Invoke(); }