wave = (int)($params['wave'] ?? 0); $this->restart = $params['restart'] ?? []; parent::enter($params); $this->sound()->playSfx('defeat'); } public function isOverlay(): bool { return true; } protected function items(): array { return [ [Lang::t('RETRY'), null, fn () => $this->scenes()->switchTo(PlayScene::class, $this->restart)], [Lang::t('MAPS'), null, fn () => $this->scenes()->switchTo(MapSelectScene::class, $this->restart)], [Lang::t('CHOOSE YOUR SIDE'), null, fn () => $this->scenes()->switchTo(FactionSelectScene::class)], ]; } protected function subtitles(): array { return [[Lang::t('THE BASTION HAS FALLEN'), [230, 200, 190]], [Lang::t('WAVE {n}', ['n' => $this->wave]), [200, 200, 200]]]; } }