单独创建Sprite 看起来没有问题,但使用下面的方法看起来就有阴影,使用3.10版本相同的代码测试没有问题,希望能提供解决方案。
function display.newAnimation(frames,delay)
local animation=cc.Animation:create()
animation:setDelayPerUnit(delay)
table.sort(frames)
for i=1,#frames do
animation:addSpriteFrameWithFile(frames[i])
end
local animate=cc.Animate:create(animation)
return animate
end
下面是测试使用的图片test.zip (167.2 KB)