More dialogue improvements, barks stop on dialogue now

This commit is contained in:
2025-10-17 12:28:06 +02:00
parent 147c9c4312
commit 1e80a44f7a
7 changed files with 1589 additions and 779 deletions

View File

@@ -23,13 +23,15 @@ namespace Beyond
[Header("Events")]
[Tooltip("Actions to perform if the condition is true.")]
public UnityEvent onConditionTrue;
[Tooltip("Actions to perform if the condition is false.")]
public UnityEvent onConditionFalse;
// This field is used by the custom editor for the Lua wizard.
[HideInInspector]
public DialogueDatabase selectedDatabase = null;
[Tooltip("How often to check the condition (in seconds). If zero, only checks on start/load.")]
public float CheckInterval = 1.0f;
private bool hasFired = false;
@@ -40,6 +42,8 @@ namespace Beyond
{
base.Start();
CheckConditionAndExecute();
if (CheckInterval > 0)
InvokeRepeating("CheckConditionAndExecute", CheckInterval + (Random.value * CheckInterval), CheckInterval);
}
/// <summary>