public PathfinderConnection(PathfinderConnection SourceConnection) { NodeA = SourceConnection.NodeA.ParentNode; NodeB = SourceConnection.NodeB.ParentNode; NodeA.Connection_Add(this, ref NodeA_ConnectionNum); NodeB.Connection_Add(this, ref NodeB_ConnectionNum); NodeA.Layer.Connection_Add(this); ValueCalc(); }
public PathfinderConnection(PathfinderNode NewNodeA, PathfinderNode NewNodeB, float NewValue) { if ( NewNodeA.Layer.Network_LayerNum > 0 | NewNodeB.Layer.Network_LayerNum > 0 | NewValue <= 0.0F ) { Debugger.Break(); return; } Value = NewValue; LinkCount = 1; NodeA = NewNodeA; NodeB = NewNodeB; NodeA.Connection_Add(this, ref NodeA_ConnectionNum); NodeB.Connection_Add(this, ref NodeB_ConnectionNum); NodeA.Layer.Connection_Add(this); RaiseDependant(); }