Esempio n. 1
0
    /// Run an internal command.
    public override IEnumerator RunCommand(Yarn.Command command)
    {
        // "Perform" the command
        //Debug.Log("Command: " + command.text);
        //Debug.Log("listenToJordy Variable: " + Choices.listenedToJordy);
        if (command.text.StartsWith("setscene") && inBrainRoom)
        {
            if (command.text == "setscene Dryve")
            {
                EventManager.TriggerEvent("ExitBrainRoom");
                cameraTransition.ZoomOut();
            }
            else
            {
                EventManager.TriggerEvent("ExitBrainRoomQuick");
            }
            inBrainRoom = false;
        }
        switch (command.text)
        {
        case "setscene innerDateCut":
            EventManager.TriggerEvent("EnterBrainRoomQuick");
            cameraTransition.ToggleBrainRoomCut();
            inBrainRoom = true;
            break;

        case "setscene innerDate":
            EventManager.TriggerEvent("EnterBrainRoom");
            cameraTransition.ZoomIn();
            inBrainRoom = true;
            break;

        case "setScene nextScene":
            sceneHandler.LoadNextScene();
            break;

        case "setscene 06_Ending_SecondDate":
            sceneHandler.LoadScene("06_Ending_SecondDate");
            break;

        case "setscene 07_Ending_Jordy":
            if (Choices.listenedToJordy)
            {
                sceneHandler.LoadScene("07_Ending_Jordy");
            }
            else
            {
                sceneHandler.LoadScene("08_Ending_Alone");
            }
            break;

        case "setscene 08_Ending_Alone":
            sceneHandler.LoadScene("08_Ending_Alone");
            break;

        case "listenToJordy":
            Choices.listenedToJordy = true;
            break;

        case "setscene 09_Credits":
            StartCoroutine(RollCredits());
            break;

        default:
            inBrainRoom = false;
            break;
        }
        yield break;
    }