public static void SetInstanceValue(EntryUnit entry, Flow flow, ValueInput returns) { if (entry.targets.Count > 0) { entry.targets[entry.targets.Count - 1].returnObject = flow.GetValue(returns); } }
public FlowGraph InitializeGraph(ref EntryUnit unit) { graph = new FlowGraph(); graph.controlAxis = Axis2.Vertical; graph.units.Add(entry); entry.macro = owner; ((ConstructorUnit)entry).declaration = this; return(graph); }
protected override void Definition() { base.Definition(); if (graph != null) { if (entry == null) { entry = entry ?? graph?.units?.OfType <EntryUnit>().ToListPooled()[0]; } } }
public FlowGraph InitializeGraph() { var entry = new ConstructorUnit(); graph = new FlowGraph(); graph.controlAxis = Axis2.Vertical; graph.units.Add(entry); this.entry = entry; entry.macro = owner; entry.declaration = this; return(graph); }
public override void AfterAdd() { base.AfterAdd(); for (int i = 0; i < graph.units.Count; i++) { if (graph.units[i].GetType() == typeof(EntryUnit)) { entry = (EntryUnit)graph.units[i]; entry.AddReturn(this); returnType = entry.returnType; break; } } }
protected sealed override void Definition() { if (canDefine) { if (graph != null) { if (entry == null || entry.graph != null && entry.graph != graph) { entry = entry ?? graph?.units?.OfType <EntryUnit>().First(); } } DefinePorts(); } }
public void Awake() { if (graph == null) { graph = new FlowGraph(); } if (entry == null) { entry = new EntryUnit(); } if (entry.macro == null) { entry.macro = this; } if (!graph.units.Contains(entry)) { graph.units.Add(entry); } }
protected override void OnEnable() { base.OnEnable(); if (graph == null) { graph = new FlowGraph(); } if (entry == null) { entry = new EntryUnit(); } if (entry.macro == null) { entry.macro = this; } if (!graph.units.Contains(entry)) { graph.units.Add(entry); } }