核心代码如下:
auto UI = cocostudio::GUIReader::getInstance()->widgetFromJsonFile("MyUi_1.json");
this->addChild(UI);
ActionManagerEx::getInstance()->playActionByName("MyUi_1.json","Animation0");
搞了一天快累死了,下次有空再详细编辑。
原文链接:https://www.f2er.com/cocos2dx/346285.html