Merge branch 'develop' of github.com:AnonymusRaccoon/Bomberman into fixs

This commit is contained in:
Zoe Roux
2021-06-17 14:38:33 +02:00
48 changed files with 1515 additions and 97 deletions
+9 -4
View File
@@ -132,6 +132,7 @@ namespace BBM
scene->addEntity("Unbreakable Wall")
.addComponent<PositionComponent>(i, 0, j)
.addComponent<TagComponent<Blowable>>()
.addComponent<TagComponent<Unbreakable>>()
.addComponent<CollisionComponent>(
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::wallCollided, 0.25, .75)
@@ -239,10 +240,11 @@ namespace BBM
scene->addEntity("Breakable Block")
.addComponent<PositionComponent>(coords)
.addComponent<TagComponent<Blowable>>()
.addComponent<TagComponent<Breakable>>()
.addComponent<HealthComponent>(1, &MapGenerator::wallDestroyed)
.addComponent<CollisionComponent>(
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::wallCollided, 0.25, .75)
//.addComponent<CollisionComponent>(
// WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
// &MapGenerator::wallCollided, 0.25, .75)
.addComponent<Drawable3DComponent, RAY3D::Model>(breakableObj, false, std::make_pair(MAP_DIFFUSE, breakablePng));
}
@@ -276,6 +278,7 @@ namespace BBM
scene->addEntity("Unbreakable Block")
.addComponent<PositionComponent>(coords)
.addComponent<TagComponent<Blowable>>()
.addComponent<TagComponent<Unbreakable>>()
.addComponent<CollisionComponent>(
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::wallCollided, 0.25, .75)
@@ -293,6 +296,7 @@ namespace BBM
WAL::Entity &holeEntity = scene->addEntity("Hole Block");
holeEntity.addComponent<PositionComponent>(Vector3f(coords.x, coords.y - 1, coords.z))
.addComponent<TagComponent<Hole>>()
.addComponent<CollisionComponent>(
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::holeCollide, Vector3f(0.25, 0.25, 0.25),Vector3f(0.75, 1.75, 0.75));
@@ -311,7 +315,8 @@ namespace BBM
scene->addEntity("Bumper Block")
.addComponent<PositionComponent>(Vector3f(coords.x, coords.y, coords.z))
.addComponent<Drawable3DComponent, RAY3D::Model>(bumperObj, false,std::make_pair(MAP_DIFFUSE, bumperPng))
.addComponent<TagComponent<Bumper>>()
.addComponent<Drawable3DComponent, RAY3D::Model>(bumperObj, false, std::make_pair(MAP_DIFFUSE, bumperPng))
.addComponent<CollisionComponent>(
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::bumperCollide, Vector3f(0.25, 0.25, 0.25),Vector3f(0.75, 0.75, 0.75));