Exemplo n.º 1
0
 /**
  * @param Block[]|Space $blocks
  * @param Position|null $anchor
  * @param string $name
  */
 public function __construct($blocks = [], Position $anchor = null, $name = "default")
 {
     $this->name = $name;
     $this->creationTime = microtime(true);
     if ($blocks instanceof Space) {
         $anchor = $anchor->round();
         foreach ($blocks->getBlockList() as $b) {
             $this->add($b->subtract($anchor), $b);
         }
     } else {
         $this->blocks = $blocks;
     }
 }