void Update() { WiimoteManager.FindWiimotes(); if (!WiimoteManager.HasWiimote()) { return; } wiimote = WiimoteManager.Wiimotes[0]; if (FPSControllerScript.setupCompleted) { if (wiimote.Button.a) { drawingScript.StartDrawing(); aPressed = true; } else if (!wiimote.Button.a) { if (aPressed) { drawingScript.StopDrawing(); } } if (wiimote.Button.minus) { minusPressed = true; } else if (!wiimote.Button.minus) { if (minusPressed) { drawingScript.Undo(); minusPressed = false; } } if (wiimote.Button.plus) { plusPressed = true; } else if (!wiimote.Button.plus) { if (plusPressed) { drawingScript.Redo(); plusPressed = false; } } if (wiimote.Button.d_down) { downPressed = true; } if (!wiimote.Button.d_down) { if (downPressed) { colorPickerScript.PrevSlider(); downPressed = false; } } if (wiimote.Button.d_up) { upPressed = true; } if (!wiimote.Button.d_up) { if (upPressed) { colorPickerScript.NextSlider(); upPressed = false; } } if (wiimote.Button.d_left) { colorPickerScript.DecreaseValueSlider(); } if (wiimote.Button.d_right) { colorPickerScript.IncreaseValueSlider(); } } }