28 this->
template Call<Func>(world, entity, dt);
31 if constexpr (!std::is_invocable_v<Func, World&, Entity, double> &&
32 !std::is_invocable_v<Func, World&, Entity>) {
33 this->
template Call<Func>(world, Entity{}, dt);
52 void Call(
World& world, Entity entity,
double dt) {
53 if constexpr (std::is_invocable_v<F, World&, Entity, double>) {
54 std::invoke(func, world, entity, dt);
55 }
else if constexpr (std::is_invocable_v<F, World&, Entity>) {
56 std::invoke(func, world, entity);
57 }
else if constexpr (std::is_invocable_v<F, World&, double>) {
58 std::invoke(func, world, dt);
59 }
else if constexpr (std::is_invocable_v<F, World&>) {
60 std::invoke(func, world);
62 static_assert(always_false<F>::value,
"SystemFunction callable signature not supported");
67 struct always_false : std::false_type {};
void Update(World &world, double dt) override
Iterates through all entities associated with system, and call it.
Definition system_function.hpp:25