public void RaiseEvent(DialogueLineSO line)
 {
     if (OnEventRaised != null)
     {
         OnEventRaised.Invoke(line);
     }
 }
示例#2
0
 /// <summary>
 /// Displays a line of dialogue in the UI, by requesting it to the <c>DialogueManager</c>.
 /// This function is also called by <c>DialogueBehaviour</c> from clips on Timeline during cutscenes.
 /// </summary>
 /// <param name="dialogueLine"></param>
 public void DisplayDialogueLine(DialogueLineSO dialogueLine)
 {
     //TODO: Interface with a UIManager to allow displayal of the line of dialogue in the UI
     //Debug.Log("A line of dialogue has been spoken: \"" + dialogueLine.Sentence + "\" by " + dialogueLine.Actor.ActorName);
     if (dialogueLineEvent != null)
     {
         dialogueLineEvent.OnEventRaised(dialogueLine);
     }
 }
示例#3
0
 public void SetDialogue(DialogueLineSO dialogueLine)
 {
     lineText.StringReference      = dialogueLine.Sentence;
     actorNameText.StringReference = dialogueLine.Actor.ActorName;
 }
示例#4
0
 /// <summary>
 /// Called to begin a dialogue, i.e. a sequence of lines that require the player's input to move forward.
 /// </summary>
 /// <param name="firstLine"></param>
 public void BeginDialogue(DialogueLineSO firstLine)
 {
     _inputReader.EnableDialogueInput();
     DisplayDialogueLine(firstLine);
 }
    /// <summary>
    /// Called to begin a dialogue, i.e. a sequence of lines that require the player's input to move forward.
    /// </summary>
    /// <param name="firstLine"></param>
    public void BeginDialogue(DialogueLineSO firstLine)
    {
        _inputReader.gameInput.Dialogues.Enable();

        DisplayDialogueLine(firstLine);
    }
示例#6
0
 public void PlayDialogueFromClip(DialogueLineSO dialogueLine)
 {
     _dialogueManager.DisplayDialogueLine(dialogueLine);
 }
示例#7
0
 public void OpenUIDialogue(DialogueLineSO dialogueLine)
 {
     dialogueController.SetDialogue(dialogueLine);
     dialogueController.gameObject.SetActive(true);
 }
示例#8
0
 /// <summary>
 /// Displays a line of dialogue in the UI, by requesting it to the <c>DialogueManager</c>.
 /// This function is also called by <c>DialogueBehaviour</c> from clips on Timeline during cutscenes.
 /// </summary>
 /// <param name="dialogueLine"></param>
 public void DisplayDialogueLine(DialogueLineSO dialogueLine)
 {
     //TODO: Interface with a UIManager to allow displayal of the line of dialogue in the UI
     //Debug.Log("A line of dialogue has been spoken: \"" + dialogueLine.Sentence + "\" by " + dialogueLine.Actor.ActorName);
     UIManager.Instance.OpenUIDialogue(dialogueLine);
 }