cocos2d-x
3.3
|
#include <CCNodeReader.h>
Public Member Functions | |
NodeReader () | |
void | purge () |
void | init () |
cocos2d::Node * | createNode (const std::string &filename) |
cocos2d::Node * | loadNodeWithFile (const std::string &fileName) |
cocos2d::Node * | loadNodeWithContent (const std::string &content) |
void | setRecordJsonPath (bool record) |
bool | isRecordJsonPath () const |
void | setJsonPath (std::string jsonPath) |
std::string | getJsonPath () const |
Static Public Member Functions | |
static NodeReader * | getInstance () |
static void | destroyInstance () |
Protected Types | |
typedef std::function < cocos2d::Node *(const rapidjson::Value &json)> | NodeCreateFunc |
typedef std::pair< std::string, NodeCreateFunc > | Pair |
Protected Member Functions | |
cocos2d::Node * | loadNode (const rapidjson::Value &json) |
void | locateNodeWithMulresPosition (cocos2d::Node *node, const rapidjson::Value &json) |
void | initNode (cocos2d::Node *node, const rapidjson::Value &json) |
cocos2d::Node * | loadSimpleNode (const rapidjson::Value &json) |
cocos2d::Node * | loadSubGraph (const rapidjson::Value &json) |
cocos2d::Node * | loadSprite (const rapidjson::Value &json) |
cocos2d::Node * | loadParticle (const rapidjson::Value &json) |
cocos2d::Node * | loadWidget (const rapidjson::Value &json) |
Protected Attributes | |
std::unordered_map < std::string, NodeCreateFunc > | _funcs |
bool | _recordJsonPath |
std::string | _jsonPath |
|
protected |
|
protected |
NodeReader | ( | ) |
cocos2d::Node* createNode | ( | const std::string & | filename | ) |
|
static |
|
static |
|
inline |
void init | ( | ) |
|
protected |
|
inline |
|
protected |
cocos2d::Node* loadNodeWithContent | ( | const std::string & | content | ) |
cocos2d::Node* loadNodeWithFile | ( | const std::string & | fileName | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void purge | ( | ) |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |