Browse Source

Fixed drawing connected sequence for AddOption command

master
chrisgregan 11 years ago
parent
commit
e8fe3a9ac5
  1. 12
      Assets/Fungus/Dialog/Commands/Choose.cs

12
Assets/Fungus/Dialog/Commands/Choose.cs

@ -37,6 +37,8 @@ namespace Fungus
return; return;
} }
Debug.Log (options.Count);
if (options.Count == 0) if (options.Count == 0)
{ {
Continue(); Continue();
@ -91,11 +93,15 @@ namespace Fungus
public override void GetConnectedSequences (ref List<Sequence> connectedSequences) public override void GetConnectedSequences (ref List<Sequence> connectedSequences)
{ {
foreach (Option option in options) // Show connected sequences from preceding AddOption commands
if (IsExecuting())
{ {
if (option.targetSequence != null) foreach (Option option in options)
{ {
connectedSequences.Add(option.targetSequence); if (option.targetSequence != null)
{
connectedSequences.Add(option.targetSequence);
}
} }
} }
} }

Loading…
Cancel
Save