entity = $entity; $this->entityType = $entity::NETWORK_ID; } /** * @return Position */ public function getPosition() : Position{ return $this->entity->getPosition(); } /** * @return int */ public function getType() : int{ return $this->entityType; } /** * @return bool */ public function isCreature() : bool{ return $this->entity instanceof Creature; } /** * @return bool */ public function isHuman() : bool{ return $this->entity instanceof Human; } /** * @return bool */ public function isProjectile() : bool{ return $this->entity instanceof Projectile; } /** * @return bool */ public function isVehicle() : bool{ return $this->entity instanceof Vehicle; } /** * @return bool */ public function isItem() : bool{ return $this->entity instanceof ItemEntity; } }