diff options
Diffstat (limited to 'Runtime/Core/Callbacks/PlayerLoopCallbacks.h')
-rw-r--r-- | Runtime/Core/Callbacks/PlayerLoopCallbacks.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Runtime/Core/Callbacks/PlayerLoopCallbacks.h b/Runtime/Core/Callbacks/PlayerLoopCallbacks.h new file mode 100644 index 0000000..49dd86e --- /dev/null +++ b/Runtime/Core/Callbacks/PlayerLoopCallbacks.h @@ -0,0 +1,39 @@ +#pragma once + +#include "Runtime/Modules/ExportModules.h" + +struct PlayerLookCallbacks +{ + typedef void UpdateFunc (); + + PlayerLookCallbacks (); + + // Animators + UpdateFunc* AnimatorFixedUpdateRetargetIKWrite; + UpdateFunc* AnimatorUpdateRetargetIKWrite; + UpdateFunc* AnimatorUpdateFKMove; + UpdateFunc* AnimatorFixedUpdateFKMove; + + // Physics + UpdateFunc* PhysicsFixedUpdate; + UpdateFunc* PhysicsUpdate; + UpdateFunc* PhysicsRefreshWhenPaused; + UpdateFunc* PhysicsSkinnedClothUpdate; + UpdateFunc* PhysicsResetInterpolatedTransformPosition; + + // 2D Physics + UpdateFunc* Physics2DUpdate; + UpdateFunc* Physics2DFixedUpdate; + UpdateFunc* Physics2DResetInterpolatedTransformPosition; + + // Navmesh + UpdateFunc* NavMeshUpdate; + + // Legacy Animation + UpdateFunc* LegacyFixedAnimationUpdate; + UpdateFunc* LegacyAnimationUpdate; +}; +EXPORT_COREMODULE extern PlayerLookCallbacks gPlayerLoopCallbacks; + +#define CALL_UPDATE_MODULAR(x) if (gPlayerLoopCallbacks.x) gPlayerLoopCallbacks.x (); +#define REGISTER_PLAYERLOOP_CALL(name,body) struct name { static void Forward () { body; } }; gPlayerLoopCallbacks.name = name::Forward; |