tilesetName = RomSprites::SHEET; $this->startX = $this->x; } public function setCamera(array $camera): void { $this->camera = $camera; } protected function tick(array $player): void { if ($this->x >= 0x580) return; if ($this->y + 0x40 < $this->camera[1]) { $this->x = $this->startX; } $heroY = self::heroY($player); if ($heroY > $this->y - 0x20 && $heroY <= $this->y + 0x2C) { $this->x += 0.5; } } public function getHurtBox(): ?array { return self::box($this->x + 2, $this->y + 2, 0x0C - 2, 0x2E - 2); } public function render(float $cameraX, float $cameraY): void { $this->blit(RomSprites::SPIKE_WALL, $this->x, $this->y - 16 + 1, $cameraX, $cameraY); } }