private void notifyTouchEvent(int playerIndex, int x, int y, int scrWidth, int scrHeight, int state) { int newX, newY; newX = (int)((x * screenWidth) / (1.0 * scrHeight)); newY = (int)((y * screenWidth) / (1.0 * scrHeight)); TouchEvent te = new TouchEvent(playerIndex, newX, newY, state); Thread t = new Thread(new ThreadStart(delegate() { onTouchEvent(te); })); t.Start(); //TODO : lancer le thread qui va appeler la fonction event }
public abstract bool onTouchEvent(TouchEvent te);