From 19c7393a0b2a7994721b1af684b50a4ad0446c8c Mon Sep 17 00:00:00 2001 From: = Date: Fri, 22 Apr 2016 14:22:07 -0400 Subject: [PATCH] Update play command to work with latest master --- Assets/Fungus/Flowchart/Editor/BlockEditor.cs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs index 81f57f40..cac216e3 100644 --- a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs @@ -1027,20 +1027,16 @@ namespace Fungus Block targetBlock = target as Block; Flowchart flowchart = targetBlock.GetFlowchart(); Command command = flowchart.selectedCommands[0]; - targetBlock.jumpToCommandIndex = command.commandIndex; if (!targetBlock.IsExecuting()) { - Block[] blocks = flowchart.GetComponentsInChildren(true); - foreach (Block b in blocks) - { - if (b.IsExecuting()) - { - b.Stop(); - } - } - flowchart.ExecuteBlock(targetBlock.blockName); + flowchart.ExecuteBlock(targetBlock, command.commandIndex); } - + else + { + targetBlock.jumpToCommandIndex = command.commandIndex; + flowchart.ExecuteBlock(targetBlock); + } + } protected void SelectPrevious()