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 Setup(INodeParameters _node) { var ifValue = new Ray(); ifValue.Set("$1==$2"); var thenValue = new Ray(); thenValue.Set("$1"); var elseValue = new Ray(); 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.AddParameter(ifValue, Parameter.ParameterType.Conditionals, "ex: $1>$2"); thenAttribute = _node.AddParameter(thenValue, Parameter.ParameterType.Then, "ex: $2"); elseAttribute = _node.AddParameter(elseValue, Parameter.ParameterType.Else, "ex: $3"); var1 = new Ray(); var2 = new Ray(); var3 = new Ray(); }
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 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 _nodeParameters) { var newValue = new Ray(); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(true, "Output 1 when key pressed"); key = _nodeParameters.AddParameter(newValue, Parameter.ParameterType.Word, "The key"); }
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 _node) { var newValue = new Ray().Set("your word"); sender = _node.GetSender(); _node.AddOutput(true, "The Word"); value = _node.AddParameter(newValue, Parameter.ParameterType.Word, "Word to set"); }
public void Setup(INodeParameters _node) { var newValue = new Ray().Set(0); sender = _node.GetSender(); _node.AddOutput(true, "The value"); value = _node.AddParameter(newValue, Parameter.ParameterType.Value, "Number to set"); }
public void Setup(INodeParameters _node) { sender = _node.GetSender(); _node.AddOutput(true, "Current value"); defaultValue = new Ray().Set("Default"); var nameValue = new Ray().Set("ParameterName"); _node.AddParameter(nameValue, Parameter.ParameterType.Word, "Parameter Name"); }
public void Setup(INodeParameters _nodeParameters) { var newValue = new Ray(); sender = _nodeParameters.GetSender(); _nodeParameters.AddOutput(true, "1 on mouse button down else 0"); key = _nodeParameters.AddParameter(newValue, Parameter.ParameterType.Value, "mouse button code"); keyState = new Ray().Set(0); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "R"); _node.AddInput(this, true, "G"); _node.AddInput(this, true, "B"); _node.AddInput(this, true, "A"); sender = _node.GetSender(); _node.AddOutput(false, "Color", "Color[R][G][B][A]"); valueR = _node.AddParameter(new Ray().Set(1), Parameter.ParameterType.ReadOnlyValueR, "R"); valueG = _node.AddParameter(new Ray().Set(1), Parameter.ParameterType.ReadOnlyValueG, "G"); valueB = _node.AddParameter(new Ray().Set(1), Parameter.ParameterType.ReadOnlyValueB, "B"); valueA = _node.AddParameter(new Ray().Set(1), Parameter.ParameterType.ReadOnlyValueA, "A"); Ray[] newVar = new Ray[4]; newVar[0] = valueR.Value; newVar[1] = valueG.Value; newVar[2] = valueB.Value; newVar[3] = valueA.Value; Result = new Ray().Set(newVar); }
public void Setup(INodeParameters _node) { sender = _node.GetSender(); _node.AddOutput(true, "Received Value from a sender"); eventName = _node.AddParameter(new Ray("event name"), Parameter.ParameterType.Word, "The event name"); if (Constellation.eventSystem != null) { Constellation.eventSystem.Register(OnConstellationEvent); } }
public const string NAME = "Var"; //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.AddInput(this, false, "Generic", "New var"); // setting a cold input _node.AddInput(this, true, "Any", "Send var"); // setting a warm input sender = _node.GetSender(); _node.AddOutput(false, "Generic", "Output var"); // setting a cold input attribute = _node.AddParameter(wordValue.Set("Var"), Parameter.ParameterType.ReadOnlyValue, "The default word"); // setting an attribute (Used only for the editor) }
public void Setup(INodeParameters _node) { var newValue = new Ray("ComponentName"); sender = _node.GetSender(); _node.AddOutput(false, "Object", "The Component"); _node.AddInput(this, true, "Object", "Object which contain the component"); _node.AddInput(this, true, "Send the component"); ComponentName = _node.AddParameter(newValue, Parameter.ParameterType.Word, "ComponentName"); componentObject = new Ray(null as object); }
public void Setup(INodeParameters _node) { var newValue = new Ray("VarName"); Sender = _node.GetSender(); _node.AddOutput(false, "The value"); _node.AddInput(this, false, "Object", "Object which contains the var"); _node.AddInput(this, false, "Set Var"); _node.AddInput(this, true, "Push var"); VarName = _node.AddParameter(newValue, Parameter.ParameterType.Word, "VarName"); currentVar = new Ray(); currentInstance = new Ray(); }
public void Setup(INodeParameters _node) { _node.AddInput(this, true, "value to teleport"); eventName = _node.AddParameter(new Ray("event name"), Parameter.ParameterType.Word, "The event name"); }
private Parameter parameter; // attributes are setted in the editor. public void Setup(INodeParameters _node) { var wordValue = new Ray(); 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) { _node.AddParameter(new Ray().Set("Your note here"), Parameter.ParameterType.NoteField, ""); }
public void Setup(INodeParameters _node) { _node.AddOutput(false, "Value received in the teleport"); sender = _node.GetSender(); eventName = _node.AddParameter(new Ray("event name"), Parameter.ParameterType.Word, "The event name"); }