Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     $tallGrass = new TallGrass();
     $tallGrass->setBaseAmount(5);
     $this->addPopulator($tallGrass);
     $this->setElevation(46, 58);
     $this->temperature = 0.5;
     $this->rainfall = 0.5;
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     $trees = new Tree();
     $trees->setBaseAmount(1);
     $this->addPopulator($trees);
     $tallGrass = new TallGrass();
     $tallGrass->setBaseAmount(1);
     $this->addPopulator($tallGrass);
     //TODO: add emerald
     $this->setElevation(63, 127);
     $this->temperature = 0.4;
     $this->rainfall = 0.5;
 }
Beispiel #3
0
 public function __construct($type = self::TYPE_NORMAL)
 {
     parent::__construct();
     $this->type = $type;
     $trees = new Tree($type === self::TYPE_BIRCH ? Sapling::BIRCH : Sapling::OAK);
     $trees->setBaseAmount(5);
     $this->addPopulator($trees);
     $tallGrass = new TallGrass();
     $tallGrass->setBaseAmount(3);
     $this->addPopulator($tallGrass);
     $this->setElevation(63, 81);
     if ($type === self::TYPE_BIRCH) {
         $this->temperature = 0.5;
         $this->rainfall = 0.5;
     } else {
         $this->temperature = 0.7;
         $this->temperature = 0.8;
     }
 }