Browse Source

Added continue image hiding back.

master
chrisgregan 11 years ago
parent
commit
891158d1df
  1. 12
      Assets/Fungus/Dialog/Scripts/SayDialog.cs
  2. BIN
      Assets/Shuttle/ShuttleGame.unity

12
Assets/Fungus/Dialog/Scripts/SayDialog.cs

@ -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)

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save