tilesetName = RomSprites::SHEET; } public function setCamera(array $camera, float $wave): void { $this->camera = $camera; $this->wave = $wave; } protected function tick(array $player): void { $half = max(128, $this->sdl->getWindow()->getWidth() / 2); $center = $this->camera[0] + 128; if ($this->x < $center - $half - 0x20) { $this->x = max($this->camera[0] + 0x1B4, $center + $half) + mt_rand(0, 255) * 2; } $this->x -= 3; } public function render(float $cameraX, float $cameraY): void { $this->blit(RomSprites::CLOUD, $this->x, $this->y + $this->wave + 1, $cameraX, $cameraY); } }