40 private Entity $projectile;
42 public function __construct(
48 $this->entity = $shooter;
49 $this->projectile = $projectile;
59 public function getBow() :
Item{
69 return $this->projectile;
72 public function setProjectile(
Entity $projectile) : void{
73 if($projectile !== $this->projectile){
74 if(count($this->projectile->getViewers()) === 0){
75 $this->projectile->close();
77 $this->projectile = $projectile;
81 public function getForce() : float{
85 public function setForce(
float $force) : void{
86 $this->force = $force;