I am trying to learn how to use Cocostudio’s UI editor.
I made an animation to test on cocos2x 2.2.3, but I can’t quite figure out how to make it work. Here’s the code:
m_pUILayer = UILayer::create(); m_pUILayer->scheduleUpdate(); addChild(m_pUILayer); Layout* m_pLayout = dynamic_cast<Layout*>(GUIReader::shareReader()->widgetFromJsonFile("mainMenu/mainMenu.ExportJson")); m_pUILayer->addWidget(m_pLayout); ActionManager::shareManager()->playActionByName("mainMenu/mainMenu.ExportJson","test");
The UI shows up in game, so the .ExportJson is being read correctly, but the animation doesn’t play no matter what I do. How should I call the animation?
Thanks in advance!