private DrawNodeViewGraph AddNodeToDecision(BaseDecisionNode node) { var drawNode = new DrawNodeViewGraph(); drawNode.title = node.TitleOfNode; drawNode.GUID = Guid.NewGuid().ToString(); drawNode.InnerNode = node; drawNode.styleSheets.Add(Resources.Load <StyleSheet>("Node")); drawNode.SetPosition(new Rect(node.coords, new Vector2(150, 50))); GeneratePorts(drawNode); GenerateCustomField(drawNode); AddElement(drawNode); drawNodes.Add(drawNode); return(drawNode); }
private void ChangeStrategy(ChangeEvent <UnityEngine.Object> evt, FieldInfo field, BaseDecisionNode baseDecisionNode) { field.SetValue(baseDecisionNode, evt.newValue); }
private void EnumChangeReact(ChangeEvent <Enum> evt, FieldInfo fieldInfo, BaseDecisionNode baseDecisionNode) { fieldInfo.SetValue(baseDecisionNode, evt.newValue); }
private void FloatFieldReact(ChangeEvent <float> evt, FieldInfo fieldInfo, BaseDecisionNode baseDecisionNode) { fieldInfo.SetValue(baseDecisionNode, evt.newValue); }
private void BoolFieldReact(ChangeEvent <bool> evt, FieldInfo fieldInfo, BaseDecisionNode baseDecisionNode) { fieldInfo.SetValue(baseDecisionNode, evt.newValue); }