add objectdecoderdelegate for objectdecoder

This commit is contained in:
Chloe 2024-07-25 06:58:44 -07:00 committed by GitHub
parent 4266a82a56
commit 509c5e7e93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,18 +3,26 @@
#include "../../include/cocos2d.h"
// @note RobTop Addition
class CC_DLL ObjectDecoderDelegate {
virtual cocos2d::CCObject* getDecodedObject(int, DS_Dictionary*) { return nullptr; }
};
// @note RobTop Addition
class CC_DLL ObjectDecoder : public cocos2d::CCNode {
public:
ObjectDecoder();
~ObjectDecoder() {}
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(ObjectDecoder)
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(ObjectDecoder)
static ObjectDecoder* sharedDecoder();
cocos2d::CCObject* getDecodedObject(int, DS_Dictionary*);
virtual bool init();
public:
ObjectDecoderDelegate* m_delegate;
};
#endif