Hello forums,
to prevent the java garbage collector kicking in, it is common sense to avoid object allocation during runtime.
http://www.andengine.org/forums/tutorials/code-snippet-reusable-movemodifier-t8291.html
to prevent the java garbage collector kicking in, it is common sense to avoid object allocation during runtime.
However, during your AndEngine adventures, you may have seen something like this:
-
publicvoidfireTo(floatx,floaty)
-
{
-
MoveModifier mm=newMoveModifier(1.0f, 100, x, 100, y);
-
registerEntityModifier(mm);
-
}
http://www.andengine.org/forums/tutorials/code-snippet-reusable-movemodifier-t8291.html
本文探讨了在Java运行时避免对象分配以防止垃圾回收机制启动的方法。通过一个AndEngine游戏开发实例,展示了如何创建可复用的对象以提高性能。
132

被折叠的 条评论
为什么被折叠?



