From WiiLi
/*
*********
* XMOTO *
*********
par MrAttila
Mise à jour le 16 janvier 2008
NOTE : si vous voulez utiliser les accéléromètres de la wiimote,
décommentez la section UTILISATION DES ACCELEROMETRES DE LA WIIMOTE
*/
// CONFIGURATION DES BOUTONS DE LA WIIMOTE
keyboard.left = wiimote.down //Pencher à gauche
keyboard.right = wiimote.up //Pencher à droite
keyboard.Down = wiimote.right //Freiner
keyboard.Up = wiimote.left //Avancer
keyboard.Space = Wiimote.A //Changer de direction
keyboard.enter = Wiimote.B //Touche "Entrée"
keyboard.PageDown = Wiimote.Minus //Niveau précédent
keyboard.PageUp = Wiimote.Plus //Niveau suivant
keyboard.Escape = Wiimote.Home //Touche "Echape"
keyboard.space = wiimote.One //Changer de direction
keyboard.space = wiimote.Two //Changer de direction
/*
// UTILISATION DES ACCELEROMETRES DE LA WIIMOTE
// CALIBRAGE DE LA WIIMOTE
var.yOffset = 4
var.zOffset = -4
// DETECTION DE L'INCLINAISON DE LA WIIMOTE
var.yRot = Wiimote.RawForceY - var.yOffset
var.zRot = Wiimote.RawForceZ - var.zOffset
// AFFICHAGE DE l'INCLINAISON DE LA WIIMOTE POUR CALIBRAGE
debug = 'Y:' + var.yRot + ', ' + 'Z:' + var.zRot
// AVANCER
if (var.yRot > 15) then
key.Up = true
else
key.up = false
endif
// FREINER
if (var.yRot < -15) then
key.down = true
else
key.Down = false
endif
// PENCHER A GAUCHE
if (var.zRot < -15) then
key.left = true
else
key.Left = false
endif
// PENCHER A DROITE
if (var.zRot > 15) then
key.right = true
else
key.right = false
endif
*/