Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
哪个更适合 blitting - 在 scrollRect 中重新定位精灵表或使用 copyPixels()?
不做任何测试我会回答copyPixels。
在第一种情况下,您有 2 个对象:一个可能非常大的精灵表和另一个可能非常复杂的对象,其中涉及到掩蔽过程。你失去了对 blitting 的所有兴趣。
在第二种解决方案中,您有一个非常低级的操作(复制像素)和一个显示对象(位图)。spritesheet 甚至没有加载到显示器中,这是迄今为止我拙见的最轻的解决方案。