diff --git a/Assets/Fungus/Narrative/Scripts/ISayDialog.cs b/Assets/Fungus/Narrative/Scripts/ISayDialog.cs
index dd93b925..e682587d 100644
--- a/Assets/Fungus/Narrative/Scripts/ISayDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/ISayDialog.cs
@@ -22,9 +22,13 @@ namespace Fungus
///
/// Sets the character image to display on the Say Dialog.
///
- /// Image.
void SetCharacterImage(Sprite image);
+ ///
+ /// Sets the character name to display on the Say Dialog.
+ ///
+ void SetCharacterName(string name, Color color);
+
///
/// Write a line of story text to the Say Dialog.
///
@@ -46,5 +50,10 @@ namespace Fungus
/// Stop the Say Dialog while its writing text.
///
void Stop();
+
+ ///
+ /// Stops writing text and clears the Say Dialog.
+ ///
+ void Clear();
}
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/SayDialog.cs b/Assets/Fungus/Narrative/Scripts/SayDialog.cs
index fda8059a..5f7923ee 100644
--- a/Assets/Fungus/Narrative/Scripts/SayDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/SayDialog.cs
@@ -158,7 +158,7 @@ namespace Fungus
}
}
- public virtual IEnumerator SayInternal(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete)
+ protected virtual IEnumerator SayInternal(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete)
{
IWriter writer = GetWriter();
@@ -238,23 +238,6 @@ namespace Fungus
}
}
- public virtual void SetCharacterName(string name, Color color)
- {
- if (nameText != null)
- {
- nameText.text = name;
- nameText.color = color;
- }
- }
-
- public virtual void Clear()
- {
- ClearStoryText();
-
- // Kill any active write coroutine
- StopAllCoroutines();
- }
-
protected virtual void ClearStoryText()
{
if (storyText != null)
@@ -262,7 +245,7 @@ namespace Fungus
storyText.text = "";
}
}
-
+
public static void StopPortraitTweens()
{
// Stop all tweening portraits
@@ -406,6 +389,15 @@ namespace Fungus
}
}
+ public virtual void SetCharacterName(string name, Color color)
+ {
+ if (nameText != null)
+ {
+ nameText.text = name;
+ nameText.color = color;
+ }
+ }
+
public virtual void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete)
{
StartCoroutine(SayInternal(text, clearPrevious, waitForInput, fadeWhenDone, stopVoiceover, voiceOverClip, onComplete));
@@ -419,6 +411,14 @@ namespace Fungus
GetWriter().Stop();
}
+ public virtual void Clear()
+ {
+ ClearStoryText();
+
+ // Kill any active write coroutine
+ StopAllCoroutines();
+ }
+
#endregion
}
}