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

# Conflicts:
#	sources/Component/BombHolder/BombHolderComponent.cpp
#	sources/Map/Map.cpp
This commit is contained in:
Clément Le Bihan
2021-06-18 11:17:27 +02:00
53 changed files with 168 additions and 152 deletions
+4 -4
View File
@@ -13,17 +13,17 @@ namespace WAL
Entity::Entity(Scene &scene, std::string name, bool notifyScene)
: _uid(Entity::nextID++),
_scene(scene),
_name(std::move(name)),
_notifyScene(notifyScene)
_notifyScene(notifyScene),
_scene(scene)
{ }
Entity::Entity(const Entity &other)
: _uid(Entity::nextID++),
_scene(other._scene),
_name(other._name),
_disabled(other._disabled),
_notifyScene(other._notifyScene)
_notifyScene(other._notifyScene),
_scene(other._scene)
{
for (const auto &cmp : other._components)
this->addComponent(*cmp.second);
+2 -2
View File
@@ -34,8 +34,8 @@ namespace WAL
for (auto &view : this->_views) {
if (std::find(view->getTypes().begin(), view->getTypes().end(), type) == view->getTypes().end())
continue;
bool valid = std::all_of(view->getTypes().begin(), view->getTypes().end(), [&entity](const auto &type){
return entity.hasComponent(type);
bool valid = std::all_of(view->getTypes().begin(), view->getTypes().end(), [&entity](const auto &ltype){
return entity.hasComponent(ltype);
});
if (valid)
view->emplace_back(entity);