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
17 BasicSystem(Stage &s): System(s) { }
19 void tick(Time::TimeDelta) override;
23 void BasicSystem<T>::tick(Time::TimeDelta dt)
25 stage.iterate_objects<T>([dt](T &obj){ obj.tick(dt); });
28 } // namespace Msp::Game