using UnityEngine; using EasyTalk.Nodes.Core; using EasyTalk.Controller; using System.Collections.Generic; namespace EasyTalk.Nodes.Common { /// /// A node for appending text to the current conversation. /// public class AppendNode : Node, DialogueFlowNode { /// /// The text to append. /// [SerializeField] private string text = ""; /// /// The audio clip to play. /// [SerializeField] private AudioClip audioClip; /// /// The audio clip file attributed to the line of dialogue. /// [SerializeField] private string audioClipFile; /// /// The asset ID of the audio file attributed to the line of dialogue. /// [SerializeField] private int audioAssetID; /// /// Creates a new AppendNode. /// public AppendNode() { this.name = "APPEND"; this.nodeType = NodeType.APPEND; } /// /// Gets or sets the text to append. /// public string Text { get { return text; } set { text = value; } } /// /// Gets or sets the audio clip to play. /// public AudioClip AudioClip { get { return this.audioClip; } set { this.audioClip = value; } } /// /// Gets or sets the asset ID of the audio clip attributed to the text. /// public int AudioAssetID { get { return this.audioAssetID; } set { this.audioAssetID = value; } } /// /// Gets or sets the audio clip file path attributed to the text. /// public string AudioClipFile { get { return this.audioClipFile; } set { this.audioClipFile = value; } } /// public NodeConnection GetFlowInput() { return Inputs[0]; } /// public NodeConnection GetFlowOutput() { return Outputs[0]; } } }