Ejemplo n.º 1
0
 /**
  * @param Car $car
  * @return PlayerCar
  */
 public function provideStockCar(Car $car)
 {
     $partProvider = $this->partProvider;
     $stockCar = new PlayerCar();
     $stockCar->setCar($car);
     $stockCar->setAspirationPart($partProvider->getAspirationPart($car->getAspiration(), PartLevels::STOCK));
     $stockCar->setBrakes($partProvider->getPart(PartTypeNames::BRAKES, PartLevels::STOCK));
     $stockCar->setDrivetrainPart($partProvider->getDrivetrainPart($car->getDrivetrain(), PartLevels::STOCK));
     $stockCar->setEngineTune($partProvider->getPart(PartTypeNames::ENGINE_TUNE, PartLevels::STOCK));
     $stockCar->setMassReduction($partProvider->getPart(PartTypeNames::MASS_REDUCTION, PartLevels::STOCK));
     $stockCar->setSuspension($partProvider->getPart(PartTypeNames::SUSPENSION, PartLevels::STOCK));
     return $stockCar;
 }
Ejemplo n.º 2
0
 private function getRandomPlayerCar()
 {
     $playerCar = new PlayerCar();
     return $playerCar->setCar($this->getRandomCar());
 }