mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-04 02:36:31 +00:00
Adding an iterator
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user