More dialogue improvements, barks stop on dialogue now
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user