Browse Source

StopFlowchart can continue now

-as reported on the forum by inarval http://fungusgames.com/forum#!/general:stopflowchart-not-continuin
master
desktop-maesty/steve 7 years ago
parent
commit
8d06252b35
  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