0

一般 Corona SDK 问题,在 enterFrame 或精灵表上使用运行时事件侦听器会获得更好的性能。所以基本上我所拥有的是:

local function animate(e)
    star.rotation = star.rotation +3;
end
Runtime:addEventListener ("enterFrame", animate);
return star;

这会比拥有一个具有循环自动化功能的精灵表获得更好的性能吗?两者基本上都无限期地循环(或直到发生动作)。

4

1 回答 1

0

It's really a trade off. Your sprite is going to take up more memory, but it's probably faster to flip frames than it is to calculate the new angle and rotate the image. But it's going to be a pretty trivial difference.

于 2013-10-14T00:50:03.090 回答