35 lines
953 B
C#
35 lines
953 B
C#
using UnityEngine;
|
|
using OctoCore.Localization;
|
|
|
|
namespace Unheimlich.Data.Dialogues
|
|
{
|
|
[System.Serializable]
|
|
public class DialogueChoiceData
|
|
{
|
|
[Header("Choice Content")]
|
|
[Tooltip("Localized text displayed on the choice button")]
|
|
public OctoLocalizedTextData ChoiceText;
|
|
|
|
[Header("Flow")]
|
|
[Tooltip("Direct reference to the next DialogueNode")]
|
|
public DialogueNode NextNode;
|
|
|
|
[Header("Conditions (Optional)")]
|
|
[Tooltip("Required condition to display this choice (optional, for future use)")]
|
|
public string RequiredCondition;
|
|
|
|
public string GetLocalizedChoiceText()
|
|
{
|
|
if (ChoiceText != null)
|
|
return OctoLocalization.GetLocalizedText(ChoiceText);
|
|
|
|
return string.Empty;
|
|
}
|
|
|
|
public bool IsValid()
|
|
{
|
|
return ChoiceText != null && NextNode != null;
|
|
}
|
|
}
|
|
}
|