
1.使用plist + png方式加载资源图,参数只需要plist路径
cc.SpriteFrameCache:getInstance()::addSpriteFrames("res/yk/china/loading.plist")
2.使用plist + prv.ccz方式加载资源图,参数需要plist路径和ccz的路径
cc.SpriteFrameCache:getInstance()::addSpriteFrames("res/yk/china/loading.plist", "res/yk/china/loading.pvr.ccz");
代码举例:
cc.SpriteFrameCache:getInstance()::addSpriteFrames("res/yk/china/loading.plist")
--cc.SpriteFrameCache:getInstance()::addSpriteFrames("res/yk/china/loading.plist", "res/yk/china/loading.pvr.ccz");
local Layer = cc.CSLoader:createNode("res/loading.csb") --cocoStudio做的UI工程
local Action = cc.CSLoader:createTimeline("res/loading.csb") --序列帧动画
Layer:runAction(Action)
--Action:setTimeSpeed(10/60)
Action:gotoFrameAndPlay(0, true)
xxx:addChild(Layer, 1)