From 72921181bd77bd464833f3a50cca888daf8e6431 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Sun, 10 Jul 2011 08:03:47 -0400 Subject: [PATCH] Forgot to note about the .listen() function, whoops --- readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/readme.md b/readme.md index d68ee7f..a2b4a9c 100644 --- a/readme.md +++ b/readme.md @@ -38,6 +38,8 @@ wiimote.when('pressed_a', function() { wiimote2.when('pressed_a', function() { alert('Wiimote #2 pressed the A Button!'); }); + +Wii.listen(); ``` @@ -66,6 +68,12 @@ var wiimote = new Wii.Remote(1, {horizontal: false}); // Vertical controls wiimote.opts.horizontal = true; // Change to horizontal scheme. ``` +The final important piece is to start the Wii-event loop; this manages the event dispatcher internally. To do this, simply... + +``` javascript +Wii.listen(); +``` + You can listen for the following events on all controllers: - **pressed_up** - The up button was pressed.