mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 19:22:20 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -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 <ype){
|
||||
return entity.hasComponent(ltype);
|
||||
});
|
||||
if (valid)
|
||||
view->emplace_back(entity);
|
||||
|
||||
Reference in New Issue
Block a user