mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-03 18:31:17 +00:00
Merge branch 'develop' of github.com:AnonymusRaccoon/Bomberman into parser
# Conflicts: # sources/Map/Map.cpp # sources/Runner/GameScene.cpp # sources/Runner/PauseMenuScene.cpp # sources/Runner/Runner.cpp # sources/System/Controllable/ControllableSystem.cpp # sources/System/Lobby/LobbySystem.cpp
This commit is contained in:
@@ -17,8 +17,13 @@ namespace BBM
|
||||
void TimerSystem::onUpdate(WAL::ViewEntity<TimerComponent> &entity, std::chrono::nanoseconds dtime)
|
||||
{
|
||||
auto &timer = entity.get<TimerComponent>();
|
||||
|
||||
if (timer.disabled)
|
||||
return;
|
||||
|
||||
timer.ringIn -= dtime;
|
||||
if (timer.ringIn <= 0ns) {
|
||||
timer.disabled = true;
|
||||
timer.callback(entity, this->_wal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user