Exemplo n.º 1
0
    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;
        });
    }
Exemplo n.º 2
0
    UnityEngine.Events.UnityAction SetPuzzleComplete(ScreenSelectionController screenCont, GameController gc)
    {
        GameController            gcc = gc;
        ScreenSelectionController ssc = screenCont;

        return(() =>
        {
            gcc.SetPuzzleCompleted();
            ssc.HideMessage();
            ssc.SwapTo(puzzleSelect);
        });
    }
Exemplo n.º 3
0
 public void ToggleToolGrid()
 {
     if (isOpen)
     {
         screenCont.GoBack();
         isOpen = false;
     }
     else
     {
         screenCont.SwapTo(toolGrid);
         isOpen = true;
     }
 }