line = $y; } public function update(float $deltaTime): void { $this->clock += $deltaTime; while ($this->clock >= self::FRAME) { $this->clock -= self::FRAME; $this->line += self::STEPS[$this->step] / 256; if (++$this->frames % 16 === 0) { $this->step = ($this->step + 1) % 32; } } } public function getLine(): float { return $this->line; } /** Frame counter, used to scroll the surface sprites. */ public function getFrames(): int { return $this->frames; } }