Esempio n. 1
0
        public void FuelGas(float i_GasAmount, eFuelType i_FuelType)
        {
            FuelBasedEnergy energy = m_Energy as FuelBasedEnergy;

            if (energy == null)
            {
                throw new ArgumentException("This morotcycle is not fuel based!");
            }

            energy.FuelGas(i_GasAmount, i_FuelType);;
        }
Esempio n. 2
0
        public static void RefuelFuelBasedVehicle(string i_VehicleLicensePlate, eFuelType i_FuelType, float i_AmountToFuel)
        {
            Vehicle         vehicle      = getVehicleByLicensePlate(i_VehicleLicensePlate);
            FuelBasedEnergy EnergyToFuel = vehicle.Energy as FuelBasedEnergy;

            if (EnergyToFuel == null)
            {
                throw new ArgumentException("Only Fuel Based Vehicles are accepted.");
            }

            EnergyToFuel.FuelGas(i_AmountToFuel, i_FuelType);
        }
Esempio n. 3
0
        public void FuelGas(float i_GasAmount, eFuelType i_FuelType)
        {
            FuelBasedEnergy enegry = m_Energy as FuelBasedEnergy;

            enegry.FuelGas(i_GasAmount, i_FuelType);
        }