$this->scenes()->pop()], ['OPTIONS', null, fn () => $this->scenes()->push(OptionsScene::class)], ['HOW TO PLAY', null, fn () => $this->scenes()->push(HelpScene::class)], ['QUIT TO TITLE', 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); } }