Adding an iterator

This commit is contained in:
Zoe Roux
2021-06-04 18:59:42 +02:00
parent eac5c2c847
commit a40b61845a
12 changed files with 220 additions and 98 deletions
+6 -11
View File
@@ -15,21 +15,16 @@ namespace WAL
class ISystem
{
public:
//! @brief Update the corresponding component of the given entity
//! @param entity The entity to update.
//! @param dtime The delta time.
virtual void onUpdate(Entity &entity, std::chrono::nanoseconds dtime) = 0;
//! @brief Update the whole system (every entities that this system is responsible can be updated.
//! @param dtime The delta time since the last call to this method.
virtual void update(std::chrono::nanoseconds dtime) = 0;
//! @brief An alternative of onUpdate that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up.
//! @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.
//! @remark This should be used for Physics, AI and everything that could be imprecise due to float rounding.
//! @param entity The entity to update.
virtual void onFixedUpdate(Entity &entity) = 0;
//! @brief A method called after all entities that this system manage has been updated.
virtual void onSelfUpdate() = 0;
virtual void fixedUpdate() = 0;
//! @brief Get a view containing every entity this system should update.
virtual BaseView &getView() = 0;
virtual IView &getView() = 0;
//! @brief A virtual default destructor.
virtual ~ISystem() = default;