private void OnDestroy()
        {
            if (instance == this)
            {
                instance = null;
            }

            ClearCars();
        }
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         return;
     }
     instance = this;
 }
Exemplo n.º 3
0
 public override float length(float lane)
 {
     return(Highway.curvePieceLength(lane));
 }
Exemplo n.º 4
0
 public bool IsInLane(float lane)
 {
     return(Highway.LanesOverlap(lane, this.lane));
 }