mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-02 02:05:25 +00:00
Remove controllable instead of checking health
This commit is contained in:
@@ -82,6 +82,9 @@ namespace BBM
|
||||
.addComponent<HealthComponent>(1, [](WAL::Entity &entity, WAL::Wal &) {
|
||||
auto &animation = entity.getComponent<AnimationsComponent>();
|
||||
animation.setAnimIndex(5);
|
||||
|
||||
if (entity.hasComponent<ControllableComponent>())
|
||||
entity.removeComponent<ControllableComponent>();
|
||||
if (entity.hasComponent<TimerComponent>())
|
||||
return;
|
||||
entity.addComponent<TimerComponent>(1s, [](WAL::Entity &entity, WAL::Wal &wal) {
|
||||
|
||||
Reference in New Issue
Block a user