Example #1
0
        public static VehicleCompanion GetVehicleCompanion(string vehicleName, IVehicleInterface vehicleInterface)
        {
            var companion = new VehicleCompanion(vehicleInterface);

            companion.vehicleName = vehicleName;

            Vehicles.Add(companion);
            return(companion);
        }
        public static VehicleCompanion GetVehicleCompanion(IVehicleInterface vehicleInterface)
        {
            var companion = new VehicleCompanion(vehicleInterface);

            if (AirSimSettings.GetSettings().SimMode == "Car")
            {
                companion.vehicleName = "PhysXCar";
            }
            else if (AirSimSettings.GetSettings().SimMode == "Multirotor")
            {
                companion.vehicleName = "SimpleFlight";
            }

            Vehicles.Add(companion);
            return(companion);
        }
        public static VehicleCompanion GetVehicleCompanion(IVehicleInterface vehicleInterface, string vehicleName)
        {
            var companion = new VehicleCompanion(vehicleInterface);

            if (AirSimSettings.GetSettings().SimMode == "Car")
            {
                companion.vehicleType = "PhysXCar";
                companion.vehicleName = vehicleName;
            }

            else if (AirSimSettings.GetSettings().SimMode == "Multirotor")
            {
                companion.vehicleType = "SimpleFlight";
            }


            Vehicles.Add(companion);
            Debug.LogWarning("Number of cars: " + Vehicles.Count.ToString() + "Sim mode - " + AirSimSettings.GetSettings().SimMode + ". Added - " + companion.vehicleName);

            return(companion);
        }
 private VehicleCompanion(IVehicleInterface vehicleInterface)
 {
     VehicleInterface = vehicleInterface;
     isDrone          = vehicleInterface is Drone ? true : false;
     basePortId       = AirSimSettings.GetSettings().GetPortIDForVehicle(isDrone);
 }