Hi,
I'm working all afternoon (European timings ;) on a problem with event listeners. I use an API, for recognising Wii mote events, but I think the principle will still be the same.
This is the relevant code for the app
...
public AppBegin(){
Wiimote[] wiimote = WiiUseApiManager.getWiimotes(1, true);
wiimote[0].addWiiMoteEventListeners(new MyClass());
}
...
Now I also have a class called MyClass, which is the event listener. Basicl:
public class MyClass implements WiimoteListener{
...
public void onAction(){
// here something happens.
}
...
public static void main(){
stuff
}
}
I want that when something happens (See comment) the eventListener gives this information to the main class. How can this be done?
Thanks!
Jan