Beispiel #1
0
    private Car[] LoadCars()
    {
        Car[] cars = new Car[Players.Count];

        for (int i = 0; i < Players.Count; i++)
        {
            var obj = ResourcesLoader.LoadCar(Players[i].CarType);
            cars[i] = obj.GetComponent <Car>();
            cars[i].Init(Players[i]);
        }

        return(cars);
    }
Beispiel #2
0
    public void TestMap()
    {
        Player player = new Player();

        player.ControllerScheme = CursorEditor.ControlScheme;

        testCar = ResourcesLoader.LoadCar(player.CarType);
        testCar.GetComponent <Car>().Init(player);
        testCar.transform.position = CursorEditor.transform.position + Vector3.up;
        DriveTesting = true;

        Exit();
    }