123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
-
- #ifndef __ActionMANAGER_H__
- #define __ActionMANAGER_H__
- #include "editor-support/cocostudio/CCActionObject.h"
- #include "editor-support/cocostudio/DictionaryHelper.h"
- #include "editor-support/cocostudio/CocosStudioExport.h"
- namespace cocostudio {
-
- class CocoLoader;
- struct stExpCocoNode;
- class CC_STUDIO_DLL ActionManagerEx:public cocos2d::Ref
- {
- public:
-
- ActionManagerEx();
-
- virtual ~ActionManagerEx();
-
- static ActionManagerEx* getInstance();
-
- static void destroyInstance();
-
- ActionObject* getActionByName(const char* jsonName,const char* actionName);
-
- ActionObject* playActionByName(const char* jsonName,const char* actionName);
-
- ActionObject* playActionByName(const char* jsonName,const char* actionName, cocos2d::CallFunc* func);
-
- ActionObject* stopActionByName(const char* jsonName,const char* actionName);
-
- void initWithDictionary(const char* jsonName,const rapidjson::Value &dic, Ref* root, int version = 1600);
- void initWithBinary(const char* file, Ref* root, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode);
-
- void releaseActions();
- int getStudioVersionNumber() const;
- protected:
- std::unordered_map<std::string, cocos2d::Vector<ActionObject*>> _actionDic;
- int _studioVersionNumber;
- };
- }
- #endif
|