mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-25 23:49:03 +00:00
adding unit test and constructor for collusion components without callbacks
This commit is contained in:
@@ -25,6 +25,8 @@ namespace BBM
|
||||
std::max(posA.getY(), posA.getY() + col.getBoundY()),
|
||||
std::max(posA.getZ(), posA.getZ() + col.getBoundZ())};
|
||||
for (auto &other : _wal.scene->getEntities()) {
|
||||
if (&other == &entity)
|
||||
continue;
|
||||
auto &colB = entity.getComponent<CollisionComponent>();
|
||||
auto &posB = other.getComponent<PositionComponent>();
|
||||
Vector3f minB = { std::min(posB.getX(), posB.getX() + colB.getBoundX()),
|
||||
|
||||
Reference in New Issue
Block a user