1 #ifndef MSP_GAME_BASICSYSTEM_
2 #define MSP_GAME_BASICSYSTEM_
10 concept HasTick = requires(T x) { x.tick(Time::TimeDelta()); };
13 requires std::is_base_of_v<Component, T> && HasTick<T>
14 class BasicSystem: public System
19 void tick(Time::TimeDelta) override;
24 BasicSystem::BasicSystem(Stage &s):
27 declare_dependency<T>(UPDATE);
31 void BasicSystem<T>::tick(Time::TimeDelta dt)
33 stage.iterate_objects<T>([dt](T &obj){ obj.tick(dt); });
36 } // namespace Msp::Game