在我的应用程序中,我试图让粒子从可能的多个触摸位置发出。
我有一个用于存储点和相关计时器的类:
private static class Touch
{
public Timer timer = new Timer();
public vec position = new vec();
}
在onTouchEvent内部,在MotionEvent.ACTION_POINTER_DOWN I实例新的Touch的情况下:
Touch t = new Touch();
t.position = new vec(event.getX(id), event.getY(id));
t.ti