示例#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);
     }
 }
示例#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);
        }
示例#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);
     }
 }