centerX = $tileX * 32 + 8; $this->centerY = $tileY * 32 + 8; $this->tick([]); } protected function tick(array $player): void { $angle = deg2rad(2 * ($this->frames % 180)); $this->x = $this->centerX + round(64 * cos($angle)); $this->y = $this->centerY + round(64 * sin($angle)); } public function getHurtBox(): ?array { return self::box($this->x + 4, $this->y + 2, 8, 12); } public function render(float $cameraX, float $cameraY): void { $this->blit(self::SPRITE, $this->x, $this->y, $cameraX, $cameraY); } }