Beispiel #1
0
        public void FuelVehicle(BaseVehicle i_Vehicle, FuelVehicle.eEnergyType i_FuelType, float i_Amount)
        {
            FuelVehicle vehicle = i_Vehicle as FuelVehicle;

            if (vehicle != null)
            {
                if (vehicle.EnergyType == i_FuelType)
                {
                    vehicle.Fuel = i_Amount;
                }
                else
                {
                    throw new ArgumentException(Strings.try_to_fuel_other_type_of_fuel);
                }
            }
            else
            {
                throw new ArgumentException(Strings.try_to_fuel_electric_vehicle);
            }
        }
Beispiel #2
0
 public void InflatingWheel(BaseVehicle i_Vehicle)
 {
     i_Vehicle.FillTires();
 }