using EasyTalk.Nodes.Core;
using System;
using UnityEngine;
namespace EasyTalk.Nodes.Common
{
///
/// A node which allows dialogue options to be presented to the player.
///
[Serializable]
public class OptionNode : ListNode, DialogueFlowNode
{
///
/// Creates a new OptionNode.
///
public OptionNode()
{
this.name = "OPTION";
this.nodeType = NodeType.OPTION;
}
///
public NodeConnection GetFlowInput()
{
return FindFlowInputs()[0];
}
///
public NodeConnection GetFlowOutput()
{
return FindFlowOutputs()[0];
}
}
///
/// Defines a dialogue option item.
///
[Serializable]
public class OptionItem : ListItem
{
///
/// The text of the dialogue option.
///
[SerializeField]
public string text;
///
/// Creates a new OptionItem.
///
public OptionItem() { }
///
/// Creates a new OptionItem with the provided text value.
///
/// The text of the dialogue option.
public OptionItem(string text)
{
this.text = text;
}
}
}