new: ja es pot començar el joc els dos jugador a l'hora

new: feedback visual per a saber qui ha pulsat start en la pantalla de titol
Player: afegit estat RESPAWNING per no tindre que estar fent cabrioles amb la invulnerabilitat al crear als jugadors
This commit is contained in:
2025-07-14 11:41:12 +02:00
parent e14336bad9
commit 31910b8a74
9 changed files with 309 additions and 112 deletions

View File

@@ -563,13 +563,33 @@ void Director::runTitle()
// Ejecuta la sección donde se juega al juego
void Director::runGame()
{
const auto player_id = Section::options == Section::Options::GAME_PLAY_1P ? 1 : 2;
int player_id = 1;
switch (Section::options)
{
case Section::Options::GAME_PLAY_1P:
player_id = 1;
break;
case Section::Options::GAME_PLAY_2P:
player_id = 2;
break;
case Section::Options::GAME_PLAY_BOTH:
player_id = 0;
break;
default:
player_id = 1;
break;
}
#ifdef DEBUG
constexpr auto current_stage = 0;
constexpr int CURRENT_STAGE = 0;
#else
constexpr auto current_stage = 0;
constexpr int CURRENT_STAGE = 0;
#endif
auto game = std::make_unique<Game>(player_id, current_stage, GAME_MODE_DEMO_OFF);
auto game = std::make_unique<Game>(player_id, CURRENT_STAGE, GAME_MODE_DEMO_OFF);
game->run();
}