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

This commit is contained in:
Askou
2021-06-14 17:02:16 +02:00
37 changed files with 1180 additions and 569 deletions
+3 -1
View File
@@ -9,6 +9,7 @@
#include <iostream>
#include <Items/Bonus.hpp>
#include <Component/Levitate/LevitateComponent.hpp>
#include "Component/Movable/MovableComponent.hpp"
#include <Component/Timer/TimerComponent.hpp>
#include <Component/Tag/TagComponent.hpp>
#include <Component/BumperTimer/BumperTimerComponent.hpp>
@@ -81,6 +82,7 @@ namespace BBM
wal.getScene()->scheduleNewEntity("Bonus")
.addComponent<PositionComponent>(position)
.addComponent<TagComponent<Blowable>>()
.addComponent<MovableComponent>()
.addComponent<HealthComponent>(1, [](WAL::Entity &entity, WAL::Wal &wal) {
entity.scheduleDeletion();
})
@@ -193,7 +195,7 @@ namespace BBM
for (int i = 0; i < width + 1; i++) {
for (int j = 0; j < height + 1; j++) {
if (map[std::make_tuple(i, 0, j)] != HOLE && map[std::make_tuple(i, -1, j)] != BUMPER)
scene->addEntity("Unbreakable Wall")
scene->addEntity("Floor")
.addComponent<PositionComponent>(Vector3f(i, -1, j))
.addComponent<Drawable3DComponent, RAY3D::Model>(floorObj, false,
std::make_pair(MAP_DIFFUSE, floorPng));