mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-01-15 15:31:08 +00:00
17 lines
409 B
C++
17 lines
409 B
C++
#include "b2ObjectDestroyNotifier.h"
|
|
|
|
static b2ObjectDestroyNotifer __objectDestroyNotifier = nullptr;
|
|
|
|
void b2SetObjectDestroyNotifier(b2ObjectDestroyNotifer notifier)
|
|
{
|
|
__objectDestroyNotifier = notifier;
|
|
}
|
|
|
|
void b2NotifyObjectDestroyed(void* obj, b2ObjectType type, const char* typeName)
|
|
{
|
|
if (__objectDestroyNotifier != nullptr)
|
|
{
|
|
__objectDestroyNotifier(obj, type, typeName);
|
|
}
|
|
}
|