// Use this for initialization
        void Start()
        {
            // Add
            gameObjects = new CustomList <GameObject>();
            gameObjects.Add(new GameObject());
            gameObjects.Add(new GameObject());
            gameObjects.Add(new GameObject());

            GameObject firstObject = gameObjects[0];

            // Add Range
            CarBrands <GameObject> carList1 = new CarBrands <GameObject>();
            //carList1.Add(car1);

            CarBrands <GameObject> carList2 = new CarBrands <GameObject>();

            //CarBrands.RemoveAt(car1);
        }
Beispiel #2
0
 public void CarDealership()
 {
     // Creating Items for each of the 2 lists
     CarBrands <GameObject> car1 = new CarBrands <GameObject>()
     {
         Brand = "Ferrari",
         Model = "458Italia",
         Cost  = 600000,
         Type  = "ExoticCar"
     };
     CarBrands <GameObject> car2 = new CarBrands <GameObject>()
     {
         Brand = "Lamborghini",
         Model = "Murcielago",
         Cost  = 450000,
         Type  = "ExoticCar"
     };
     CarBrands <GameObject> car3 = new CarBrands <GameObject>()
     {
         Brand = "Ford",
         Model = "GT",
         Cost  = 397500,
         Type  = "ExoticCar"
     };
     CarBrands <GameObject> car4 = new CarBrands <GameObject>()
     {
         Brand = "Bugatti",
         Model = "Veyron",
         Cost  = 1500000,
         Type  = "SuperCar"
     };
     CarBrands <GameObject> car5 = new CarBrands <GameObject>()
     {
         Brand = "McLaren",
         Model = "P1GTR",
         Cost  = 2000000,
         Type  = "SuperCar"
     };
 }