time = $x * 0.01; } public function update(float $deltaTime): void { $this->time += $deltaTime; } public function render(Renderer $r, float $camX = 0, float $camY = 0): void { $bob = sin($this->time * 4) * 1.5; $r->fillCircle($this->x + 4 - $camX, $this->y + 4 + $bob - $camY, 4, [255, 200, 40]); $r->fillRect($this->x + 3 - $camX, $this->y + 2 + $bob - $camY, 2, 4, [255, 240, 150]); } }