Browse Source

Merge pull request #685 from stevehalliwell/StopFlowcharts

StopFlowchart can Continue now
master
Chris Gregan 7 years ago committed by GitHub
parent
commit
21967ed9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      Assets/Fungus/Scripts/Commands/StopFlowchart.cs

20
Assets/Fungus/Scripts/Commands/StopFlowchart.cs

@ -27,21 +27,21 @@ namespace Fungus
{ {
var flowchart = GetFlowchart(); var flowchart = GetFlowchart();
if (stopParentFlowchart)
{
flowchart.StopAllBlocks();
}
for (int i = 0; i < targetFlowcharts.Count; i++) for (int i = 0; i < targetFlowcharts.Count; i++)
{ {
var f = targetFlowcharts[i]; var f = targetFlowcharts[i];
if (f == flowchart)
{
// Flowchart has already been stopped
continue;
}
f.StopAllBlocks(); f.StopAllBlocks();
} }
//current block and command logic doesn't require it in this order but it makes sense to
// stop everything but yourself first
if (stopParentFlowchart)
{
flowchart.StopAllBlocks();
}
//you might not be stopping this flowchart so keep going
Continue();
} }
public override bool IsReorderableArray(string propertyName) public override bool IsReorderableArray(string propertyName)

Loading…
Cancel
Save