artwork->boot(); $this->time = 0.0; if (!$this->sdl()->hasTexture('loading')) { $this->sdl()->loadTexture('loading', 'assets/sprites/loading.png'); } } public function update(float $dt): void { $this->time += $dt; $actions = $this->actions(); if ($this->time >= self::DURATION || $actions->isPressed('confirm') || $actions->isPressed('fire') || $actions->isPressed('back')) { $this->scenes()->switchTo(TitleScene::class); } } public function render(Renderer $r): void { $r->clear([0, 0, 0]); $r->copy($this->sdl()->getTexture('loading')['texture'], null, 0, 8, 256, 160); } }