From 8dc9d0e93dfaf214c6a5f76304c1d0391cee2694 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 23 Sep 2014 17:11:58 +0100 Subject: [PATCH] #36 Added StopAllCoroutines() to Dialog.Clear() --- Assets/Fungus/Dialog/Scripts/Dialog.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Assets/Fungus/Dialog/Scripts/Dialog.cs b/Assets/Fungus/Dialog/Scripts/Dialog.cs index deb81837..7c838257 100644 --- a/Assets/Fungus/Dialog/Scripts/Dialog.cs +++ b/Assets/Fungus/Dialog/Scripts/Dialog.cs @@ -353,6 +353,17 @@ namespace Fungus protected virtual void Clear() { ClearStoryText(); + + // Reset control variables + currentSpeed = 60; + currentPunctuationPause = 0.25f; + boldActive = false; + italicActive = false; + colorActive = false; + colorText = ""; + + // Kill any active write coroutine + StopAllCoroutines(); } protected virtual void ClearStoryText()