public override void OnExecute(IDialogueOwner dialogueOwner) { if (_timerHelper == null) { _timerHelper = TimerUtility.GetTimer(); } _timerHelper.StartTimer(waitTime, null, OnTimerEnded); // Finish(true); // Finish once time is completed. }
public void StartTimer() { if (timer == null) { timer = TimerUtility.GetTimer(); } StopTimer(); startTime = DateTime.Now; NotifyTimerStarted(); timerID = timer.StartTimer(timeLimitInSeconds, NotifyTimerUpdated, NotifyReachedTimeLimit); }
public override void OnExecute(IDialogueOwner dialogueOwner) { waitTime = 0; // Reset wait time incase the node is being replayed. if (_timerHelper == null) { _timerHelper = TimerUtility.GetTimer(); } if (audioInfo.audioClip.val != null) { waitTime += audioInfo.audioClip.val.length; } else { DevdogLogger.LogError("[WaitForAudioNode] - Audio clip is missing from node: " + index + ". Dialogue: " + dialogueOwner.dialogue.name + "."); } waitTime += additionalWaitTime; _timerHelper.StartTimer(waitTime, null, OnTimerEnded); // Finish(true); // Finish once time is completed. }