Merging with develop

This commit is contained in:
Zoe Roux
2021-06-17 14:53:28 +02:00
19 changed files with 45 additions and 20 deletions
+8
View File
@@ -78,7 +78,15 @@ namespace BBM
.addComponent<PlayerBonusComponent>()
.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) {
entity.scheduleDeletion();
});
});
}
}