mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
Allowing entities to be created and removed
This commit is contained in:
@@ -20,14 +20,14 @@ namespace BBM
|
||||
const auto &wallPos = wall.getComponent<PositionComponent>();
|
||||
auto diff = pos.position + mov->getVelocity() - wallPos.position;
|
||||
// mov->_velocity = Vector3f();
|
||||
if (diff.x <= 0 && mov->_velocity.x < 0)
|
||||
mov->_velocity.x = 0;
|
||||
if (diff.x >= 0 && mov->_velocity.x > 0)
|
||||
mov->_velocity.x = 0;
|
||||
if (diff.z <= 0 && mov->_velocity.z < 0)
|
||||
mov->_velocity.z = 0;
|
||||
if (diff.z >= 0 && mov->_velocity.z > 0)
|
||||
mov->_velocity.z = 0;
|
||||
// if (diff.x <= 0 && mov->_velocity.x < 0)
|
||||
// mov->_velocity.x = 0;
|
||||
// if (diff.x >= 0 && mov->_velocity.x > 0)
|
||||
// mov->_velocity.x = 0;
|
||||
// if (diff.z <= 0 && mov->_velocity.z < 0)
|
||||
// mov->_velocity.z = 0;
|
||||
// if (diff.z >= 0 && mov->_velocity.z > 0)
|
||||
// mov->_velocity.z = 0;
|
||||
}
|
||||
|
||||
const std::string MapGenerator::assetsPath = "./assets/";
|
||||
|
||||
Reference in New Issue
Block a user