Beispiel #1
0
    private void GetLanes()
    {
        Transform     lanesObject = transform.Find("Lanes");
        int           lanesCount  = lanesObject.transform.childCount;
        LaneBehaviour lane        = null;

        for (int i = 0; i < lanesCount; i++)
        {
            lane               = lanesObject.transform.GetChild(i).GetComponent <LaneBehaviour> ();
            this.EnableLanes  += lane.EnableLane;
            this.DisableLanes += lane.DisableLane;
            this.lanes.Add(lane);
        }
    }
Beispiel #2
0
 void Start()
 {
     this.moveTo        = this.GetComponent <MoveTo> ();
     this.carsPool      = this.GetComponentInParent <PoolManager> ();
     this.laneBehaviour = this.GetComponentInParent <LaneBehaviour> ();
 }