[AndEngine] Reusable MoveModifier

来源:互联网 发布:淘宝首页前端源代码 编辑:程序博客网 时间:2024/05/18 08:44
Hello forums,

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:

  1. public void fireTo(float x, float y)
  2. {
  3.    MoveModifier mm = new MoveModifier(1.0f, 100, x, 100, y);
  4.    registerEntityModifier(mm);
  5. }

http://www.andengine.org/forums/tutorials/code-snippet-reusable-movemodifier-t8291.html
原创粉丝点击