mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-15 12:25:09 +00:00
using Vector2.angle()
This commit is contained in:
@@ -11,15 +11,13 @@
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
HealthSystem::HealthSystem()
|
||||
: WAL::System({
|
||||
typeid(HealthComponent)
|
||||
})
|
||||
HealthSystem::HealthSystem(WAL::Wal &wal)
|
||||
: System(wal)
|
||||
{}
|
||||
|
||||
void HealthSystem::onFixedUpdate(WAL::Entity &entity)
|
||||
void HealthSystem::onFixedUpdate(WAL::ViewEntity<HealthComponent> &entity)
|
||||
{
|
||||
auto &health = entity.getComponent<HealthComponent>();
|
||||
auto &health = entity.get<HealthComponent>();
|
||||
|
||||
if (health.getHealthPoint() == 0) {
|
||||
health.onDeath(entity);
|
||||
|
||||
Reference in New Issue
Block a user