public void RemovePosition_Connected(IPosition_Connected p) { IPositionSet_Connected_AdjacencyEdit adjSet = ((IPosition_Connected_Edit)p).GetAdjacencyPositionSetEdit(); adjSet.InitToTraverseSet(); while (adjSet.NextPosition()) { IPosition_Connected_Edit adj = adjSet.GetPosition_Connected_Edit(); adj.GetAdjacencyPositionSetEdit().RemoveAdjacency(p); adjSet.RemoveAdjacency(adj); } list.Remove(p); }
public void RemovePosition(float x, float y) { IPosition_Connected_Edit p = FindPosition(x, y); if (p != null) { mapAry[(int)x, (int)y].Remove(p); list.Remove(p); IPositionSet_Connected_AdjacencyEdit adjSet = p.GetAdjacencyPositionSetEdit(); adjSet.InitToTraverseSet(); while (adjSet.NextPosition()) { IPosition_Connected_Edit adj = adjSet.GetPosition_Connected_Edit(); adj.GetAdjacencyPositionSetEdit().RemoveAdjacency(p); adjSet.RemoveAdjacency(adj); } } }