public UnityAction StartPuzzle(Puzzle puzzle) { Puzzle puzzleRefCopy = puzzle; return(() => { if (currentPuzzle != null) { currentPuzzle.SaveProgress(); } el.ClearExampleList(); gc.SetPuzzle(puzzleRefCopy); //puzzleRefCopy.LoadProgress(); List <Board> testedExamples = puzzleRefCopy.testedExamples; foreach (Board board in testedExamples) { el.AddExample(board); } if (!el.ContainsExample(puzzleRefCopy.example1)) { el.AddExample(puzzleRefCopy.example1); } if (!el.ContainsExample(puzzleRefCopy.example2)) { el.AddExample(puzzleRefCopy.example2); } ssc.SwapTo(el.GetComponent <Animator>()); currentPuzzle = puzzleRefCopy; }); }
UnityEngine.Events.UnityAction SetPuzzleComplete(ScreenSelectionController screenCont, GameController gc) { GameController gcc = gc; ScreenSelectionController ssc = screenCont; return(() => { gcc.SetPuzzleCompleted(); ssc.HideMessage(); ssc.SwapTo(puzzleSelect); }); }
public void ToggleToolGrid() { if (isOpen) { screenCont.GoBack(); isOpen = false; } else { screenCont.SwapTo(toolGrid); isOpen = true; } }