private void InteractWithQuestGiver()
 {
     MainCamera.SetActive(false);
     CurrentQuestCamera = QuestGiver[CurrentQuest].ReadQuestCamera();
     CurrentQuestCamera.SetActive(true);
     Cursor.visible = true;
     playerController.isDialogActive(true);
     interactionScript.SetDialogState(true);
     PlayerTransform.position = new Vector3(QuestGiver[CurrentQuest].ReadQuestPlayerPosition().position.x, PlayerTransform.position.y, QuestGiver[CurrentQuest].ReadQuestPlayerPosition().position.z);
     PlayerTransform.rotation = QuestGiver[CurrentQuest].ReadQuestPlayerPosition().rotation;
 }
Exemple #2
0
    private void OverviewOfStoryProgression()
    {
        //first Conversation

        if (questInteraction.ReadCurrentQuest() == 1 && ConversationProgress == 0 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
            MainCamera.SetActive(false);
        }
        else if (questInteraction.ReadCurrentQuest() == 1 && ConversationProgress == 1 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 1 && ConversationProgress == 2 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 1 && ConversationProgress == 3 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
            print(AnswerTextLines[ConversationProgress]);
        }
        else if (questInteraction.ReadCurrentQuest() == 1 && ConversationProgress == 4 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
            UseCutsceneCamera();
            CurrentCutsceneCamera.SetActive(true);
            QuestCamera.SetActive(false);
            MyQuestUI.SetActive(false);
            MainUI.SetActive(true);
            Cursor.visible = false;
            questInteraction.AddToCurrentQuest();
            playerController.isDialogActive(false);
            havePlayedAudio = false;
            ThisAudioSource.Stop();
        }

        //second conversation
        if (questInteraction.ReadCurrentQuest() == 2 && ConversationProgress == 5 && HasConversationStarted)
        {
            if (!ThisAudioSource.isPlaying && !havePlayedAudio)
            {
                ThisAudioSource.PlayOneShot(VoiceLines[ConversationProgress], 1f);
                havePlayedAudio = true;
            }
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 2 && ConversationProgress == 6 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 2 && ConversationProgress == 7 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 2 && ConversationProgress == 8 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
            UseCutsceneCamera();
            CurrentCutsceneCamera.SetActive(true);
            QuestCamera.SetActive(false);
            MyQuestUI.SetActive(false);
            MainUI.SetActive(true);
            Cursor.visible = false;
            questInteraction.AddToCurrentQuest();
            playerController.isDialogActive(false);
            havePlayedAudio = false;
            ThisAudioSource.Stop();
        }

        //Third Conversation
        else if (questInteraction.ReadCurrentQuest() == 3 && ConversationProgress == 9 && HasConversationStarted)
        {
            if (!ThisAudioSource.isPlaying && !havePlayedAudio)
            {
                ThisAudioSource.PlayOneShot(VoiceLines[ConversationProgress], 1f);
                havePlayedAudio = true;
            }
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 3 && ConversationProgress == 10 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
        }
        else if (questInteraction.ReadCurrentQuest() == 3 && ConversationProgress == 11 && HasConversationStarted)
        {
            SetDialogAndAnswerText(ConversationProgress);
            UseCutsceneCamera();
            CurrentCutsceneCamera.SetActive(true);
            QuestCamera.SetActive(false);
            MyQuestUI.SetActive(false);
            MainUI.SetActive(true);
            Cursor.visible = false;
            questInteraction.AddToCurrentQuest();
            playerController.isDialogActive(false);
            havePlayedAudio = false;
            ThisAudioSource.Stop();
        }
    }