fixed bug in barks, that was causing UI to disappear to early, fixed issue with bark time calculation, triggers adjustments

This commit is contained in:
2025-05-07 16:03:21 +02:00
parent 96e1408312
commit c9afca7e8d
4 changed files with 931 additions and 978 deletions

View File

@@ -205,10 +205,11 @@ namespace PixelCrushers.DialogueSystem
SetUIElementsActive(true);
if (CanTriggerAnimations() && !string.IsNullOrEmpty(animationTransitions.showTrigger))
{
animator.ResetTrigger(animationTransitions.hideTrigger);
animator.SetTrigger(animationTransitions.showTrigger);
}
CancelInvoke("Hide");
var barkDuration = Mathf.Approximately(0, duration) ? DialogueManager.GetBarkDuration(subtitleText) : duration;
var barkDuration = Math.Max(DialogueManager.GetBarkDuration(subtitleText) ,duration);
if (!(waitUntilSequenceEnds || waitForContinueButton)) Invoke("Hide", barkDuration);
if (waitUntilSequenceEnds) numSequencesActive++;
doneTime = waitForContinueButton ? Mathf.Infinity : (DialogueTime.time + barkDuration);