Adding a restart timer when resuming the game

This commit is contained in:
Zoe Roux
2021-06-18 17:56:34 +02:00
parent 6015b62664
commit a55b1543c9
7 changed files with 47 additions and 11 deletions
@@ -1,6 +1,7 @@
#include "EndConditionSystem.hpp"
#include <map>
#include <System/Renderer/CameraSystem.hpp>
#include "Runner/Runner.hpp"
#include "Component/Score/ScoreComponent.hpp"
@@ -23,6 +24,7 @@ namespace BBM
if (alivePlayersCount <= 1) {
endConditionRate -= dtime;
if (endConditionRate <= 0ns) {
this->_wal.getSystem<CameraSystem>().hasEnded = false;
Runner::gameState.nextScene = Runner::gameState.ScoreScene;
endConditionRate = 500ms;
}