Beispiel #1
0
    private void AddCar()
    {
        Vertex     vertex = roads.GetRandomRespawn();
        GameObject obj    = Instantiate(car, vertex.transform.position, Quaternion.identity);

        obj.transform.parent = transform;
        CarMainController ctrl = obj.GetComponent <CarMainController>();

        ctrl.Setup(vertex, roads);
        count++;
        ui.SetCars(count);
    }