chore: Project Restructuring & Theatre
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Localization;
|
||||
|
||||
namespace Unheimlich.Features.Dialogue.Data
|
||||
{
|
||||
[System.Serializable]
|
||||
public class DialogueChoiceData
|
||||
{
|
||||
[Header("Choice Content")]
|
||||
[Tooltip("Localized text displayed on the choice button")]
|
||||
public OctoLocalizedTextData ChoiceText;
|
||||
|
||||
[HideInInspector]
|
||||
public string ChoiceTextOverride;
|
||||
|
||||
[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 (!string.IsNullOrEmpty(ChoiceTextOverride))
|
||||
return ChoiceTextOverride;
|
||||
|
||||
if (ChoiceText != null)
|
||||
return OctoLocalization.GetLocalizedText(ChoiceText);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public bool IsValid()
|
||||
{
|
||||
return ChoiceText != null && NextNode != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user