Browse Source

Handle Choose with no AddOption commands

master
chrisgregan 11 years ago
parent
commit
5f6ade578c
  1. 7
      Assets/Fungus/Dialog/Commands/Choose.cs
  2. 14
      Assets/Fungus/Dialog/Scripts/SayDialog.cs
  3. BIN
      Assets/Shuttle/ShuttleGame.unity

7
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<ChooseDialog.Option> dialogOptions = new List<ChooseDialog.Option>();
foreach (Option option in options)
{

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

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save