protected override void Init() { base.Init(); btNodeList.Clear(); Base.BtNode btNode = null; foreach (var port in Outputs) { if (port.IsConnected) { int cnt = port.ConnectionCount; for (int i = 0; i < cnt; ++i) { var p = port.GetConnection(i); if (p != null) { btNode = p.node as Base.BtNode; if (btNode != null) { btNodeList.Add(btNode); } } } } } // 降順:priorityの値が大きい順に実行. btNodeList.Sort((a, b) => b.Priority - a.Priority); }
public virtual BtNode GetNext() { var port = GetOutputPort("outputKnob"); BtNode next = null; if (port != null && port.IsConnected) { next = port.Connection.node as BtNode; } return(next); }