Go to the documentation of this file.
21 template<
typename ...Dependencies>
33 return this->
_wal.
getScene()->template view<Dependencies...>();
53 void update(std::chrono::nanoseconds dtime)
final
55 for (
auto &entity : this->
getView())
64 for (
auto &entity : this->
getView())
Definition: Component.cpp:7
std::shared_ptr< Scene > getScene() const
Retrieve the current scene.
Definition: Wal.hpp:94
virtual void onSelfUpdate(std::chrono::nanoseconds dtime)
A method called after all entities that this system manage has been updated.
Definition: System.hpp:48
System(Wal &wal)
A system can't be instantiated, it should be derived.
Definition: System.hpp:72
System(System &&) noexcept=default
A system can be moved.
View< Dependencies... > & getView() override
Get a view of all entities containing every dependencies of this system.
Definition: System.hpp:31
A base class that represent a system.
Definition: ISystem.hpp:15
The main WAL class, it is used to setup and run the ECS.
Definition: Wal.hpp:27
Wal & _wal
A reference to the ECS.
Definition: System.hpp:69
virtual void onFixedUpdate(ViewEntity< Dependencies... > &entity)
An alternative of onUpdate that is called every 8ms (120 times per seconds). If the system slow down,...
Definition: System.hpp:44
~System() override=default
A virtual, default, destructor.
void fixedUpdate() final
An alternative of update that is called every 8ms (120 times per seconds). If the system slow down,...
Definition: System.hpp:62
void update(std::chrono::nanoseconds dtime) final
Update the whole system (every entities that this system is responsible can be updated.
Definition: System.hpp:53
A view allowing one to easily access entities containing a set list of component. A view is always up...
Definition: View.hpp:133
A base system of WAL.
Definition: System.hpp:22
virtual void onUpdate(ViewEntity< Dependencies... > &entity, std::chrono::nanoseconds dtime)
Update the corresponding component of the given entity.
Definition: System.hpp:39
System & operator=(const System &)=default
A system can't be instantiated, it should be derived.