git-svn-id: http://wiiusej.googlecode.com/svn/wiki@97 ae48ae66-6a45-0410-b38e-211266189506
39 lines
1021 B
Plaintext
39 lines
1021 B
Plaintext
#labels Featured,Phase-Deploy
|
|
#User documentation.
|
|
|
|
|
|
|
|
=Detailed documentation=
|
|
|
|
|
|
WiiuseJ is very easy to use.
|
|
You have very few things to do get info from your wiimote(s).
|
|
|
|
First make a class (for example MyClass) and implements WiimoteListener with it.
|
|
For example, in the following example, each method implemented receives the differents event Types : ButtonsEvent, IREvent, MotionSensingEvent, StatusEvent and DisconnectionEvent. In this case in each method we only display it.
|
|
|
|
{{{
|
|
public class MyClass implements WiimoteListener{
|
|
|
|
public void onButtonsEvent(ButtonsEvent arg0) {
|
|
System.out.println(arg0);
|
|
}
|
|
|
|
public void onIrEvent(IREvent arg0) {
|
|
System.out.println(arg0);
|
|
}
|
|
|
|
public void onMotionSensingEvent(MotionSensingEvent arg0) {
|
|
System.out.println(arg0);
|
|
}
|
|
|
|
public void onStatusEvent(StatusEvent arg0) {
|
|
System.out.println(arg0);
|
|
}
|
|
|
|
public void onDisconnectionEvent(DisconnectionEvent arg0) {
|
|
System.out.println(arg0);
|
|
}
|
|
|
|
}
|
|
}}} |