2024-07-24 08:00:54 -04:00
|
|
|
#ifndef __OBJECTDECODER_H__
|
|
|
|
#define __OBJECTDECODER_H__
|
|
|
|
|
|
|
|
#include "../../include/cocos2d.h"
|
|
|
|
|
2024-07-25 09:58:44 -04:00
|
|
|
// @note RobTop Addition
|
|
|
|
class CC_DLL ObjectDecoderDelegate {
|
2024-07-25 10:13:26 -04:00
|
|
|
public:
|
2024-07-25 20:11:37 -04:00
|
|
|
virtual cocos2d::CCObject* getDecodedObject(int objectType, DS_Dictionary* data) { return nullptr; }
|
2024-07-25 09:58:44 -04:00
|
|
|
};
|
|
|
|
|
2024-07-24 08:00:54 -04:00
|
|
|
// @note RobTop Addition
|
2024-07-24 09:48:33 -04:00
|
|
|
class CC_DLL ObjectDecoder : public cocos2d::CCNode {
|
2024-07-24 08:00:54 -04:00
|
|
|
public:
|
|
|
|
ObjectDecoder();
|
|
|
|
~ObjectDecoder() {}
|
2024-07-25 09:58:44 -04:00
|
|
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(ObjectDecoder)
|
2024-07-24 08:00:54 -04:00
|
|
|
|
|
|
|
static ObjectDecoder* sharedDecoder();
|
|
|
|
|
|
|
|
cocos2d::CCObject* getDecodedObject(int, DS_Dictionary*);
|
|
|
|
|
|
|
|
virtual bool init();
|
2024-07-25 09:58:44 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
ObjectDecoderDelegate* m_delegate;
|
2024-07-24 08:00:54 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|