--用plist制作动画 function Global_createAnimate(plistSource,imageName,imageNum,dt) cc.SpriteFrameCache:getInstance():addSpriteFrames(plistSource) local array={} for i=1,imageNum do --加载资源路径 local spFrame=cc.SpriteFrameCache:getInstance():getSpriteFrame(imageName..i..".png") array[i]=spFrame end local animation = cc.Animation:createWithSpriteFrames(array,dt) local animate = cc.Animate:create(animation) return animate end