示例#1
0
    private BMazeFinishline CreateFinishline(MazeCell cell, MazeDirection direction)
    {
        BMazeFinishline finish = Instantiate(finishPrefab).GetComponent <BMazeFinishline>();

        finish.Initialize(cell, direction);
        return(finish);
    }
示例#2
0
    IEnumerator RunTutorial()
    {
        isTutorialRunning = true;
        scoreGoal         = 2;
        doorInstance      = tutorialDoor;
        finishLine        = tutorialFinishline;
        tutorial.SetActive(true);
        print("RunTutorial");
        ScoreGauge.Instance.gameObject.SetActive(false);
        TimerClock.Instance.gameObject.SetActive(false);
        yield return(new WaitForSeconds(0.25f));

        SubtitlePanel.Instance.Display("Welcome to Brain Maze!", null);
        SoundManager.Instance.StopPlayingVoiceOver();
        AudioClip tutorial1 = voData.FindVO("1_tutorial_start");
        AudioClip tutorial2 = voData.FindVO("2_tutorial_drag");
        AudioClip tutorial3 = voData.FindVO("3_tutorial_letmeshow");

        SoundManager.Instance.PlayVoiceOverClip(tutorial1);
        yield return(new WaitForSeconds(tutorial1.length));

        SubtitlePanel.Instance.Hide();
        monsterStart = tutorialStartingSpot;
        CreateMonster();
        playerMonster.transform.localScale = Vector3.one * 0.25f;
        inputAllowed = false;

        SoundManager.Instance.PlayVoiceOverClip(tutorial2);
        yield return(new WaitForSeconds(tutorial2.length));

        SoundManager.Instance.PlayVoiceOverClip(tutorial3);
        yield return(new WaitForSeconds(tutorial3.length));

        tutorialHand.SetActive(true);
        tutorialHand.GetComponent <Animator> ().Play("BMaze_HandMoveMonster");
        Transform monsterParent = playerMonster.transform.parent;

        yield return(new WaitForSeconds(1.5f));

        playerMonster.transform.SetParent(tutorialHand.transform);
        yield return(new WaitForSeconds(1.5f));

        playerMonster.transform.SetParent(monsterParent);
        yield return(new WaitForSeconds(1.5f));

        SubtitlePanel.Instance.Display("Now you try!");
        SoundManager.Instance.PlayVoiceOverClip(
            voData.FindVO("nowyoutry")
            );

        ResetScore();
        playerMonster.transform.position = monsterStart.position;
        tutorialPickup.SetActive(true);
        inputAllowed = true;
        SubtitlePanel.Instance.Hide();
        yield return(new WaitForSeconds(2f));

        SubtitlePanel.Instance.Display("Get all the pickups!", null);
        yield return(new WaitForSeconds(5f));

        SubtitlePanel.Instance.Hide();
    }