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