Пример #1
0
    protected void selectTutorial()
    {
        for (int i = 0; i < allTutorials.Count; i++)
        {
            if (!PersistentData.GetInstance().fromLevelsToGame&& !PersistentData.GetInstance().fromLevelBuilder)
            {
                if (PersistentData.GetInstance().getRandomLevel().name == allTutorials [i].levelName)
                {
                    currentTutorial = allTutorials [i];
                    currentTutorial.gameObject.SetActive(true);
                }
            }
            else
            {
                if (PersistentData.GetInstance().currentLevel.name == allTutorials [i].levelName)
                {
                    currentTutorial = allTutorials [i];
                    currentTutorial.gameObject.SetActive(true);
                }
            }
        }

        if (currentTutorial != null)
        {
            moveTutorialToNextPhase();
        }
        else
        {
            this.enabled = false;
        }
    }
Пример #2
0
    public void NextTutorial()
    {
        HideTutorialUI();

        TutorialTable table = DataManager.GetInstance().GetTutorial(nowTutorial, nowCount);

        if (table == null)
        {
            messageBox.HideMessageBox(() =>
            {
                EndTutorial();
            });
        }
        else
        {
            messageBox.SetMessageBox(table.textIdx, table.targetPos, () =>
            {
                blocker.SetAllBlock(true);
                switch (table.emphasis)
                {
                case Define.TutorialEmphasis.NoEmphasis:
                    emphasis.SetAllBlind(true);
                    break;

                case Define.TutorialEmphasis.JustEmphasis:
                    emphasis.SetEmphasis(table.targetPos, table.targetSize);
                    break;

                case Define.TutorialEmphasis.EmphasisTarget:
                    emphasis.SetEmphasis(table.targetPos, table.targetSize);
                    break;
                }

                TutorialBase tutorial = GetTutorial(table.tutorialType);
                if (tutorial != null)
                {
                    tutorial.CallMethod(table.method);
                }

                StartCoroutine(DelayFunc(delayTime, () =>
                {
                    Vector3 pos = new Vector3(-370f, 0f, 0f);
                    if (table.targetPos.y >= 0f)
                    {
                        pos.y = bottomHeight;
                    }
                    else
                    {
                        pos.y = topHeight;
                    }

                    switch (table.emphasis)
                    {
                    case Define.TutorialEmphasis.NoEmphasis:
                        blocker.SetTouchTarget();
                        break;

                    case Define.TutorialEmphasis.JustEmphasis:
                        blocker.SetTouchTarget();
                        break;

                    case Define.TutorialEmphasis.EmphasisTarget:
                        blocker.SetEmphasis(table.blockPos, table.blockSize);
                        pos = table.blockPos;
                        break;
                    }

                    nowCount++;
                    SetReaction(pos);
                }));
            });
        }
    }