Exemplo n.º 1
0
 /// <summary>
 /// Check all the node are valid
 /// </summary>
 public void CheckNodeAreValid()
 {
     foreach (RoadNetworkNode rnn in Details.Roads)
     {
         if (rnn == this)
         {
             Debug.Log("We are linked to us -> removing node");
             RoadNetworkLayout.RemoveLinkFrom(rnn);
             CreateRoadArray();
             break;
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Delete the this node
 /// </summary>
 public void DeleteNode()
 {
     RoadNetworkLayout.RemoveLinkFrom(this);
     DestroyImmediate(gameObject);
 }