Beispiel #1
0
 protected virtual void SelectBlock(Flowchart flowchart, Block block)
 {
     // Select the block and also select currently executing command
     ShowBlockInspector(flowchart);
     flowchart.SelectedBlock = block;
     flowchart.ClearSelectedCommands();
     if (block.ActiveCommand != null)
     {
         flowchart.AddSelectedCommand(block.ActiveCommand);
     }
 }
Beispiel #2
0
        Command AddNewCommand()
        {
            Flowchart flowchart = FlowchartWindow.GetFlowchart();

            if (flowchart == null)
            {
                return(null);
            }

            var block = flowchart.SelectedBlock;

            if (block == null)
            {
                return(null);
            }

            var newCommand = Undo.AddComponent <Comment>(block.gameObject) as Command;

            newCommand.ItemId = flowchart.NextItemId();
            flowchart.ClearSelectedCommands();
            flowchart.AddSelectedCommand(newCommand);

            return(newCommand);
        }
Beispiel #3
0
 protected virtual void SelectBlock(Flowchart flowchart, Block block)
 {
     // Select the block and also select currently executing command
     ShowBlockInspector(flowchart);
     flowchart.selectedBlock = block;
     flowchart.ClearSelectedCommands();
     if (block.activeCommand != null)
     {
         flowchart.AddSelectedCommand(block.activeCommand);
     }
 }
 protected static void SetBlockForInspector(Flowchart flowchart, Block block)
 {
     ShowBlockInspector(flowchart);
     flowchart.ClearSelectedCommands();
     if (block.ActiveCommand != null)
     {
         flowchart.AddSelectedCommand(block.ActiveCommand);
     }
 }