Cocos2dx 3.8 ui资源读取

由cocostudio 导出的资源文件 和者是发布到vs工程文件的读取方式有点区别


//Node* node = CSLoader::getInstance()->createNodeWithFlatBuffersForSimulator("res/MainScene.csd");
	//ActionTimeline* action = cocostudio::timeline::ActionTimelineCache::getInstance()->createActionWithFlatBuffersForSimulator("res/MainScene.csd");
	Node* node = CSLoader::createNode("res/texi_ani.csb");
	ActionTimeline* action = CSLoader::createTimeline("res/texi_ani.csb");
	node->setPosition(ccp(0, 0));
	action->gotoFrameAndPlay(0);
	node->runAction(action);
	addChild(node);


展开阅读全文

没有更多推荐了,返回首页