mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 00:31:50 +00:00
Adding a restart timer when resuming the game
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user