|
|
@ -774,7 +774,7 @@ namespace Fungus |
|
|
|
showCut = true; |
|
|
|
showCut = true; |
|
|
|
showCopy = true; |
|
|
|
showCopy = true; |
|
|
|
showDelete = true; |
|
|
|
showDelete = true; |
|
|
|
if (flowchart.selectedCommands.Count == 1) |
|
|
|
if (flowchart.selectedCommands.Count == 1 && Application.isPlaying) |
|
|
|
{ |
|
|
|
{ |
|
|
|
showPlay = true; |
|
|
|
showPlay = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -1024,10 +1024,23 @@ namespace Fungus |
|
|
|
|
|
|
|
|
|
|
|
protected void PlayCommand() |
|
|
|
protected void PlayCommand() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Block block = target as Block; |
|
|
|
Block targetBlock = target as Block; |
|
|
|
Flowchart flowchart = block.GetFlowchart(); |
|
|
|
Flowchart flowchart = targetBlock.GetFlowchart(); |
|
|
|
Command command = flowchart.selectedCommands[0]; |
|
|
|
Command command = flowchart.selectedCommands[0]; |
|
|
|
//block.Execute(null, command.commandIndex); |
|
|
|
targetBlock.jumpToCommandIndex = command.commandIndex; |
|
|
|
|
|
|
|
if (!targetBlock.IsExecuting()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Block[] blocks = flowchart.GetComponentsInChildren<Block>(true); |
|
|
|
|
|
|
|
foreach (Block b in blocks) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (b.IsExecuting()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
b.Stop(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
flowchart.ExecuteBlock(targetBlock.blockName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void SelectPrevious() |
|
|
|
protected void SelectPrevious() |
|
|
|