Browse Source

Added continue image hiding back.

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

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

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

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save