Exemplo n.º 1
0
    async void Start()
    {
        instance = this;
        VehicleView.CallList.Add(this);
        VehicleView.CallList.Add(DealerView);
        VehicleView.CallList.Add(GarageView);
        VehicleView.Vehicles      = SaveSystem.GetVehicles();
        VehicleView.SelectedIndex = SaveSystem.GetSelectedVehicleIndex();
        await VehicleView.SpawnVehicle(SaveSystem.GetSelectedVehicleIndex());

        DealerView.view = VehicleView;
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    async void OnEnable()
    {
        Resources.LoadAll <VehicleInfo>("ModSystem/Objects");

        var vehicles = new List <Save.Vehicle>();

        vehicleInfoList = new List <VehicleInfo>(Resources.FindObjectsOfTypeAll <VehicleInfo>());
        foreach (var item in vehicleInfoList)
        {
            vehicles.Add(item.GetSaveVehicle());
        }
        view.Vehicles = vehicles;
        await view.SpawnVehicle(0);
    }