Exemple #1
0
        public CExplicitCastNode()
        {
            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin success = new CExecutionPin()
            {
                Name       = "Succeeded",
                TargetNode = null
            };

            CExecutionPin failed = new CExecutionPin()
            {
                Name       = "Failed",
                TargetNode = null
            };

            OutExecutionPins.Add(success);
            OutExecutionPins.Add(failed);
        }
        public CExecuteInterfaceFunctionNode(CKlaxScriptInterfaceFunction targetFunction)
        {
            TargetFunctionGuid = targetFunction.Guid;

            Name = targetFunction.Name;

            CExecutionPin inPin = new CExecutionPin("In");

            InExecutionPins.Add(inPin);

            CExecutionPin execPin = new CExecutionPin("Next");

            OutExecutionPins.Add(execPin);

            CInputPin targetInput = new CInputPin("Target", typeof(CEntity));

            InputPins.Add(targetInput);

            foreach (var inputParameter in targetFunction.InputParameters)
            {
                CInputPin input = new CInputPin(inputParameter.Name, inputParameter.Type);
                InputPins.Add(input);
            }

            foreach (var returnParameter in targetFunction.OutputParameters)
            {
                COutputPin output = new COutputPin(returnParameter.Name, returnParameter.Type);
                OutputPins.Add(output);
            }
        }
        public CExecuteCustomFunctionNode(CCustomFunctionGraph functionGraph)
        {
            TargetFunctionGuid = functionGraph.Guid;

            Name = functionGraph.Name;

            CExecutionPin inPin = new CExecutionPin("In");

            InExecutionPins.Add(inPin);

            CExecutionPin execPin = new CExecutionPin("Next");

            OutExecutionPins.Add(execPin);

            foreach (var inputParameter in functionGraph.InputParameters)
            {
                CInputPin input = new CInputPin(inputParameter.Name, inputParameter.Type);
                InputPins.Add(input);
            }

            foreach (var returnParameter in functionGraph.OutputParameters)
            {
                COutputPin output = new COutputPin(returnParameter.Name, returnParameter.Type);
                OutputPins.Add(output);
            }
        }
        public CSetKlaxVariableNode()
        {
            IsImplicit = true;

            CExecutionPin inPin = new CExecutionPin("In");

            InExecutionPins.Add(inPin);

            CExecutionPin outPin = new CExecutionPin("Out");

            OutExecutionPins.Add(outPin);
        }
Exemple #5
0
        /// <summary>
        /// Adds a new execution pin. This should only be called upon editor callback.
        /// </summary>
        /// <param name="context">Context which contains all editor node actions that need to be executed after this call</param>
        /// <param name="newPin">The new execution pin that should be added</param>
        /// <param name="index">The index at which the execution pin should be inserted</param>
        /// <param name="bIsIn">Whether the pin acts as in or output</param>
        protected void AddExecutionPin(CNodeChangeContext context, CExecutionPin newPin, int index, bool bIsIn)
        {
            if (bIsIn)
            {
                InExecutionPins.Add(newPin);
            }
            else
            {
                OutExecutionPins.Add(newPin);
            }

            context.Actions.Add(new CAddPinChangeAction(newPin, index, bIsIn));
        }
Exemple #6
0
        public CFunctionGraphReturnNode(List <CKlaxVariable> returnParameters)
        {
            AllowDelete = false;
            AllowCopy   = false;

            Name = "Return";

            CExecutionPin inPin = new CExecutionPin("Return");

            InExecutionPins.Add(inPin);

            foreach (var returnParameter in returnParameters)
            {
                CInputPin input = new CInputPin(returnParameter.Name, returnParameter.Type);
                InputPins.Add(input);
            }
        }
        private void AddExecutionPins()
        {
            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin done = new CExecutionPin()
            {
                Name       = "Out",
                TargetNode = null
            };

            OutExecutionPins.Add(done);
        }
        public CExecuteFunctionNode()
        {
            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin done = new CExecutionPin()
            {
                Name       = "Out",
                TargetNode = null
            };

            OutExecutionPins.Add(done);
        }
Exemple #9
0
        public CBranchNode()
        {
            Name = "Branch";

            CExecutionPin inPin = new CExecutionPin("In");

            InExecutionPins.Add(inPin);

            CExecutionPin truePin = new CExecutionPin("True");

            OutExecutionPins.Add(truePin);

            CExecutionPin falsePin = new CExecutionPin("False");

            OutExecutionPins.Add(falsePin);

            CInputPin conditionPin = new CInputPin("Condition", typeof(bool));

            InputPins.Add(conditionPin);
        }
        public CForEachLoopNode()
        {
            Name = "Foreach Loop";

            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin breakExec = new CExecutionPin()
            {
                Name       = "Break",
                TargetNode = null
            };

            InExecutionPins.Add(breakExec);

            CExecutionPin loop = new CExecutionPin()
            {
                Name       = "Loop",
                TargetNode = null
            };

            OutExecutionPins.Add(loop);
            CExecutionPin done = new CExecutionPin()
            {
                Name       = "Done",
                TargetNode = null
            };

            OutExecutionPins.Add(done);

            InputPins.Add(new CInputPin("List", typeof(IList)));

            OutputPins.Add(new COutputPin("Index", typeof(int)));
            OutputPins.Add(new COutputPin("Element", typeof(object)));
        }
Exemple #11
0
        public CSwitchNode()
        {
            Name             = "Switch";
            CanAddOutputPins = true;

            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin defaultOutExec = new CExecutionPin()
            {
                Name       = "Default",
                TargetNode = null
            };

            OutExecutionPins.Add(defaultOutExec);

            CInputPin typePin = new CInputPin()
            {
                Name           = "Type",
                bIsLiteralOnly = true,
                Type           = typeof(CKlaxScriptTypeInfo),
                Literal        = typeof(string)
            };

            InputPins.Add(typePin);

            CInputPin objectPin = new CInputPin()
            {
                Name = "Object",
                Type = typeof(object)
            };

            InputPins.Add(objectPin);
        }
        protected override void OnImplicitChanged()
        {
            InExecutionPins.Clear();
            OutExecutionPins.Clear();

            if (!IsImplicit)
            {
                CExecutionPin execute = new CExecutionPin()
                {
                    Name       = "In",
                    TargetNode = null
                };
                InExecutionPins.Add(execute);

                CExecutionPin done = new CExecutionPin()
                {
                    Name       = "Out",
                    TargetNode = null
                };
                OutExecutionPins.Add(done);
            }
        }
Exemple #13
0
        public CForLoopNode()
        {
            CExecutionPin execute = new CExecutionPin()
            {
                Name       = "In",
                TargetNode = null
            };

            InExecutionPins.Add(execute);

            CExecutionPin breakExec = new CExecutionPin()
            {
                Name       = "Break",
                TargetNode = null
            };

            InExecutionPins.Add(breakExec);

            CExecutionPin loop = new CExecutionPin()
            {
                Name       = "Loop",
                TargetNode = null
            };

            OutExecutionPins.Add(loop);
            CExecutionPin done = new CExecutionPin()
            {
                Name       = "Done",
                TargetNode = null
            };

            OutExecutionPins.Add(done);

            InputPins.Add(new CInputPin("First Index", typeof(int)));
            InputPins.Add(new CInputPin("Last Index", typeof(int)));

            OutputPins.Add(new COutputPin("Index", typeof(int)));
        }