// TODO Change name public void ConnectChangeName( SideRoadLaneEdge edge ) { ((IControl) this._owner).Translated.Subscribe(s => { edge.SetLocation( ((IControl) this._owner).Location); ((IControl) edge).Redraw(); }); this.SideRoadLaneEdge = edge; }
private bool AreConnectedInTheSamePlaces(SideRoadLaneEdge firstEdge, SideRoadLaneEdge secondEdge) { var theSameDirection = (firstEdge.StartLocation == secondEdge.StartLocation) && (firstEdge.EndLocation == secondEdge.EndLocation); var oppositeDirection = (firstEdge.StartLocation == secondEdge.EndLocation) && (firstEdge.EndLocation == secondEdge.StartLocation); return theSameDirection || oppositeDirection; }
public SideRoadLaneConnector( SideRoadLaneEdge owner ) { this._owner = owner; }