Example #1
0
        public WiimoteGlobal(WiimotePlugin plugin, IWiimoteData data, Dictionary<uint, Action> updaters)
        {
            this.plugin = plugin;
            this.data = data;

            acceleration = new AccelerationGlobal(data, out accelerationTrigger);
            buttons = new WiimoteButtonState(data, out buttonTrigger);
            motionplus = new MotionPlusGlobal(data, out motionPlusTrigger);
            nunchuck = new NunchuckGlobal(data, out nunchuckTrigger);

            updaters[data.WiimoteNumber] = OnWiimoteDataReceived;
        }
Example #2
0
        public WiimoteGlobal(WiimotePlugin plugin, IWiimoteData data, Dictionary <uint, Action> updaters)
        {
            this.plugin = plugin;
            this.data   = data;

            acceleration = new AccelerationGlobal(data, out accelerationTrigger, out accelerationCalibratedTrigger);
            buttons      = new WiimoteButtonState(data, out buttonTrigger);
            motionplus   = new MotionPlusGlobal(data, out motionPlusTrigger, out motionPlusCalibratedTrigger);
            nunchuck     = new NunchuckGlobal(data, out nunchuckTrigger);

            updaters[data.WiimoteNumber] = OnWiimoteDataReceived;
        }
        public WiimoteGlobal(WiimotePlugin plugin, IWiimoteData data, Dictionary <uint, Action> updaters, Dictionary <uint, Action> capabilitiesUpdaters, Dictionary <uint, Action> statusUpdaters)
        {
            this.plugin = plugin;
            this.data   = data;

            acceleration      = new AccelerationGlobal(data, out accelerationTrigger, out accelerationCalibratedTrigger);
            buttons           = new WiimoteButtonState(data, out buttonTrigger);
            motionplus        = new MotionPlusGlobal(data, out motionPlusTrigger, out motionPlusCalibratedTrigger);
            nunchuck          = new NunchuckGlobal(data, out nunchuckTrigger);
            classicController = new ClassicControllerGlobal(data, out classicControllerTrigger);
            guitar            = new GuitarGlobal(data, out guitarTrigger);
            balanceBoard      = new BalanceBoardGlobal(data, out balanceBoardTrigger);
            capabilities      = new CapabilitiesGlobal(data, out capabilitiesTrigger);
            //TODO: Allow setting led status
            status = new StatusGlobal(plugin, data, out statusTrigger);

            updaters[data.WiimoteNumber]             = OnWiimoteDataReceived;
            capabilitiesUpdaters[data.WiimoteNumber] = capabilitiesTrigger;
            statusUpdaters[data.WiimoteNumber]       = statusTrigger;
        }
Example #4
0
 //-----------------------------------------------------------------------
 public WiimotePluginGlobal(WiimotePlugin plugin, int index)
 {
     Wii        = plugin;
     this.index = index;
 }
Example #5
0
 //-----------------------------------------------------------------------
 public WiimotePluginGlobal(WiimotePlugin plugin, int index)
 {
     Wii = plugin;
      this.index = index;
 }