mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-21 13:55:10 +00:00
Reworking dependencies
This commit is contained in:
@@ -12,6 +12,9 @@ namespace WAL
|
||||
//! @brief A base system of WAL
|
||||
class System
|
||||
{
|
||||
private:
|
||||
//! @brief The list of dependencies of this system
|
||||
std::vector<std::type_index> _dependencies = {};
|
||||
public:
|
||||
//! @brief A virtual, default, destructor
|
||||
virtual ~System() = default;
|
||||
@@ -19,8 +22,8 @@ namespace WAL
|
||||
System(System &&) = default;
|
||||
|
||||
//! @brief Get the name of the component corresponding to this system.
|
||||
virtual const std::type_info &getComponent() const = 0;
|
||||
|
||||
const std::vector<std::type_index> &getDependencies() const;
|
||||
|
||||
//! @brief Update the corresponding component of the given entity
|
||||
//! @param entity The entity to update.
|
||||
//! @param dtime The delta time.
|
||||
@@ -35,7 +38,7 @@ namespace WAL
|
||||
virtual void onSelfUpdate();
|
||||
protected:
|
||||
//! @brief A system can't be instantiated, it should be derived.
|
||||
System() = default;
|
||||
explicit System(std::vector<std::type_index> dependencies);
|
||||
//! @brief A system can't be instantiated, it should be derived.
|
||||
System(const System &) = default;
|
||||
//! @brief A system can't be instantiated, it should be derived.
|
||||
|
||||
Reference in New Issue
Block a user