예제 #1
0
 /**
  * Constructor
  * Hero is abstract, but the extended classes should in constructors pass in options for hero power etc
  *
  * @param array $options Options to set during initialization
  */
 public function __construct(array $options = [])
 {
     // Set hero power reference
     if (isset($options['heroPower']) && $options['heroPower'] instanceof HeroPower) {
         $this->heroPower = $options['heroPower'];
     }
     // Call the parent constructor to set up events, etc.
     parent::__construct($options);
 }
예제 #2
0
 /**
  * {@inheritDoc}
  *
  * @param array $options Options to set during initialization
  * */
 public function __construct($options = [])
 {
     $options['deathrattle'] = [new ZombieChowDeathrattle()];
     parent::__construct($options);
 }