#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 * | createNodeFromProtocolBuffers (const std::string &filename) |
local | createNodeFromProtocolBuffers ( local filename) |
cocos2d::Node * | nodeFromProtocolBuffersFile (const std::string &fileName) |
local | nodeFromProtocolBuffersFile ( local fileName) |
cocos2d::Node * | nodeFromProtocolBuffers (const protocolbuffers::NodeTree &nodetree) |
void | setRecordProtocolBuffersPath (bool record) |
bool | isRecordProtocolBuffersPath () const |
void | setProtocolBuffersPath (std::string protocolBuffersPath) |
std::string | getProtocolBuffersPath () const |
cocos2d::Node * | createNodeFromXML (const std::string &filename) |
local | createNodeFromXML ( local filename) |
cocos2d::Node * | nodeFromXMLFile (const std::string &fileName) |
var | nodeFromXMLFile ( var fileName) |
local | nodeFromXMLFile ( local fileName) |
cocos2d::Node * | nodeFromXML (const tinyxml2::XMLElement *objectData, const std::string &classType) |
local | nodeFromXML ( local objectData, local classType) |
void | setRecordXMLPath (bool record) |
var | setRecordXMLPath ( var record) |
local | setRecordXMLPath ( local record) |
bool | isRecordXMLPath () const |
void | setXMLPath (std::string xmlPath) |
std::string | getXMLPath () const |
var | getXMLPath () |
local | getXMLPath () |
Static Public Member Functions | |
static CSLoader * | 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) |
local | loadNode ( local 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) |
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) |
void | setPropsForNodeFromProtocolBuffers (cocos2d::Node *node, const protocolbuffers::WidgetOptions &nodeOptions) |
void | setPropsForSingleNodeFromProtocolBuffers (cocos2d::Node *node, const protocolbuffers::WidgetOptions &nodeOptions) |
void | setPropsForSpriteFromProtocolBuffers (cocos2d::Node *node, const protocolbuffers::SpriteOptions &spriteOptions, const protocolbuffers::WidgetOptions &nodeOptions) |
cocos2d::Node * | createParticleFromProtocolBuffers (const protocolbuffers::ParticleSystemOptions &particleSystemOptions, const protocolbuffers::WidgetOptions &nodeOptions) |
cocos2d::Node * | createTMXTiledMapFromProtocolBuffers (const protocolbuffers::TMXTiledMapOptions &tmxTiledMapOptions, const protocolbuffers::WidgetOptions &nodeOptions) |
var | createTMXTiledMapFromProtocolBuffers ( var tmxTiledMapOptions, var nodeOptions) |
local | createTMXTiledMapFromProtocolBuffers ( local tmxTiledMapOptions, local nodeOptions) |
void | setPropsForProjectNodeFromProtocolBuffers (cocos2d::Node *node, const protocolbuffers::ProjectNodeOptions &projectNodeOptions, const protocolbuffers::WidgetOptions &nodeOptions) |
void | setPropsForSimpleAudioFromProtocolBuffers (cocos2d::Node *node, const protocolbuffers::WidgetOptions &nodeOptions) |
cocos2d::Component * | createComponentFromProtocolBuffers (const protocolbuffers::ComponentOptions &componentOptions) |
local | createComponentFromProtocolBuffers ( local componentOptions) |
void | setPropsForComponentFromProtocolBuffers (cocos2d::Component *component, const protocolbuffers::ComponentOptions &componentOptions) |
void | setPropsForComAudioFromProtocolBuffers (cocos2d::Component *component, const protocolbuffers::ComAudioOptions &comAudioOptions) |
void | setPropsForNodeFromXML (cocos2d::Node *node, const tinyxml2::XMLElement *nodeObjectData) |
void | setPropsForSingleNodeFromXML (cocos2d::Node *node, const tinyxml2::XMLElement *nodeObjectData) |
void | setPropsForSpriteFromXML (cocos2d::Node *node, const tinyxml2::XMLElement *spriteObjectData) |
cocos2d::Node * | createParticleFromXML (const tinyxml2::XMLElement *particleObjectData) |
cocos2d::Node * | createTMXTiledMapFromXML (const tinyxml2::XMLElement *tmxTiledMapObjectData) |
var | createTMXTiledMapFromXML ( var tmxTiledMapObjectData) |
local | createTMXTiledMapFromXML ( local tmxTiledMapObjectData) |
void | setPropsForProjectNodeFromXML (cocos2d::Node *node, const tinyxml2::XMLElement *projectNodeObjectData) |
void | setPropsForSimpleAudioFromXML (cocos2d::Node *node, const tinyxml2::XMLElement *simpleAudioObjectData) |
cocos2d::Component * | createComponentFromXML (const tinyxml2::XMLElement *componentObjectData, const std::string &componentType) |
var | createComponentFromXML ( var componentObjectData, var componentType) |
local | createComponentFromXML ( local componentObjectData, local componentType) |
void | setPropsForComponentFromXML (cocos2d::Component *component, const tinyxml2::XMLElement *componentObjectData) |
void | setPropsForComAudioFromXML (cocos2d::Component *component, const tinyxml2::XMLElement *comAudioObjectData) |
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 |
bool | _recordProtocolBuffersPath |
std::string | _protocolBuffersPath |
var | _protocolBuffersPath |
local | _protocolBuffersPath |
bool | _recordXMLPath |
std::string | _xmlPath |
std::string | _monoCocos2dxVersion |
var | _monoCocos2dxVersion |
local | _monoCocos2dxVersion |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
CSLoader | ( | ) |
var CSLoader | ( | ) |
local CSLoader | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
cocos2d::Node* createNodeFromJson | ( | const std::string & | filename | ) |
var createNodeFromJson | ( | var | filename | ) |
local createNodeFromJson | ( | local | filename | ) |
cocos2d::Node* createNodeFromProtocolBuffers |
( | const std::string & | filename | ) |
var createNodeFromProtocolBuffers | ( | var | filename | ) |
local createNodeFromProtocolBuffers | ( | local | filename | ) |
cocos2d::Node* createNodeFromXML | ( | const std::string & | filename | ) |
var createNodeFromXML | ( | var | filename | ) |
local createNodeFromXML | ( | local | filename | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
void init | ( | ) |
var init | ( | ) |
local init | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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* nodeFromProtocolBuffers |
( | const protocolbuffers::NodeTree & | nodetree | ) |
var nodeFromProtocolBuffers | ( | var | nodetree | ) |
local nodeFromProtocolBuffers | ( | local | nodetree | ) |
cocos2d::Node* nodeFromProtocolBuffersFile |
( | const std::string & | fileName | ) |
var nodeFromProtocolBuffersFile | ( | var | fileName | ) |
local nodeFromProtocolBuffersFile | ( | local | fileName | ) |
cocos2d::Node* nodeFromXML | ( | const tinyxml2::XMLElement * | objectData, |
const std::string & | classType | ||
) |
var nodeFromXML | ( | var | objectData, |
var | classType | ||
) |
local nodeFromXML | ( | local | objectData, |
local | classType | ||
) |
cocos2d::Node* nodeFromXMLFile | ( | const std::string & | fileName | ) |
var nodeFromXMLFile | ( | var | fileName | ) |
local nodeFromXMLFile | ( | local | fileName | ) |
void purge | ( | ) |
var purge | ( | ) |
local purge | ( | ) |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |