public void Setup(INodeParameters _node, ILogger _logger) { var ifValue = new Variable(); ifValue.Set("$1==$2"); var thenValue = new Variable(); thenValue.Set("$1"); var elseValue = new Variable(); elseValue.Set("$2"); _node.AddInput(this, false, "$1"); _node.AddInput(this, true, "$2"); _node.AddInput(this, true, "$3"); sender = _node.GetSender(); _node.AddOutput(false, "then"); _node.AddOutput(false, "else"); _node.AddOutput(false, "any"); conditionAttribute = _node.AddAttribute(ifValue, Attribute.AttributeType.Conditionals, "ex: $1>$2"); thenAttribute = _node.AddAttribute(thenValue, Attribute.AttributeType.Then, "ex: $2"); elseAttribute = _node.AddAttribute(elseValue, Attribute.AttributeType.Else, "ex: $3"); var1 = new Variable(); var2 = new Variable(); var3 = new Variable(); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "File path"); _node.AddOutput(false, "The text"); _node.AddOutput(false, "Failure"); sender = _node.GetSender(); }
public void Setup(INodeParameters _nodeParameters, ILogger _logger) { _nodeParameters.AddInput(this, false, "Object", "Transform object"); _nodeParameters.AddInput(this, false, "Vec3 position"); _nodeParameters.AddInput(this, false, "Vec3 rotation"); _nodeParameters.AddInput(this, false, "Vec3 scale"); _nodeParameters.AddInput(this, true, "Send"); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(false, "Vec3 position"); _nodeParameters.AddOutput(false, "Vec3 rotation"); _nodeParameters.AddOutput(false, "Vec3 scale"); _nodeParameters.AddOutput(false, "Object", "Transform"); GameObject = new Variable().Set(null as object); Variable[] newPositionVar = new Variable[3]; newPositionVar[0] = new Variable().Set(0); newPositionVar[1] = new Variable().Set(0); newPositionVar[2] = new Variable().Set(0); Position = new Variable().Set(newPositionVar); Variable[] newRotationVar = new Variable[3]; newRotationVar[0] = new Variable().Set(0); newRotationVar[1] = new Variable().Set(0); newRotationVar[2] = new Variable().Set(0); Rotation = new Variable().Set(newRotationVar); Variable[] newScaleVar = new Variable[3]; newScaleVar[0] = new Variable().Set(0); newScaleVar[1] = new Variable().Set(0); newScaleVar[2] = new Variable().Set(0); Scale = new Variable().Set(newScaleVar); }
public void Setup(INodeParameters _nodeParameters) { Sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(true, "Mouse position X"); _nodeParameters.AddOutput(true, "Mosue position Y"); XPosition = new Ray(UnityEngine.Input.mousePosition.x); YPosition = new Ray(UnityEngine.Input.mousePosition.y); }
public void Setup(INodeParameters _nodeParameters) { _nodeParameters.AddInput(this, false, "Object", "Slider object"); _nodeParameters.AddInput(this, false, "Slider value"); _nodeParameters.AddInput(this, true, "Any", "Push"); _nodeParameters.AddOutput(false, "Object", "Slider object"); _nodeParameters.AddOutput(false, "Slider Value"); sender = _nodeParameters.GetSender(); sliderValue = new Ray(0); }
public void Setup(INodeParameters _nodeParameters) { _nodeParameters.AddInput(this, false, "Position X"); _nodeParameters.AddInput(this, false, "Position Y"); _nodeParameters.AddInput(this, true, "Any", "Calculate"); Sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(false, "Object", "The object that was hit"); _nodeParameters.AddOutput(false, "Vec3", "The hit position"); valueX = new Ray().Set(0); valueY = new Ray().Set(0); }
public void Setup(INodeParameters _nodeParameters, ILogger _logger) { _nodeParameters.AddInput(this, false, "Position X"); _nodeParameters.AddInput(this, false, "Position Y"); _nodeParameters.AddInput(this, true, "Calculate"); Sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(false, "Object", "The object that was hit"); _nodeParameters.AddOutput(false, "The hit position"); valueX = new Variable().Set(0); valueY = new Variable().Set(0); valueZ = new Variable().Set(0); }
public void Setup(INodeParameters _node, ILogger _logger) { keyName = new Variable(""); keyValue = new Variable(""); savedData = new Variable(""); _node.AddInput(this, false, "key Name"); _node.AddInput(this, false, "key Data"); _node.AddInput(this, false, "Save data"); _node.AddInput(this, false, "Delete key"); _node.AddInput(this, true, "Get data"); sender = _node.GetSender(); _node.AddOutput(false, "Key name"); _node.AddOutput(false, "Key data"); }
public void Setup(INodeParameters _node, ILogger _logger) { _node.AddInput(this, true, "Vec3"); sender = _node.GetSender(); _node.AddOutput(false, "X"); _node.AddOutput(false, "Y"); _node.AddOutput(false, "Z"); valueX = _node.AddAttribute(new Variable().Set("X"), Attribute.AttributeType.ReadOnlyXValue, "X"); valueY = _node.AddAttribute(new Variable().Set("Y"), Attribute.AttributeType.ReadOnlyYValue, "Y"); valueZ = _node.AddAttribute(new Variable().Set("Z"), Attribute.AttributeType.ReadOnlyZValue, "Z"); Variable[] newVar = new Variable[3]; newVar[0] = valueX.Value; newVar[1] = valueY.Value; newVar[2] = valueZ.Value; }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "Vec3", "Vec3"); sender = _node.GetSender(); _node.AddOutput(false, "X"); _node.AddOutput(false, "Y"); _node.AddOutput(false, "Z"); valueX = _node.AddParameter(new Ray().Set("X"), Parameter.ParameterType.ReadOnlyXValue, "X"); valueY = _node.AddParameter(new Ray().Set("Y"), Parameter.ParameterType.ReadOnlyYValue, "Y"); valueZ = _node.AddParameter(new Ray().Set("Z"), Parameter.ParameterType.ReadOnlyZValue, "Z"); Ray[] newVar = new Ray[3]; newVar[0] = valueX.Value; newVar[1] = valueY.Value; newVar[2] = valueZ.Value; }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "Var"); Var1 = new Variable(0); sender = _node.GetSender(); _node.AddOutput(false, "Next power of two"); }
public void Setup(INodeParameters _node, ILogger _logger) { _node.AddInput(this, true, "X"); VarX = new Variable(0); sender = _node.GetSender(); _node.AddOutput(false, "Tan of X"); }
public const string NAME = "Entry"; //Setting the node name (need to be a const to be used in the factory without the node instantiated) public void Setup(INodeParameters _node) { var wordValue = new Ray(); _node.AddOutput(false, "Any", "Output the entry received"); // setting a cold input parameter = _node.AddParameter(wordValue.Set("Var"), Parameter.ParameterType.Word, "The default word"); // setting an attribute (Used only for the editor) }
public void Setup(INodeParameters _node) { sender = _node.GetSender(); _node.AddOutput(true, "Ray", "Ray on lateUpdate"); value = new Ray(); value.Set("Ray"); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "X"); VarX = new Ray(0); sender = _node.GetSender(); _node.AddOutput(false, "Tan of X"); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "X"); VarX = new Variable(0); sender = _node.GetSender(); _node.AddOutput(false, "Square Root of X"); }
public void Setup(INodeParameters _nodeParameters) { _nodeParameters.AddInput(this, true, "Value"); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(false, "Value x Delta time"); deltaTimeVar = new Variable().Set(0); }
public void Setup(INodeParameters _node) { sender = _node.GetSender(); _node.AddOutput(false, "1 if updated 0 if not"); _node.AddInput(this, false, "Any", "Check if node was updated since last frame"); _node.AddInput(this, true, "Any", "The updateCheck"); }
public void Setup(INodeParameters _nodeParameters) { _nodeParameters.AddInput(this, false, "Object", "GameObject position"); _nodeParameters.AddInput(this, true, "Position to look at"); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(false, "Target rotation"); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "Object", "GameObject"); sender = _node.GetSender(); _node.AddOutput(true, "Object", "Instantiated GameObject"); UnityObject = new Variable().Set(null as object); }
public void Setup(INodeParameters _nodeParameters) { _nodeParameters.AddInput(this, false, "Object", "The game object reference"); _nodeParameters.AddInput(this, true, "Vec3", "Vec3 to convert"); _nodeParameters.AddOutput(false, "Vec3", "The converted Vec3"); sender = _nodeParameters.GetSender(); }
public void SetupNodeIO() { var constellation = JsonUtility.FromJson <ConstellationScriptData>(constellationNodeData.Value.GetString()); NodeParameters = new List <Ray>(); foreach (var nestedNode in constellation.Nodes) { if (nestedNode.Name == CoreNodes.Entry.NAME || nestedNode.Name == CoreNodes.BrightEntry.NAME) { node.AddInput(this, nestedNode.Outputs[0].IsBright, nestedNode.Outputs[0].Type, nestedNode.GetParameters()[0].Value.GetString()); } if (nestedNode.Name == CoreNodes.Exit.NAME || nestedNode.Name == CoreNodes.BrightExit.NAME) { node.AddOutput(nestedNode.Inputs[0].IsBright, nestedNode.Inputs[0].Type, nestedNode.GetParameters()[0].Value.GetString()); } if (nestedNode.Name == Parameters.ValueParameter.NAME) { var attributeVariable = new Ray(0); node.AddParameter(attributeVariable, Parameter.ParameterType.Value, "The value"); NodeParameters.Add(attributeVariable); } if (nestedNode.Name == Parameters.WordParameter.NAME) { var attributeVariable = new Ray("Word"); node.AddParameter(attributeVariable, Parameter.ParameterType.Word, "The value"); NodeParameters.Add(attributeVariable); } } }
public void SetNode(ConstellationScriptData [] constellations) { NodeAttributes = new List <Variable>(); foreach (var constellation in constellations) { foreach (var nestedNode in constellation.Nodes) { if (nestedNode.Name == CoreNodes.Entry.NAME) { node.AddInput(this, false, nestedNode.GetAttributes()[0].Value.GetString()); } if (nestedNode.Name == CoreNodes.Exit.NAME) { node.AddOutput(false, nestedNode.GetAttributes()[0].Value.GetString()); } if (nestedNode.Name == Attributes.ValueAttribute.NAME) { var attributeVariable = new Variable(0); node.AddAttribute(attributeVariable, Attribute.AttributeType.Value, "The value"); NodeAttributes.Add(attributeVariable); } if (nestedNode.Name == Attributes.WordAttribute.NAME) { var attributeVariable = new Variable("Word"); node.AddAttribute(attributeVariable, Attribute.AttributeType.Word, "The value"); NodeAttributes.Add(attributeVariable); } } } }
public void Setup(INodeParameters _node, ILogger _logger) { sender = _node.GetSender(); _node.AddOutput(true, "Ray on update"); value = new Variable(); value.Set("Ray"); }
public const string NAME = "Entry"; //Setting the node name (need to be a const to be used in the factory without the node instantiated) public void Setup(INodeParameters _node) { var wordValue = new Variable(); _node.AddOutput(false, "Output the entry received"); // setting a cold input attribute = _node.AddAttribute(wordValue.Set("Var"), Attribute.AttributeType.Word, "The default word"); // setting an attribute (Used only for the editor) }
public void Setup(INodeParameters nodeParameters, ILogger logger) { nodeParameters.AddInput(this, false, "1 = on, 0 = off"); nodeParameters.AddInput(this, true, "Value to send"); sender = nodeParameters.GetSender(); nodeParameters.AddOutput(false, "Output if on"); switchValue = new Variable(0); }
public void Setup(INodeParameters _node, ILogger _logger) { _node.AddInput(this, false, "x"); _node.AddInput(this, true, "y"); sender = _node.GetSender(); _node.AddOutput(false, "Angle between the x-axis and a 2D vector starting at zero and terminating at (x,y)"); Variable = new Variable().Set(0); }
public void Setup(INodeParameters _node) { sender = _node.GetSender(); _node.AddOutput(true, "Object", "Unity object"); UnityObject = new Ray().Set(null as object); nameValue = new Ray().Set("Default"); _node.AddParameter(nameValue, Parameter.ParameterType.Word, "Name in inspector"); }
public void Setup(INodeParameters _nodeParameters) { var newValue = new Variable(); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(true, "1 on key down else 0"); key = _nodeParameters.AddAttribute(newValue, Attribute.AttributeType.Word, "Key code"); keyState = new Variable().Set(0); }
public void Setup(INodeParameters _node, ILogger _logger) { var newValue = new Variable().Set("your word"); sender = _node.GetSender(); _node.AddOutput(true, "The Word"); value = _node.AddAttribute(newValue, Attribute.AttributeType.Word, "Word to set"); }