Пример #1
0
    internal void StartDialogue(Dialogue dialogue, bool returnToConversation)
    {
        this.returnToConversation = returnToConversation;
        mainCamera.GetComponent <CinemachineBrain>().enabled = false;
        playerMovement.DisablePlayerMovement();
        animator.SetBool("IsOpen", true);
        canvasOpen = true;
        //Cursor.lockState = CursorLockMode.None;
        sentences.Clear();
        afterDialogueEvent = dialogue.EventAfterID;

        foreach (DialogueUI dialogueUI in dialogue.dialogue)
        {
            sentences.Enqueue(dialogueUI);
        }

        DisplayNextSentence();
    }
Пример #2
0
 public void TriggerEvent(AfterEventList eventID)
 {
     if (eventID == AfterEventList.SHOW_ID_TO_GUARD)
     {
         SetShownGuardIdToTrue();
     }
     else if (eventID == AfterEventList.GO_PAST_GUARD_WITHOUT_SHOWING_ID)
     {
         ShowNoIdDialogueIfNoIdShown();
     }
     else if (eventID == AfterEventList.MOVE_BACK_BEHIND_GUARD)
     {
         StartCoroutine(MovePlayer());
     }
     else if (eventID == AfterEventList.HOMELESS_MAN_CONVERSATION)
     {
         dialogueInitializer.TriggerDialogue(DialogueKeys.HOMELESS_MAN_CONVERSATION, false);
     }
     else if (eventID == AfterEventList.FIRST_MET_DETECTIVE_CORONER)
     {
         SetFirstMetFlagAndGetAutopsyReport();
     }
 }