Browse Source

Merge pull request #357 from FungusGames/concurrent-say-commands

Fixed concurrent Say commands on same Say Dialog should interrupt #356
master
Chris Gregan 9 years ago
parent
commit
df105e9269
  1. 7
      Assets/Fungus/Narrative/Scripts/SayDialog.cs
  2. 2478
      Assets/Tests/Narrative/NarrativeTests.unity

7
Assets/Fungus/Narrative/Scripts/SayDialog.cs

@ -135,13 +135,14 @@ namespace Fungus
{
Writer writer = GetWriter();
// Stop any existing Say Command and write this one instead
// This will probably take a frame or two to complete
while (writer.isWriting || writer.isWaitingForInput)
if (writer.isWriting || writer.isWaitingForInput)
{
writer.Stop();
while (writer.isWriting || writer.isWaitingForInput)
{
yield return null;
}
}
this.fadeWhenDone = fadeWhenDone;

2478
Assets/Tests/Narrative/NarrativeTests.unity

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save