OctoCore 0.0.1

This commit is contained in:
Alexandre Coirier
2026-02-09 23:53:14 +01:00
parent 85bf743cba
commit 80d0faf8a7
235 changed files with 13656 additions and 32 deletions
@@ -0,0 +1,43 @@
using UnityEngine;
using OctoCore.Localization;
namespace OctoCore.Dialogue
{
/// <summary>
/// Dialogue choice with condition and next dialogue.
/// </summary>
[System.Serializable]
public class OctoDialogueChoice
{
/// <summary>
/// Localized text for this choice.
/// </summary>
[Tooltip("Localized text for this choice")]
public OctoLocalizedTextData Text;
/// <summary>
/// Condition to display this choice.
/// If null or condition is true, choice is available.
/// </summary>
[Tooltip("Condition to display this choice (null = always show)")]
public OctoDialogueCondition Condition;
/// <summary>
/// Next dialogue to load when this choice is selected.
/// If null, dialogue ends.
/// </summary>
[Tooltip("Next dialogue when selected (null = end dialogue)")]
public Data.OctoDialogueData NextDialogue;
/// <summary>
/// Check if this choice should be available.
/// </summary>
public bool IsAvailable()
{
if (Condition == null)
return true;
return Condition.Evaluate();
}
}
}