31 #include "Utilities/ECS/Component.h" 32 #include "Utilities/STL/MxFunction.h" 42 using TimeDelta = float;
45 UpdateCallbackType UpdateCallback;
52 this->SetUpdate(std::forward<T>(customBehaviour));
56 void SetUpdate(T&& customBehaviour)
58 static_assert(!std::is_reference_v<T>,
"passing reference to object as callback is prohibited");
59 this->UpdateCallback = [
object = std::move(customBehaviour)](
MxObject&
self, TimeDelta dt)
mutable {
object.OnUpdate(
self, dt); };
62 void InvokeUpdate(TimeDelta dt);
Definition: Behaviour.h:38
Definition: MxObject.h:40
Definition: MxFunction.h:36
Definition: Application.cpp:49