Exemple #1
0
        internal void SetupStep()
        {
            Debug.LogFormat("SetupStep: {0} ({1})", step.ToString(), (int)step);

            switch (step)
            {
            case Step.OneFlip:
                gui.ShowText(tr["DragToFlip"]);
                solution.Hide();
                WaitAndHint(new Move(0, Side.Right), 1);
                break;

            case Step.TwoFlip: {
                gui.ShowText(tr["FlipAgain"]);
                solution.Hide();
                controller.SetPuzzle(Puzzle.TutorialTwoFlips());
                WaitAndHint(new Move(1, Side.Left), 2f);
            } break;

            case Step.TwoFlipAgain:
                gui.ShowText(tr["InsideOut"]);
                controller.SetPuzzle(Puzzle.TutorialTwoFlipsAgain());
                WaitAndHint(new Move(1, Side.Right), 3f);
                break;

            case Step.FlipToMatch: {
                gui.ShowText(tr["FlipToMatch"]);
                solution.Show();
                var puzzle = Puzzle.TutorialPuzzleOne(controller.Current);
                controller.SetPuzzle(puzzle);
                controller.FlipFinished += AdvanceIfMatches;
            } break;

            case Step.MatchInMinMoves: {
                gui.ShowText(tr["OptimalSolutions"]);
                var puzzle = Puzzle.TutorialPuzzleTwo();
                controller.SetPuzzle(puzzle);
                gui.movesDisplay.Init(0, 2, false);
                gui.movesDisplay.Show();
                movesArrow.Blink();
                controller.NumMovesChanged += gui.OnNumMovesChanged;
                controller.FlipFinished    += AdvanceIfSolved;
            } break;

            case Step.LevelProgression: {
                gui.ShowText(tr["LevelDetails"]);
                gui.levelDetail.gameObject.SetActive(true);
                gui.levelDetail.OnHoverEnter += OnLevelHoverEnter;
            } break;

            case Step.Ready: {
                gui.ShowText(tr["StartPlaying"]);
                Settings.Instance.TutorialDone = true;
                Tracking.Track(Tracking.LEVEL_TUTORIAL_DONE);
                Invoke("StartGame", 2);
            } break;
            }
        }
Exemple #2
0
        public void SetValue(int val, bool solved)
        {
            var old = current;

            current = val;
            UpdateMovesText();
            if (val == max && old < val && !solved)
            {
                movesSign.Blink();
            }
        }