Пример #1
0
 /**
  * @param Entity $projectile
  */
 public function setProjectile(Entity $projectile)
 {
     if ($projectile !== $this->projectile) {
         if (count($this->projectile->getViewers()) === 0) {
             $this->projectile->kill();
             $this->projectile->close();
         }
         $this->projectile = $projectile;
     }
 }
Пример #2
0
 public function close()
 {
     parent::close();
     if ($this->owner instanceof Player) {
         $this->owner->fishingHook = null;
     }
 }