diff --git a/GPN_BadgeLasertag.ino b/GPN_BadgeLasertag.ino index 13c5dcb5ea57bcb49e8168a7fb1b56dbb6b189e5..2d5494d7e9efb620a0404541fed530a510783515 100644 --- a/GPN_BadgeLasertag.ino +++ b/GPN_BadgeLasertag.ino @@ -192,7 +192,7 @@ void loop() { Serial.println("Loop - Server - Ende"); } if (client) { -// client->update(); + client->update(); } Serial.println("Loop - Ende"); } diff --git a/GameClient.cpp b/GameClient.cpp index c91e4a3c3dd8ae6d0491714ba09296637ce23c28..7608db4c92a8d5b5327ee07b8dbfc2773cea5013 100644 --- a/GameClient.cpp +++ b/GameClient.cpp @@ -77,10 +77,7 @@ void GameClient::joinGame(String ip) { void GameClient::update() { Serial.println("GameClient - Update"); - if(reopen) { - reopen = false; - ui->open(playerList); - } + // String lastHitBy; // int lastDamage; // diff --git a/GameServer.cpp b/GameServer.cpp index c2a48f0724fdf77220b45dc1eb40cc1c3f6f64b1..eecc07872c03dc6a15ff55b77eed9ee22a9024ea 100644 --- a/GameServer.cpp +++ b/GameServer.cpp @@ -24,11 +24,13 @@ void GameServer::secureQuestion() { secureMenu = new PlayerListMenu(4); secureMenu->addMenuItem(new MenuItem("Start?", [=]() { this->startGame(); Serial.println("Lambda Start - Ende"); })); secureMenu->addMenuItem(new MenuItem("Cancel?", [=]() { - ui->open(playerList); + ui->dispatchInput(badge->getJoystickState()); + ui->closeCurrent(); ui->draw(); })); secureMenu->setRightAction([=]() { - ui->open(playerList); + ui->dispatchInput(badge->getJoystickState()); + ui->closeCurrent(); ui->draw(); }); secureMenu->setLeftAction([=]() { this->startGame(); });