diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index b0f9ec53ee..f21f84af8e 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -181,7 +181,8 @@ Widget* GUIReader::widgetFromJsonFile(const char *fileName) { std::string jsonpath; rapidjson::Document jsonDict; - jsonpath = CCFileUtils::getInstance()->fullPathForFilename(fileName); + jsonpath = fileName; +// jsonpath = CCFileUtils::getInstance()->fullPathForFilename(fileName); size_t pos = jsonpath.find_last_of('/'); m_strFilePath = jsonpath.substr(0,pos+1); std::string contentStr = FileUtils::getInstance()->getStringFromFile(jsonpath); diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.h b/cocos/editor-support/cocostudio/CCSGUIReader.h index 999e9435fa..5c794c5e58 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.h +++ b/cocos/editor-support/cocostudio/CCSGUIReader.h @@ -59,13 +59,14 @@ public: */ const cocos2d::Size getFileDesignSize(const char* fileName) const; - const std::string& getFilePath() const { return m_strFilePath; }; + void setFilePath(const std::string& strFilePath) { m_strFilePath = strFilePath; } + const std::string& getFilePath() const { return m_strFilePath; } + void registerTypeAndCallBack(const std::string& classType, cocos2d::ObjectFactory::Instance ins, Ref* object, SEL_ParseEvent callBack); - protected: GUIReader(); ~GUIReader(); diff --git a/cocos/editor-support/cocostudio/TimelineAction/CCFrame.cpp b/cocos/editor-support/cocostudio/TimelineAction/CCFrame.cpp index 285a853aff..9184b7c1f0 100644 --- a/cocos/editor-support/cocostudio/TimelineAction/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/TimelineAction/CCFrame.cpp @@ -116,7 +116,12 @@ void TextureFrame::onEnter(Frame *nextFrame) { if(_sprite) { - _sprite->setTexture(_texture.c_str()); + SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(_texture); + + if(spriteFrame != nullptr) + _sprite->setSpriteFrame(spriteFrame); + else + _sprite->setTexture(_texture); } } diff --git a/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.cpp b/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.cpp index 61a60a02c3..3b186c57b2 100644 --- a/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.cpp +++ b/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.cpp @@ -60,7 +60,7 @@ static const char* ClassName_Widget = "Widget"; static const char* NODE = "nodeTree"; static const char* CHILDREN = "children"; static const char* CLASSNAME = "classname"; -static const char* FILE_PATH = "filePath"; +static const char* FILE_PATH = "fileName"; static const char* PLIST_FILE = "plistFile"; static const char* ACTION_TAG = "actionTag"; @@ -100,6 +100,8 @@ static const char* MUL_MARGIN_TOP = "top"; static const char* MUL_MARGIN_RIGHT = "right"; static const char* MUL_MARGIN_BOTTOM = "bottom"; +static const char* TEXTURES = "textures"; +static const char* TEXTURES_PNG = "texturesPng"; static NodeCache* _sharedNodeCache = nullptr; @@ -119,9 +121,14 @@ void NodeCache::destroyInstance() CC_SAFE_DELETE(_sharedNodeCache); } +NodeCache::NodeCache() + : _recordJsonPath(true) + , _jsonPath("") +{ +} + void NodeCache::purge() { - _nodes.clear(); } void NodeCache::init() @@ -133,7 +140,7 @@ void NodeCache::init() _funcs.insert(Pair(ClassName_Sprite, std::bind(&NodeCache::loadSprite, this, _1))); _funcs.insert(Pair(ClassName_Particle, std::bind(&NodeCache::loadParticle, this, _1))); - _funcs.insert(Pair(ClassName_Panel, std::bind(&NodeCache::loadWidget, this, _1))); + _funcs.insert(Pair(ClassName_Panel, std::bind(&NodeCache::loadWidget, this, _1))); _funcs.insert(Pair(ClassName_Button, std::bind(&NodeCache::loadWidget, this, _1))); _funcs.insert(Pair(ClassName_CheckBox, std::bind(&NodeCache::loadWidget, this, _1))); _funcs.insert(Pair(ClassName_ImageView, std::bind(&NodeCache::loadWidget, this, _1))); @@ -154,14 +161,20 @@ void NodeCache::init() cocos2d::Node* NodeCache::createNode(const std::string& filename) { - cocos2d::Node* node = _nodes.at(filename); - if (node == nullptr) + if(_recordJsonPath) { - node = loadNodeWithFile(filename); + std::string jsonPath = filename.substr(0, filename.find_last_of('/') + 1); + GUIReader::shareReader()->setFilePath(jsonPath); -// if(cache) -// _nodes.insert(filename, node); + _jsonPath = jsonPath; } + else + { + GUIReader::shareReader()->setFilePath(""); + _jsonPath = ""; + } + + cocos2d::Node* node = loadNodeWithFile(filename); return node; } @@ -172,20 +185,34 @@ cocos2d::Node* NodeCache::loadNodeWithFile(const std::string& fileName) std::string fullPath = CCFileUtils::getInstance()->fullPathForFilename(fileName); std::string contentStr = FileUtils::getInstance()->getStringFromFile(fullPath); + cocos2d::Node* node = loadNodeWithContent(contentStr); + // Load animation data from file TimelineActionCache::getInstance()->loadAnimationActionWithContent(fileName, contentStr); - return loadNodeWithContent(contentStr); + return node; } cocos2d::Node* NodeCache::loadNodeWithContent(const std::string& content) { rapidjson::Document doc; doc.Parse<0>(content.c_str()); - if (doc.HasParseError()) { + if (doc.HasParseError()) + { CCLOG("GetParseError %s\n", doc.GetParseError()); } + // decode plist + int length = DICTOOL->getArrayCount_json(doc, TEXTURES); + for(int i=0; igetStringValueFromArray_json(doc, TEXTURES, i); + //std::string png = DICTOOL->getStringValueFromArray_json(doc, TEXTURES_PNG, i); + plist = _jsonPath + plist; + SpriteFrameCache::getInstance()->addSpriteFramesWithFile(plist); + } + + // decode node tree const rapidjson::Value& subJson = DICTOOL->getSubDictionary_json(doc, NODE); return loadNode(subJson); } @@ -209,7 +236,8 @@ cocos2d::Node* NodeCache::loadNode(const rapidjson::Value& json) { const rapidjson::Value &dic = DICTOOL->getSubDictionary_json(json, CHILDREN, i); cocos2d::Node* child = loadNode(dic); - if (child) { + if (child) + { node->addChild(child); } } @@ -310,13 +338,16 @@ Node* NodeCache::loadSprite(const rapidjson::Value& json) if(filePath != nullptr) { - SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(filePath); + std::string path = filePath; + + SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path); if(!spriteFrame) { - sprite = Sprite::create(filePath); + sprite = Sprite::create(path); } else { + path = _jsonPath + path; sprite = Sprite::createWithSpriteFrame(spriteFrame); } diff --git a/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.h b/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.h index be04b85a78..04f1df7411 100644 --- a/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.h +++ b/cocos/editor-support/cocostudio/TimelineAction/CCNodeCache.h @@ -41,6 +41,7 @@ public: static NodeCache* getInstance(); static void destroyInstance(); + NodeCache(); void purge(); void init(); @@ -49,6 +50,13 @@ public: cocos2d::Node* loadNodeWithFile(const std::string& fileName); cocos2d::Node* loadNodeWithContent(const std::string& content); + + void setRecordJsonPath(bool record) { _recordJsonPath = record; } + bool isRecordJsonPath() { return _recordJsonPath; } + + void setJsonPath(std::string jsonPath) { _jsonPath = jsonPath; } + std::string getJsonPath() { return _jsonPath; } + protected: cocos2d::Node* loadNode(const rapidjson::Value& json); @@ -70,9 +78,11 @@ protected: typedef std::pair Pair; std::unordered_map _funcs; - cocos2d::Map _nodes; WidgetPropertiesReader0300* _guiReader; + bool _recordJsonPath; + + std::string _jsonPath; }; } diff --git a/cocos/editor-support/cocostudio/TimelineAction/CCTimelineActionCache.cpp b/cocos/editor-support/cocostudio/TimelineAction/CCTimelineActionCache.cpp index d37a967f8b..773f54a8a3 100644 --- a/cocos/editor-support/cocostudio/TimelineAction/CCTimelineActionCache.cpp +++ b/cocos/editor-support/cocostudio/TimelineAction/CCTimelineActionCache.cpp @@ -25,6 +25,7 @@ THE SOFTWARE. #include "CCTimelineActionCache.h" #include "CCTimelineAction.h" #include "CCFrame.h" +#include "CCNodeCache.h" using namespace cocos2d; @@ -342,8 +343,18 @@ Frame* TimelineActionCache::loadTextureFrame(const rapidjson::Value& json) const char* texture = DICTOOL->getStringValue_json(json, Value); if(texture != NULL) - frame->setTexture(texture); + { + std::string path = texture; + SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path); + if(spriteFrame == nullptr) + { + std::string jsonPath = NodeCache::getInstance()->getJsonPath(); + path = jsonPath + texture; + } + + frame->setTexture(path); + } return frame; } diff --git a/tests/cpp-tests/Classes/AppDelegate.cpp b/tests/cpp-tests/Classes/AppDelegate.cpp index 724a110c20..869ec6687f 100644 --- a/tests/cpp-tests/Classes/AppDelegate.cpp +++ b/tests/cpp-tests/Classes/AppDelegate.cpp @@ -68,26 +68,26 @@ bool AppDelegate::applicationDidFinishLaunching() auto fileUtils = FileUtils::getInstance(); std::vector searchPaths; - if (screenSize.height > 320) - { - auto resourceSize = Size(960, 640); - searchPaths.push_back("hd"); - searchPaths.push_back("ccs-res/hd"); - searchPaths.push_back("ccs-res/hd/scenetest"); - searchPaths.push_back("ccs-res/hd/scenetest/ArmatureComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/AttributeComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/BackgroundComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/EffectComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/LoadSceneEdtiorFileTest"); - searchPaths.push_back("ccs-res/hd/scenetest/ParticleComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/SpriteComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/TmxMapComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/UIComponentTest"); - searchPaths.push_back("ccs-res/hd/scenetest/TriggerTest"); - searchPaths.push_back("ccs-res"); - director->setContentScaleFactor(resourceSize.height/designSize.height); - } - else +// if (screenSize.height > 320) +// { +// auto resourceSize = Size(960, 640); +// searchPaths.push_back("hd"); +// searchPaths.push_back("ccs-res/hd"); +// searchPaths.push_back("ccs-res/hd/scenetest"); +// searchPaths.push_back("ccs-res/hd/scenetest/ArmatureComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/AttributeComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/BackgroundComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/EffectComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/LoadSceneEdtiorFileTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/ParticleComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/SpriteComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/TmxMapComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/UIComponentTest"); +// searchPaths.push_back("ccs-res/hd/scenetest/TriggerTest"); +// searchPaths.push_back("ccs-res"); +// director->setContentScaleFactor(resourceSize.height/designSize.height); +// } +// else { searchPaths.push_back("ccs-res"); searchPaths.push_back("ccs-res/scenetest/ArmatureComponentTest"); diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioTimelineActionTest/TimelineActionTestScene.cpp b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioTimelineActionTest/TimelineActionTestScene.cpp index 9c5fc3bb1c..e7ca42d01a 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioTimelineActionTest/TimelineActionTestScene.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioTimelineActionTest/TimelineActionTestScene.cpp @@ -201,18 +201,16 @@ void TestTimelineAction::onEnter() { TimelineActionTestLayer::onEnter(); - FileUtils::getInstance()->addSearchPath("E:/cocos2d-x/cocos2d-x/tests/cpp-tests/Resources/TimelineAction"); - - for(int i=0; i<1; i++) + for(int i=0; i<100; i++) { - node = NodeCache::getInstance()->createNode("NewUi11123_1.json"); - action = TimelineActionCache::getInstance()->createAction("NewUi11123_1.json"); + node = NodeCache::getInstance()->createNode("TimelineAction/boy_1.ExportJson"); + action = TimelineActionCache::getInstance()->createAction("TimelineAction/boy_1.ExportJson"); node->runAction(action); - action->gotoFrameAndPlay(0); + action->gotoFrameAndPlay(0, 60, true); - //node->setScale(0.4f); - node->setPosition(100+i*5,160); + node->setScale(0.4f); + node->setPosition(-200+i*5,0); addChild(node); } diff --git a/tests/cpp-tests/Resources/TimelineAction/boy0.plist b/tests/cpp-tests/Resources/TimelineAction/boy0.plist new file mode 100644 index 0000000000..d3e2bd8255 --- /dev/null +++ b/tests/cpp-tests/Resources/TimelineAction/boy0.plist @@ -0,0 +1,160 @@ + + + + + frames + + testAnimationResource/6.png + + width + 474 + height + 402 + originalWidth + 474 + originalHeight + 402 + x + 0 + y + 0 + offsetX + 0 + offsetY + 0 + + testAnimationResource/8.png + + width + 135 + height + 180 + originalWidth + 135 + originalHeight + 180 + x + 476 + y + 0 + offsetX + 0 + offsetY + 0 + + testAnimationResource/3.png + + width + 247 + height + 479 + originalWidth + 247 + originalHeight + 479 + x + 613 + y + 0 + offsetX + 0 + offsetY + 0 + + testAnimationResource/5.png + + width + 190 + height + 236 + originalWidth + 190 + originalHeight + 236 + x + 0 + y + 481 + offsetX + 0 + offsetY + 0 + + testAnimationResource/4.png + + width + 141 + height + 110 + originalWidth + 141 + originalHeight + 110 + x + 192 + y + 481 + offsetX + 0 + offsetY + 0 + + testAnimationResource/2.png + + width + 186 + height + 252 + originalWidth + 186 + originalHeight + 252 + x + 335 + y + 481 + offsetX + 0 + offsetY + 0 + + testAnimationResource/7.png + + width + 146 + height + 112 + originalWidth + 146 + originalHeight + 112 + x + 523 + y + 481 + offsetX + 0 + offsetY + 0 + + + metadata + + format + 0 + textureFileName + boy0.png + realTextureFileName + boy0.png + size + {1024,1024} + + texture + + width + 1024 + height + 1024 + + + \ No newline at end of file diff --git a/tests/cpp-tests/Resources/TimelineAction/boy0.png b/tests/cpp-tests/Resources/TimelineAction/boy0.png new file mode 100644 index 0000000000..e5155a7d00 Binary files /dev/null and b/tests/cpp-tests/Resources/TimelineAction/boy0.png differ diff --git a/tests/cpp-tests/Resources/TimelineAction/boy1.plist b/tests/cpp-tests/Resources/TimelineAction/boy1.plist new file mode 100644 index 0000000000..2ef52856fb --- /dev/null +++ b/tests/cpp-tests/Resources/TimelineAction/boy1.plist @@ -0,0 +1,65 @@ + + + + + frames + + testAnimationResource/hat.png + + width + 452 + height + 458 + originalWidth + 452 + originalHeight + 458 + x + 0 + y + 0 + offsetX + 0 + offsetY + 0 + + testAnimationResource/1.png + + width + 201 + height + 320 + originalWidth + 201 + originalHeight + 320 + x + 454 + y + 0 + offsetX + 0 + offsetY + 0 + + + metadata + + format + 0 + textureFileName + boy1.png + realTextureFileName + boy1.png + size + {1024,1024} + + texture + + width + 1024 + height + 1024 + + + \ No newline at end of file diff --git a/tests/cpp-tests/Resources/TimelineAction/boy1.png b/tests/cpp-tests/Resources/TimelineAction/boy1.png new file mode 100644 index 0000000000..e07804e76a Binary files /dev/null and b/tests/cpp-tests/Resources/TimelineAction/boy1.png differ diff --git a/tests/cpp-tests/Resources/TimelineAction/boy_1.ExportJson b/tests/cpp-tests/Resources/TimelineAction/boy_1.ExportJson new file mode 100644 index 0000000000..1aa899dd1e --- /dev/null +++ b/tests/cpp-tests/Resources/TimelineAction/boy_1.ExportJson @@ -0,0 +1,1137 @@ +{ + "version": "1.3.0.1", + "designWidth": 1000, + "designHeight": 1024, + "dataScale": 1.0, + "textures": [ + "boy0.plist", + "boy1.plist" + ], + "texturesPng": [ + "boy0.png", + "boy1.png" + ], + "nodeTree": { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.RootGUISurrogate, EditorCommon", + "scaleX": 1.0, + "scaleY": 1.0, + "visible": true, + "width": 0.0, + "height": 0.0, + "name": "Scene", + "classname": "Node" + }, + "children": [ + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/6.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/6.png", + "plistFile": "" + }, + "x": 601.0, + "y": 260.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 440279615, + "tag": 5, + "anchorPointX": 0.34, + "anchorPointY": 0.07, + "name": "Sprite_4", + "classname": "Sprite" + }, + "children": [ + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/8.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/8.png", + "plistFile": "" + }, + "x": 68.0, + "y": 138.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": -2, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 749769307, + "tag": 3, + "anchorPointX": 0.77, + "anchorPointY": 0.8, + "name": "Sprite_2", + "classname": "Sprite" + }, + "children": [ + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/3.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/3.png", + "plistFile": "" + }, + "x": 18.0, + "y": 21.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 1042971898, + "tag": 8, + "anchorPointX": 0.5, + "anchorPointY": 0.11, + "name": "Sprite_7", + "classname": "Sprite" + }, + "children": [], + "name": null, + "classname": "Sprite" + } + ], + "name": null, + "classname": "Sprite" + }, + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/5.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/5.png", + "plistFile": "" + }, + "x": 145.0, + "y": 33.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": -2, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 718719067, + "tag": 6, + "anchorPointX": 0.7, + "anchorPointY": 0.79, + "name": "Sprite_5", + "classname": "Sprite" + }, + "children": [ + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/4.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/4.png", + "plistFile": "" + }, + "x": 66.0, + "y": 1.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 426784833, + "tag": 7, + "anchorPointX": 0.67, + "anchorPointY": 0.72, + "name": "Sprite_6", + "classname": "Sprite" + }, + "children": [], + "name": null, + "classname": "Sprite" + } + ], + "name": null, + "classname": "Sprite" + }, + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/2.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/2.png", + "plistFile": "" + }, + "x": 200.0, + "y": 27.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 716668964, + "tag": 9, + "anchorPointX": 0.42, + "anchorPointY": 0.75, + "name": "Sprite_8", + "classname": "Sprite" + }, + "children": [ + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/7.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/7.png", + "plistFile": "" + }, + "x": 155.0, + "y": 16.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 453863477, + "tag": 4, + "anchorPointX": 0.5, + "anchorPointY": 0.77, + "name": "Sprite_3", + "classname": "Sprite" + }, + "children": [], + "name": null, + "classname": "Sprite" + } + ], + "name": null, + "classname": "Sprite" + }, + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/hat.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/hat.png", + "plistFile": "" + }, + "x": 134.0, + "y": 308.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 729381978, + "tag": 10, + "anchorPointX": 0.77, + "anchorPointY": 0.25, + "name": "Sprite_9", + "classname": "Sprite" + }, + "children": [], + "name": null, + "classname": "Sprite" + }, + { + "options": { + "$type": "EditorCommon.JsonModel.Component.GUI.SpriteSurrogate, EditorCommon", + "fileName": "testAnimationResource/1.png", + "fileNameData": { + "resourceType": 1, + "path": "testAnimationResource/1.png", + "plistFile": "" + }, + "x": 279.0, + "y": 144.0, + "scaleX": 1.0, + "scaleY": 1.0, + "rotation": 0.0, + "flipX": false, + "flipY": false, + "colorR": 255, + "colorG": 255, + "colorB": 255, + "opacity": 255, + "visible": true, + "ZOrder": 0, + "classType": "Sprite", + "width": 0.0, + "height": 0.0, + "actionTag": 647613269, + "tag": 2, + "anchorPointX": 0.22, + "anchorPointY": 0.86, + "name": "Sprite_1", + "classname": "Sprite" + }, + "children": [], + "name": null, + "classname": "Sprite" + } + ], + "name": null, + "classname": "Sprite" + } + ], + "name": null, + "classname": "Node" + }, + "action": { + "duration": 60, + "speed": 1.0, + "timelines": [ + { + "frameType": "PositionFrame", + "actionTag": 440279615, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 601.0, + "y": 260.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 601.0, + "y": 260.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 601.0, + "y": 260.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 440279615, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 440279615, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.9654804, + "y": 0.9654804, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 749769307, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 68.0, + "y": 138.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 68.0, + "y": 138.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 68.0, + "y": 138.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 749769307, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 749769307, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 3.0, + "y": 3.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ZOrderFrame", + "actionTag": 749769307, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLineIntFrameSurrogate, EditorCommon", + "value": -2, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLineIntFrameSurrogate, EditorCommon", + "value": -2, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLineIntFrameSurrogate, EditorCommon", + "value": -2, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 1042971898, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 18.0, + "y": 21.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 18.0, + "y": 21.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 18.0, + "y": 21.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 1042971898, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 1042971898, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 718719067, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 145.0, + "y": 33.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 145.0, + "y": 33.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 145.0, + "y": 33.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 718719067, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 718719067, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 6.43459034, + "y": 6.43459034, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ZOrderFrame", + "actionTag": 718719067, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLineIntFrameSurrogate, EditorCommon", + "value": -2, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLineIntFrameSurrogate, EditorCommon", + "value": -2, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 426784833, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 66.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 66.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 66.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 426784833, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 426784833, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": -7.849513, + "y": -7.849513, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 716668964, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 200.0, + "y": 27.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 200.0, + "y": 27.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 200.0, + "y": 27.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 716668964, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 716668964, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 5.65789843, + "y": 5.65789843, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 453863477, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 155.0, + "y": 16.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 155.0, + "y": 16.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 155.0, + "y": 16.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 453863477, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 453863477, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": -14.9207821, + "y": -14.9207821, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 729381978, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 134.0, + "y": 308.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 134.0, + "y": 308.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 134.0, + "y": 308.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 729381978, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 729381978, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "PositionFrame", + "actionTag": 647613269, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 279.0, + "y": 144.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 279.0, + "y": 144.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 279.0, + "y": 144.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "ScaleFrame", + "actionTag": 647613269, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 1.0, + "y": 1.0, + "frameIndex": 60, + "tween": true + } + ] + }, + { + "frameType": "RotationSkewFrame", + "actionTag": 647613269, + "frames": [ + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 0, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 8.991114, + "y": 8.991114, + "frameIndex": 30, + "tween": true + }, + { + "$type": "EditorCommon.JsonModel.Animation.TimeLinePointFrameSurrogate, EditorCommon", + "x": 0.0, + "y": 0.0, + "frameIndex": 60, + "tween": true + } + ] + } + ] + }, + "name": null, + "classname": null +} \ No newline at end of file