using System.Collections; using System.Collections.Generic; using UnityEngine; /* Megfelelő safeSpace-k elhelyezésével lehet figyelni, hogy adott pozicíóban van-e még szabad helye egy új autónak. */ public class safeSpace : MonoBehaviour { public int roadID; public TrafficController traffic; void OnTriggerEnter () { traffic.roads[roadID].isThereSpace = false; } void OnTriggerExit () { traffic.roads[roadID].isThereSpace = true; } }