mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
merge develop in gravity_component
This commit is contained in:
@@ -134,9 +134,25 @@ namespace BBM
|
||||
static const std::string unbreakableObj = unbreakableWallPath + objExtension;
|
||||
static const std::string unbreakablePnj = unbreakableWallPath + imageExtension;
|
||||
|
||||
for (int i = 0; i < height; i++) {
|
||||
scene->addEntity("Bomb stopper")
|
||||
.addComponent<PositionComponent>(-1, 0, i)
|
||||
.addComponent<TagComponent<Blowable>>();
|
||||
scene->addEntity("Bomb stopper")
|
||||
.addComponent<PositionComponent>(width + 1, 0, i)
|
||||
.addComponent<TagComponent<Blowable>>();
|
||||
}
|
||||
for (int i = 0; i < width; i++) {
|
||||
scene->addEntity("Bomb stopper")
|
||||
.addComponent<PositionComponent>(i, 0, -1)
|
||||
.addComponent<TagComponent<Blowable>>();
|
||||
scene->addEntity("Bomb stopper")
|
||||
.addComponent<PositionComponent>(i, 0, height + 1)
|
||||
.addComponent<TagComponent<Blowable>>();
|
||||
}
|
||||
|
||||
scene->addEntity("Bottom Wall")
|
||||
.addComponent<PositionComponent>(Vector3f((width + 1) / 2, 0, -1))
|
||||
.addComponent<TagComponent<Blowable>>()
|
||||
.addComponent<CollisionComponent>(
|
||||
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
|
||||
&MapGenerator::wallCollided, Vector3f(-(width + 1) / 2 , 0.25, 0.25), Vector3f(width + 1, 2, 0.75))
|
||||
@@ -145,7 +161,6 @@ namespace BBM
|
||||
RAY::Vector3(width + 3, 1, 1));
|
||||
scene->addEntity("Upper Wall")
|
||||
.addComponent<PositionComponent>(Vector3f((width + 1) / 2, 0, height + 1))
|
||||
.addComponent<TagComponent<Blowable>>()
|
||||
.addComponent<CollisionComponent>(
|
||||
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
|
||||
&MapGenerator::wallCollided, Vector3f(-(width + 1) / 2 , 0.25, 0.25), Vector3f(width + 1, 2, 0.75))
|
||||
@@ -154,7 +169,6 @@ namespace BBM
|
||||
RAY::Vector3(width + 3, 1, 1));
|
||||
scene->addEntity("Left Wall")
|
||||
.addComponent<PositionComponent>(Vector3f(width + 1, 0, height / 2))
|
||||
.addComponent<TagComponent<Blowable>>()
|
||||
.addComponent<CollisionComponent>(
|
||||
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
|
||||
&MapGenerator::wallCollided, Vector3f(0.25, 0.25, -(height + 1) / 2 ), Vector3f(0.75, 2, height + 1))
|
||||
|
||||
Reference in New Issue
Block a user