Fixing bonus collisions

This commit is contained in:
Zoe Roux
2021-06-17 14:37:34 +02:00
parent fcb1c91044
commit e9c3f8e083
5 changed files with 32 additions and 9 deletions
+2 -3
View File
@@ -99,9 +99,8 @@ namespace BBM
entity.scheduleDeletion();
})
.addComponent<LevitateComponent>(position.y)
.addComponent<CollisionComponent>([](WAL::Entity &bonus, const WAL::Entity &player, CollisionComponent::CollidedAxis axis) {
bonus.scheduleDeletion();
}, func[bonusType - 1], 0.5, .5)
.addComponent<CollisionComponent>(WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
func[bonusType - 1], 0.5, .5)
.addComponent<TimerComponent>(5s, [](WAL::Entity &bonus, WAL::Wal &wal){
bonus.scheduleDeletion();
})