mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-11 21:06:41 +00:00
19 lines
399 B
C++
19 lines
399 B
C++
//
|
|
// Created by Tom Augier on 05/06/2021
|
|
//
|
|
|
|
#include "ScoreSystem.hpp"
|
|
#include <map>
|
|
|
|
namespace BBM {
|
|
|
|
ScoreSystem::ScoreSystem(WAL::Wal &wal)
|
|
: System(wal)
|
|
{}
|
|
|
|
void ScoreSystem::onUpdate(WAL::ViewEntity<ScoreComponent, HealthComponent> &entity, std::chrono::nanoseconds dtime)
|
|
{
|
|
if (entity.get<HealthComponent>().getHealthPoint())
|
|
entity.get<ScoreComponent>().aliveTime += dtime;
|
|
}
|
|
} |