From 5f6ade578c5ad910b49361437b22843a7b5a7dad Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 28 Aug 2014 14:41:26 +0100 Subject: [PATCH] Handle Choose with no AddOption commands --- Assets/Fungus/Dialog/Commands/Choose.cs | 7 +++---- Assets/Fungus/Dialog/Scripts/SayDialog.cs | 14 +------------- Assets/Shuttle/ShuttleGame.unity | Bin 110476 -> 110340 bytes 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/Assets/Fungus/Dialog/Commands/Choose.cs b/Assets/Fungus/Dialog/Commands/Choose.cs index e695ad53..9850a37a 100644 --- a/Assets/Fungus/Dialog/Commands/Choose.cs +++ b/Assets/Fungus/Dialog/Commands/Choose.cs @@ -44,16 +44,15 @@ namespace Fungus.Script activeDialog = dialog; } - dialog.ShowDialog(true); - - dialog.SetCharacter(character); - if (options.Count == 0) { Continue(); } else { + dialog.ShowDialog(true); + dialog.SetCharacter(character); + List dialogOptions = new List(); foreach (Option option in options) { diff --git a/Assets/Fungus/Dialog/Scripts/SayDialog.cs b/Assets/Fungus/Dialog/Scripts/SayDialog.cs index 4e8c6303..206ad85d 100644 --- a/Assets/Fungus/Dialog/Scripts/SayDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/SayDialog.cs @@ -8,8 +8,6 @@ namespace Fungus.Script public class SayDialog : Dialog { - public Image continueImage; - public void Say(string text, Action onComplete) { Clear(); @@ -20,8 +18,7 @@ namespace Fungus.Script } StartCoroutine(WriteText(text, delegate { - ShowContinueIcon(true); - + StartCoroutine(WaitForInput(delegate { Clear(); @@ -37,15 +34,6 @@ namespace Fungus.Script protected override void Clear() { base.Clear(); - ShowContinueIcon(false); - } - - void ShowContinueIcon(bool visible) - { - if (continueImage != null) - { - continueImage.enabled = visible; - } } IEnumerator WaitForInput(Action onInput) diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index e8fd990d37affa0a78a063b2941ef2274b8db6ef..9e65e008c0f06f61bb302144e9748c4b08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