Пример #1
0
        void CreateIfThenElseStacks(StackBaseModel ifStack, string thenName, string elseName, out StackBaseModel thenStack, out StackBaseModel elseStack)
        {
            var ifNode = ifStack.CreateStackedNode <IfConditionNodeModel>("if");

            thenStack = GraphModel.CreateStack(thenName, Vector2.left);
            GraphModel.CreateEdge(thenStack.InputPorts[0], ifNode.ThenPort);

            elseStack = GraphModel.CreateStack(elseName, Vector2.right);
            GraphModel.CreateEdge(elseStack.InputPorts[0], ifNode.ElsePort);
        }
Пример #2
0
        IfConditionNodeModel CreateIfThenElseStacks(StackBaseModel ifStack, out StackBaseModel thenStack, out StackBaseModel elseStack)
        {
            var ifNode = ifStack.CreateStackedNode <IfConditionNodeModel>("if");

            thenStack = GraphModel.CreateStack("then", Vector2.left);
            GraphModel.CreateEdge(thenStack.InputPorts[0], ifNode.ThenPort);

            elseStack = GraphModel.CreateStack("else", Vector2.right);
            GraphModel.CreateEdge(elseStack.InputPorts[0], ifNode.ElsePort);
            return(ifNode);
        }
Пример #3
0
 public override LoopNodeModel CreateLoopNode(StackBaseModel hostStack, int index, SpawnFlags spawnFlags = SpawnFlags.Default)
 {
     return(hostStack.CreateStackedNode <WhileNodeModel>(Title, index, spawnFlags));
 }
 public LoopNodeModel CreateLoopNode(StackBaseModel hostStack, int index,
                                     SpawnFlags spawnFlags = SpawnFlags.Default, Action <NodeModel> setup = null, GUID?guid = null)
 {
     return((LoopNodeModel)hostStack.CreateStackedNode(
                MatchingStackedNodeType, Title, index, spawnFlags, setup, guid));
 }
Пример #5
0
 public static FunctionRefCallNodeModel CreateFunctionRefCallNode(this StackBaseModel stackModel,
                                                                  FunctionModel methodInfo, int index = -1, SpawnFlags spawnFlags = SpawnFlags.Default)
 {
     return(stackModel.CreateStackedNode <FunctionRefCallNodeModel>(methodInfo.Title, index, spawnFlags, n => n.Function = methodInfo));
 }
Пример #6
0
 static T CreateStackedNode <T>(this StackBaseModel stackModel, string nodeName, int index,
                                SpawnFlags spawnFlags = SpawnFlags.Default, Action <T> setup = null) where T : NodeModel
 {
     return(stackModel.CreateStackedNode(nodeName, index, spawnFlags, setup));
 }
Пример #7
0
 static INodeModel CreateStackedNode(this StackBaseModel stackModel, Type type, string nodeName, int index,
                                     SpawnFlags spawnFlags = SpawnFlags.Default, Action <NodeModel> setup = null)
 {
     return(stackModel.CreateStackedNode(type, nodeName, index, spawnFlags, setup));
 }
Пример #8
0
        public static SetPropertyGroupNodeModel CreateSetPropertyGroupNode(this StackBaseModel stackModel, int index)
        {
            var nodeModel = stackModel.CreateStackedNode <SetPropertyGroupNodeModel>("Set Property", index);

            return(nodeModel);
        }