public void Split(Grid intermediateGrid, out IBigridTransform head, out IBigridTransform tail) { if (intermediateGrid == startGrid) { // Intermediate grid is the start grid, no need to split the road, return this road as the tail head = null; tail = this; return; } if (intermediateGrid == endGrid) { // Intermediate grid is the end grid, no need to split the road, return this road as the head head = this; tail = null; return; } tail = Instantiate(this, intermediateGrid.transform.position, intermediateGrid.transform.rotation, SiteManager.Instance.roadManager.transform); tail.StartGrid = intermediateGrid; tail.EndGrid = endGrid; // Copy old outgoing roads from head to tail foreach (Road outgoingRoad in outgoingRoads) { ((Road)tail).AddOutgoingRoad(outgoingRoad); } head = this; head.EndGrid = intermediateGrid; // Establish links between the new tail and head ((Road)tail).AddIncomingRoad((Road)head); ((Road)head).AddOutgoingRoad((Road)tail); return; }
public void Split(Grid intermediateGrid, out IBigridTransform head, out IBigridTransform tail) { throw new NotImplementedException("Landmark BigridTransform could not be split"); }
public void Split(Grid intermediateGrid, out IBigridTransform head, out IBigridTransform tail) { throw new NotImplementedException("AccessPointInfographic BigridTransform could not be split"); }
public void Split(Grid intermediateGrid, out IBigridTransform head, out IBigridTransform tail) { head = null; tail = null; return; }