private void notifyPadEvent(int playerIndex, PadEvent.PadButtonCommand padCode, IvyEvent.PadButtonAction state) { bool newState; if (state == IvyEvent.PadButtonAction.DOWN_STATE) { newState = true; } else if (state == IvyEvent.PadButtonAction.UP_STATE) { newState = false; } else { newState = isDownForPlayer[playerIndex][(int)padCode]; } isDownForPlayer[playerIndex][(int)padCode] = newState; PadEvent pe = new PadEvent(playerIndex, padCode, state); Thread t = new Thread(new ThreadStart(delegate() { onPadEvent(pe); })); t.Start(); //TODO : lancer le thread qui va appeler la fonction event }
public abstract bool onPadEvent(PadEvent pe);