cocos-enhance-kit/cocos2d-x/external/sources/Box2D/b2ObjectDestroyNotifier.cpp

17 lines
409 B
C++
Raw Normal View History

2022-06-25 11:52:00 +08:00
#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);
}
}