Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance 电晕SDK性能。动画或精灵表_Performance_Sprite_Coronasdk - Fatal编程技术网

Performance 电晕SDK性能。动画或精灵表

Performance 电晕SDK性能。动画或精灵表,performance,sprite,coronasdk,Performance,Sprite,Coronasdk,一般问题是,在enterFrame或sprite工作表上使用运行时事件侦听器可以获得更好的性能。因此,基本上我拥有的是: local function animate(e) star.rotation = star.rotation +3; end Runtime:addEventListener ("enterFrame", animate); return star; 这会比拥有一个自动循环的sprite表获得更好的性能吗。两者基本上都会无限期地循环(或者直到某个动作发生)。这实际

一般问题是,在enterFrame或sprite工作表上使用运行时事件侦听器可以获得更好的性能。因此,基本上我拥有的是:

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

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

这实际上是一种权衡。您的精灵将占用更多内存,但翻转帧可能比计算新角度和旋转图像更快。但这将是一个非常微小的区别