Merge branch 'develop' into parser

This commit is contained in:
Benjamin HENRY
2021-06-17 21:54:54 +02:00
committed by GitHub
75 changed files with 1812 additions and 183 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ namespace WAL
{
const std::type_index &type = typeid(T);
if (this->hasComponent(type))
throw DuplicateError("A component of the type \"" + std::string(type.name()) + "\" already exists.");
throw DuplicateError("A component of the type \"" + std::string(type.name()) + "\" already exists on " + this->_name + ".");
this->_components[type] = std::make_unique<T>(*this, TypeHolder<TNested>()..., std::forward<Types>(params)...);
if (this->_notifyScene)
this->_componentAdded(type);
+3 -2
View File
@@ -44,7 +44,8 @@ namespace WAL
virtual void onFixedUpdate(ViewEntity<Dependencies...> &entity) {}
//! @brief A method called after all entities that this system manage has been updated.
virtual void onSelfUpdate() {}
//! @param dtime The delta time.
virtual void onSelfUpdate(std::chrono::nanoseconds dtime) {}
//! @brief Update the whole system (every entities that this system is responsible can be updated.
@@ -53,7 +54,7 @@ namespace WAL
{
for (auto &entity : this->getView())
this->onUpdate(entity, dtime);
this->onSelfUpdate();
this->onSelfUpdate(dtime);
}
//! @brief An alternative of update that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up.