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