|
|
@ -8,6 +8,8 @@ namespace Fungus.Script |
|
|
|
|
|
|
|
|
|
|
|
public class SayDialog : Dialog |
|
|
|
public class SayDialog : Dialog |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
public Image continueImage; |
|
|
|
|
|
|
|
|
|
|
|
public void Say(string text, Action onComplete) |
|
|
|
public void Say(string text, Action onComplete) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Clear(); |
|
|
|
Clear(); |
|
|
@ -18,6 +20,7 @@ namespace Fungus.Script |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
StartCoroutine(WriteText(text, delegate { |
|
|
|
StartCoroutine(WriteText(text, delegate { |
|
|
|
|
|
|
|
ShowContinueImage(true); |
|
|
|
|
|
|
|
|
|
|
|
StartCoroutine(WaitForInput(delegate { |
|
|
|
StartCoroutine(WaitForInput(delegate { |
|
|
|
Clear(); |
|
|
|
Clear(); |
|
|
@ -34,6 +37,15 @@ namespace Fungus.Script |
|
|
|
protected override void Clear() |
|
|
|
protected override void Clear() |
|
|
|
{ |
|
|
|
{ |
|
|
|
base.Clear(); |
|
|
|
base.Clear(); |
|
|
|
|
|
|
|
ShowContinueImage(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ShowContinueImage(bool visible) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (continueImage != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continueImage.enabled = visible; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IEnumerator WaitForInput(Action onInput) |
|
|
|
IEnumerator WaitForInput(Action onInput) |
|
|
|