25 template<FrameLogicCallable Func>
28 m_func{std::forward<Func>(func)}
33 template<FrameLogicCallable Func>
36 m_func = std::forward<Func>(func);
41 if(m_func) m_func(ParentEntity(), world, dt);
45 FrameLogicCallable_t m_func;
std::move_only_function< void(Entity self, ecs::Ecs world, float dt)> FrameLogicCallable_t
FrameLogic callable member type.
Definition: FrameLogic.h:15
Optional base class for components.
Definition: Component.h:27
Identifies an object in the registry.
Definition: Entity.h:18
Component that runs a custom callable during each logic phase.
Definition: FrameLogic.h:23
void SetFunction(Func &&func)
Set a new callable.
Definition: FrameLogic.h:34
Interface for higher-level entity and component operations with optional type access restriction.
Definition: Ecs.h:18
FrameLogic callable type requirements.
Definition: FrameLogic.h:19