public void GetLightInformation( IRouteMark routeMark, LightInfomration lightInformation ) { if ( lightInformation.LightDistance > Constans.ToVirtualUnit( 70.0f ) ) { return; } var previousEdge = this.GetEdgeConnectedWith( routeMark.GetPrevious() ); if ( this._laneJunction.Lights[ previousEdge.Item1 ] != null ) { lightInformation.LightState = this._laneJunction.Lights[ previousEdge.Item1 ].LightState; } else { var nextEdge = this.GetEdgeConnectedWith( routeMark.GetNext() ); lightInformation.LightDistance += Vector2.Distance( previousEdge.Item2.EdgeBuilder.Location, nextEdge.Item2.EdgeBuilder.Location ); routeMark.MoveNext(); routeMark.Current.Condutor.GetLightInformation( routeMark, lightInformation ); } }