3 // Die abstrakte Antrieb-Klasse
4 class BaseDrive extends BaseSimulator {
8 private $horsePower = 0;
13 private function __construct ($class) {
14 // Eltern-Konstruktor aufrufen
15 parent::constructor($class);
18 if (((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
19 $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
25 // Beschreibung setzen
26 $this->setPartDescr("Namenloser Antrieb");
29 $this->removeNumberFormaters();
30 $this->removePartInstance();
33 // Konstruktor aufrufen
34 public function constructor ($class) {
35 $this->__construct($class);
38 // Setter-Methode fuert PS-Zahl
39 public function setHorsePower ($hp) {
40 if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Antriebsleistung wird auf <strong>%d</strong> PS gesetzt.<br />\n",
45 $this->horsePower = (int) $hp;
48 // Setter-Methode fuer Nockenanzahl
49 public function setNumCams ($cams) {
50 if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Nockenanzahl wird auf <strong>%d</strong> Nocken gesetzt.<br />\n",
55 $this->numCams = (int) $cams;
59 public function setPrice ($price) {
60 $this->price = (float) $price;
64 public function getPrice () {
68 public function removePrice () {