我已经为我的游戏创建了一个UI。从cocostudio发布项目后,我得到了.csb文件。如何在我的游戏中使用它?
发布于 2014-11-15 21:36:19
Add the header file#include"cocostudio.h“
Node* node = CSLoader::createNode("background.csb");
this->addChild(node);
//get animation data
cocostudio::timeline::ActionTimeline* action = CSLoader::createTimeline("background.csb");
node->runAction(action);
action->gotoFrameAndPlay(0, true);这会对你有帮助的
发布于 2014-11-18 04:44:51
js示例:
var node = ccs.csLoader.createNode("res/node.csb");
var node_action = ccs.actionTimelineCache.createAction("res/node.csb");
node.runAction(node_action);
node.attr({
scale: 0.6,
x: 130,
y: 10,
})
node_action.gotoFrameAndPlay(0, 40, true);
this.addChild(node); https://stackoverflow.com/questions/26892463
复制相似问题