Cocos2dx 3.8 ui资源读取

前端之家收集整理的这篇文章主要介绍了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);
原文链接:https://www.f2er.com/cocos2dx/340686.html

猜你在找的Cocos2d-x相关文章