public void Consume(double liters) { if (IsRunning) { fuelTank.Consume(liters); } }
public void RunningIdle() { engine.Consume(.0003); fuelTank.Consume(.0003); fuelTankDisplay.IsOnReserve = fuelTank.IsOnReserve; fuelTankDisplay.IsComplete = fuelTank.IsComplete; fuelTankDisplay.FillLevel = fuelTank.FillLevel; }
public void Consume(double liters) { if (_isRunning) { _fuelTank.Consume(liters); if (_fuelTank.FillLevel == 0) { Stop(); } } }
public void Consume(double liters) { if (IsRunning && (fuelTank.FillLevel >= liters)) { fuelTank.Consume(liters); } if (fuelTank.FillLevel == 0) { Stop(); } }
public void Consume(double liters) { if (fuelTank.FillLevel < Car.FuelPerSec) { Stop(); } else if (IsRunning) { fuelTank.Consume(liters); } }
public void RunningIdle() { if (engine.IsRunning) { fuelTank.Consume(FuelConsumption); } if (fuelTank.FillLevel == 0) { engine.Stop(); } }
public void Consume(double liters) { if (running) { _fuelTank.Consume(liters); } if (_fuelTank.FillLevel == 0) { this.Stop(); } }
public void RunningIdle() { if (engine.IsRunning) { fuelTank.Consume(0.0003); } if (fuelTank.FillLevel <= 0) { engine.Stop(); } onBoardComputer.ElapseSecond(); }
public void Consume(double liters) { if (fuelTank.FillLevel < Car.FuelPerSec) { Stop(); } else if (IsRunning) { fuelTank.Consume(liters); EngineConsumedFuel?.Invoke(this, new EvArgs <double>(liters)); } }
public void Consume(double liters) { if (IsRunning) { _fuelTank.Consume(liters); Consumption += liters; ConsumptionList.Add(liters); if (_fuelTank.FillLevel == 0) { Stop(); } } }
public void Consume(double liters) { if (!IsRunning) { return; } if (_fuelTank.FillLevel == 0) { Stop(); return; } _fuelTank.Consume(liters); }
public void Consume(double liters) { if (!IsRunning) { return; } if (fuelTank.FillLevel > liters) { fuelTank.Consume(liters); } else { IsRunning = false; } }
public void Consume(double liters) { fuelTank.Consume(liters); }
public void Consume(double liters) { tank.Consume(liters); }