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