A wrapper class to allow Wii remote data to be polled on each game update step. More...
Classes | |
class | WiimoteData |
Data from a Wii remote. More... | |
Public Types | |
enum | Buttons { None = 0, Up = 0x001, Down = 0x002, Left = 0x004, Right = 0x008, A = 0x010, B = 0x020, One = 0x040, Two = 0x080, Plus = 0x100, Minus = 0x200 } |
Wiimote buttons. More... | |
Public Member Functions | |
void | Awake () |
Initialise and validate. | |
void | Start () |
Load the library. | |
void | OnLevelReset () |
Reset the single instance. | |
void | OnApplicationQuit () |
Close the library. | |
void | Update () |
Polls the Wii remotes. | |
int | GetWiimoteCount () |
Returns the number of remotes connected. | |
WiimoteData | GetWiiData (int id) |
Returns data from the specified remote. | |
void | EnableIR (int id) |
Enables point-and-click for the specified remote. | |
Buttons | GetButtons (int id) |
Returns the buttons currently held for the specified remote. | |
Vector2 | GetUICursorPosition (int index) |
Returns the position of the cursor as controlled by the mouse or primary Wii remote. | |
Vector2 | GetUICursorMotion (int index) |
Returns the cursor motion for the specified remote. | |
bool | GetUIButtonState (int index) |
Returns true if any acceptable UI click or confirm is detected. | |
Public Attributes | |
const int | MaxPlayers = 4 |
Maximum supported Wii remotes for this game. | |
int | shakeForce = 50 |
Force required to count as a shake. | |
float | irScaleX = 1 |
Scaling for IR point-and-click in x-axis. | |
float | irScaleY = 1 |
Scaling for IR point-and-click in y-axis. | |
float | dPadSpeed = 1 |
Speed of D-pad cursor motion. | |
float | dPadAcceleration = 3 |
Acceleration of D-pad cursor motion. | |
Properties | |
static readonly WiiPoller | instance [get] |
Single instance. |
A wrapper class to allow Wii remote data to be polled on each game update step.
enum WiiPoller::Buttons |
Wiimote buttons.
void WiiPoller.Awake | ( | ) |
Initialise and validate.
void WiiPoller.EnableIR | ( | int | id | ) |
Enables point-and-click for the specified remote.
Buttons WiiPoller.GetButtons | ( | int | id | ) |
Returns the buttons currently held for the specified remote.
bool WiiPoller.GetUIButtonState | ( | int | index | ) |
Returns true if any acceptable UI click or confirm is detected.
Vector2 WiiPoller.GetUICursorMotion | ( | int | index | ) |
Returns the cursor motion for the specified remote.
Vector2 WiiPoller.GetUICursorPosition | ( | int | index | ) |
Returns the position of the cursor as controlled by the mouse or primary Wii remote.
WiimoteData WiiPoller.GetWiiData | ( | int | id | ) |
Returns data from the specified remote.
int WiiPoller.GetWiimoteCount | ( | ) |
Returns the number of remotes connected.
void WiiPoller.OnApplicationQuit | ( | ) |
Close the library.
void WiiPoller.OnLevelReset | ( | ) |
Reset the single instance.
void WiiPoller.Start | ( | ) |
Load the library.
void WiiPoller.Update | ( | ) |
Polls the Wii remotes.
float WiiPoller.dPadAcceleration = 3 |
Acceleration of D-pad cursor motion.
float WiiPoller.dPadSpeed = 1 |
Speed of D-pad cursor motion.
float WiiPoller.irScaleX = 1 |
Scaling for IR point-and-click in x-axis.
float WiiPoller.irScaleY = 1 |
Scaling for IR point-and-click in y-axis.
const int WiiPoller.MaxPlayers = 4 |
Maximum supported Wii remotes for this game.
int WiiPoller.shakeForce = 50 |
Force required to count as a shake.
readonly WiiPoller WiiPoller.instance [static, get] |
Single instance.