Browse Source

Update play command to work with latest master

master
= 9 years ago
parent
commit
19c7393a0b
  1. 16
      Assets/Fungus/Flowchart/Editor/BlockEditor.cs

16
Assets/Fungus/Flowchart/Editor/BlockEditor.cs

@ -1027,18 +1027,14 @@ namespace Fungus
Block targetBlock = target as Block; Block targetBlock = target as Block;
Flowchart flowchart = targetBlock.GetFlowchart(); Flowchart flowchart = targetBlock.GetFlowchart();
Command command = flowchart.selectedCommands[0]; Command command = flowchart.selectedCommands[0];
targetBlock.jumpToCommandIndex = command.commandIndex;
if (!targetBlock.IsExecuting()) if (!targetBlock.IsExecuting())
{ {
Block[] blocks = flowchart.GetComponentsInChildren<Block>(true); flowchart.ExecuteBlock(targetBlock, command.commandIndex);
foreach (Block b in blocks) }
{ else
if (b.IsExecuting()) {
{ targetBlock.jumpToCommandIndex = command.commandIndex;
b.Stop(); flowchart.ExecuteBlock(targetBlock);
}
}
flowchart.ExecuteBlock(targetBlock.blockName);
} }
} }

Loading…
Cancel
Save