public void PlayLipSyncAnimation()
    {
        visemes            = dialogueData.generatedVisemes;
        currentVisemeIndex = 0;
        AssignCurrentVisemeData();

        OnDialogueStarted?.Invoke(dialogueData);
    }
 public virtual void StartDialogue(ConversationWithActions newConversation, bool skip)
 {
     if ((DialogueIsRunning && !skip) || newConversation == null)
     {
         return;
     }
     enabled = true;
     Setup(newConversation);
     TriggerCurrentEvent();
     OnDialogueStarted?.Invoke();
 }
Exemple #3
0
    // Pop up the dialogue screen and start the conversation
    public void OpenDialogue(Npc npc, List <DialogueNode> nodes, DialogueNode startingNode)
    {
        m_CurrentNpc    = npc;
        m_DialogueNodes = nodes;
        DialogueNode firstNode = startingNode;

        //m_NameText.text = m_CurrentNpc.TalkData.Name;

        OnDialogueStarted?.Invoke(npc);

        SetAnimation(true);
        StartDialogue(firstNode);
    }
        public void StartDialogue(DialogueSO dialogue)
        {
            OnDialogueStarted?.Invoke();

            animator.SetBool("IsOpen", true);

            nameText.text = dialogue.objectName;

            sentences.Clear();

            foreach (string sentence in dialogue.sentences)
            {
                sentences.Enqueue(sentence);
            }



            DisplayNextSentence();
        }