Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (tutorialController == null)
        {
            return;
        }
        if (tutorialIsActive)
        {
            // Disable the tutorial and allow the player full reign of the game world
            if (DialogueLua.GetVariable("endTutorial").asBool == true)
            {
                // Disable the tutorial
                tutorialController.enabled = false;
                // Enable the quest controller objects
                questController.NoQuestActiveGameObjects();
                tutorialIsActive = false;
                dsc.displaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Optional;
                GameObject.FindObjectOfType <PlayerController>().GetComponentInChildren <TargetIndicator>().tutorial = false;
            }
        }

        // Check for tutorial end
        if (tutorialController.enabled == false && tutorialEnded == false)
        {
            // Enable the quest controller objects
            questController.NoQuestActiveGameObjects();
            tutorialIsActive = false;
            tutorialEnded    = true;
            dsc.displaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Optional;
            GameObject.FindObjectOfType <PlayerController>().GetComponentInChildren <TargetIndicator>().tutorial = false;
            questController.AddTutorialXpToPlayerLevelingSystem(5);
        }
    }