Esempio n. 1
0
 public static MortonKeyInterop ToInterop(this TransportCellKey cellKey)
 {
     return(new MortonKeyInterop
     {
         Value = cellKey.Value
     });
 }
Esempio n. 2
0
    private void OnTransportGraphChanged(TransportGraph graph, TransportCellKey cellKey)
    {
        var cellKeyString = m_transportApi.TransportCellKeyToString(cellKey);

        Debug.Log(
            string.Format("TransportGraph had cell {0} changed. It now has: {1} nodes, {2} directedEdges, {3} ways",
                          cellKeyString,
                          graph.Nodes.Count,
                          graph.DirectedEdges.Count,
                          graph.Ways.Count));
    }
    private void OnTransportNetworkCellAdded(TransportNetworkType transportNetwork, TransportCellKey cellKey)
    {
        var objectKey = MakeObjectKey(transportNetwork, cellKey);

        var ways = m_transportApi.GetWaysForNetworkAndCell(transportNetwork, cellKey);

        CreateAndAddWayMeshes(objectKey, ways);

        var directedEdges = m_transportApi.GetDirectedEdgesForNetworkAndCell(transportNetwork, cellKey);

        CreateAndAddLinkMeshes(objectKey, directedEdges);
    }
 private string MakeObjectKey(TransportNetworkType transportNetwork, TransportCellKey cellKey)
 {
     return(transportNetwork.ToString() + "_" + m_transportApi.TransportCellKeyToString(cellKey));
 }
    private void OnTransportNetworkCellUpdated(TransportNetworkType transportNetwork, TransportCellKey cellKey)
    {
        var objectKey = MakeObjectKey(transportNetwork, cellKey);

        RemoveAndDestroyLinkMeshes(objectKey);
        var directedEdges = m_transportApi.GetDirectedEdgesForNetworkAndCell(transportNetwork, cellKey);

        CreateAndAddLinkMeshes(objectKey, directedEdges);
    }
    private void OnTransportNetworkCellRemoved(TransportNetworkType transportNetwork, TransportCellKey cellKey)
    {
        var objectKey = MakeObjectKey(transportNetwork, cellKey);

        RemoveAndDestroyWayMeshes(objectKey);
        RemoveAndDestroyLinkMeshes(objectKey);
    }