在LIBGDX中访问碰撞检测的最快方法 - 静态更好吗?

时间:2015-03-27 17:14:01

标签: java performance libgdx scene2d

我每帧都进行了大量的碰撞检测,我使用了LIBGDX的com.badlogic.gdx.math.Intersector类。如果我将包导入为静态并以这种方式访问​​它,我会获得任何显着的时间性能(更高的FPS)吗?

import static com.badlogic.gdx.math.Intersector.*;
... 
if(overlaps(circle, rectangle) { ... }

或者,通过简单地直接访问每个类,每次调用它都没有任何区别?

import static com.badlogic.gdx.math.Intersector;
... 
if(Intersector.overlaps(circle, rectangle) { ... }

0 个答案:

没有答案