$this->scenes()->pop()], ['OPTIONS', null, fn () => $this->scenes()->push(OptionsScene::class, ['overlay' => true])], ['TITLE SCREEN', null, fn () => $this->scenes()->switchTo(TitleScene::class)], ]; } protected function back(): void { $this->scenes()->pop(); } public function update(float $dt): void { if ($this->actions()->isPressed('pause') && !$this->actions()->isPressed('back')) { $this->scenes()->pop(); return; } parent::update($dt); } }