Hi. I’m trying to loading a .csb file via Director::getInstance()->pushScene(MyScene::createScene());. The scene loads but the timeline doesn’t play. I’ve tried everything except the thing that works. The csb type is a Node with 30 frames of animation. I’m completely stumped. Here is one of the many things I’ve tried.
// on "init" you need to initialize your instance
bool RollUp_5InARow::init()
{
//////////////////////////////
// 1. super init first
if ( !Layer::init() )
{
return false;
}
auto rootNode = CSLoader::createNode("Machines/RollUps/RollUp_5InARow.csb");
auto action = dynamic_cast<cocostudio::timeline::ActionTimeline*>(rootNode->getActionByTag(rootNode->getTag()));
action->gotoFrameAndPlay(0);
rootNode->runAction(action);
this->addChild(rootNode);
return true;
}