Example #1
0
    void Start()
    {
        ENABLE_WIIMOTE = Wiimote.enableWiiMote ();

        // Initialize wiimote receiver
        // TODO(Douglas): Make this work for multiple controllers (if needed)
        ci = ControllerInterface.Instance;
        if (ENABLE_WIIMOTE) {
            receiver = WiimoteReceiver.Instance;
            receiver.connect ();
            while (true) {
                if (receiver.wiimotes.ContainsKey (1)) {
                    ci.setController (1, receiver.wiimotes [1]);
                    break;
                }
            }
        }
    }
Example #2
0
    void Start()
    {
        ENABLE_WIIMOTE = Wiimote.enableWiiMote();

        // Initialize wiimote receiver
        // TODO(Douglas): Make this work for multiple controllers (if needed)
        ci = ControllerInterface.Instance;
        if (ENABLE_WIIMOTE)
        {
            receiver = WiimoteReceiver.Instance;
            receiver.connect();
            while (true)
            {
                if (receiver.wiimotes.ContainsKey(1))
                {
                    ci.setController(1, receiver.wiimotes [1]);
                    break;
                }
            }
        }
    }