diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Core/Callbacks/PlayerLoopCallbacks.h |
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; |