internal FuelCar(string i_LicenseId, string i_NameOfModel, float i_EnergyPrecent) : base(i_LicenseId, i_NameOfModel) { float currentCapcity = i_EnergyPrecent * 55f / 100f; m_EnergySystem = new FuelEnergySystem(eTypeFuel.Octan96, 55f, currentCapcity); }
internal Truck(string i_LicenseId, string i_NameOfModel, float i_EnergyPrecent) : base(i_LicenseId, i_NameOfModel) { float currentEnergy = i_EnergyPrecent * 110f / 100f; IntalizingWheels(12, 26); m_EnergySystem = new FuelEnergySystem(eTypeFuel.Soler, 110f, currentEnergy); m_VehicleInfo = new VehicleInfo(); }
public void FillRegularVehicle(string i_LicenseId, eTypeFuel i_FuelType, float i_AmountToFill) { Customer customer = TryToGetCustomer(i_LicenseId); FuelEnergySystem fuelEnergy = customer.Vehicle.EnergySystem as FuelEnergySystem; if (fuelEnergy != null) { fuelEnergy.FillFuel(i_AmountToFill, i_FuelType); } else { throw new FormatException("The Object doesn't have fuel system"); } }