cocos2d-x
3.3
|
#include <CSLoader.h>
Public Member Functions | |
CSLoader () | |
void | purge () |
void | init () |
cocos2d::Node * | createNodeFromJson (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 |
cocos2d::Node * | createNodeWithFlatBuffersFile (const std::string &filename) |
cocos2d::Node * | nodeWithFlatBuffersFile (const std::string &fileName) |
cocos2d::Node * | nodeWithFlatBuffers (const flatbuffers::NodeTree *nodetree) |
bool | bindCallback (const std::string &callbackName, const std::string &callbackType, cocos2d::ui::Widget *sender, cocos2d::Node *handler) |
void | registReaderObject (const std::string &className, ObjectFactory::Instance ins) |
cocos2d::Node * | createNodeWithFlatBuffersForSimulator (const std::string &filename) |
cocos2d::Node * | nodeWithFlatBuffersForSimulator (const flatbuffers::NodeTree *nodetree) |
Static Public Member Functions | |
static CSLoader * | getInstance () |
static void | destroyInstance () |
static cocos2d::Node * | createNode (const std::string &filename) |
static cocostudio::timeline::ActionTimeline * | createTimeline (const std::string &filename) |
Protected Types | |
typedef std::function < cocos2d::Node *(const rapidjson::Value &json)> | NodeCreateFunc |
typedef std::pair< std::string, NodeCreateFunc > | Pair |
typedef std::function < cocos2d::Component *(const rapidjson::Value &json)> | ComponentCreateFunc |
typedef std::pair< std::string, ComponentCreateFunc > | ComponentPair |
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 * | loadTMXTiledMap (const rapidjson::Value &json) |
cocos2d::Node * | loadWidget (const rapidjson::Value &json) |
cocos2d::Component * | loadComponent (const rapidjson::Value &json) |
cocos2d::Component * | loadComAudio (const rapidjson::Value &json) |
bool | isWidget (const std::string &type) |
bool | isCustomWidget (const std::string &type) |
std::string | getGUIClassName (const std::string &name) |
std::string | getWidgetReaderClassName (cocos2d::ui::Widget *widget) |
Protected Attributes | |
std::unordered_map < std::string, NodeCreateFunc > | _funcs |
std::unordered_map < std::string, ComponentCreateFunc > | _componentFuncs |
bool | _recordJsonPath |
std::string | _jsonPath |
std::string | _monoCocos2dxVersion |
Node * | _rootNode |
|
protected |
|
protected |
|
protected |
|
protected |
CSLoader | ( | ) |
bool bindCallback | ( | const std::string & | callbackName, |
const std::string & | callbackType, | ||
cocos2d::ui::Widget * | sender, | ||
cocos2d::Node * | handler | ||
) |
|
static |
cocos2d::Node* createNodeFromJson | ( | const std::string & | filename | ) |
cocos2d::Node* createNodeWithFlatBuffersFile | ( | const std::string & | filename | ) |
cocos2d::Node* createNodeWithFlatBuffersForSimulator | ( | const std::string & | filename | ) |
|
static |
|
static |
|
protected |
|
static |
|
inline |
|
protected |
void init | ( | ) |
|
protected |
|
protected |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
cocos2d::Node* loadNodeWithContent | ( | const std::string & | content | ) |
cocos2d::Node* loadNodeWithFile | ( | const std::string & | fileName | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
cocos2d::Node* nodeWithFlatBuffers | ( | const flatbuffers::NodeTree * | nodetree | ) |
cocos2d::Node* nodeWithFlatBuffersFile | ( | const std::string & | fileName | ) |
cocos2d::Node* nodeWithFlatBuffersForSimulator | ( | const flatbuffers::NodeTree * | nodetree | ) |
void purge | ( | ) |
void registReaderObject | ( | const std::string & | className, |
ObjectFactory::Instance | ins | ||
) |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |