예제 #1
0
 void Start()
 {
     if (j.Count == 2)
     {
         if (!j[0].isLeft)
         {
             Debug.Log("Inverted JoyCons");
             Joycon tmp;
             tmp  = j[0];
             j[0] = j[1];
             j[1] = tmp;
         }
         for (int i = 0; i < j.Count; ++i)
         {
             Debug.Log(i);
             Joycon jc   = j[i];
             byte   LEDs = 0x0;
             LEDs |= (byte)(0x1 << i);
             jc.Attach(leds_: LEDs);
             jc.Begin();
         }
     }
     else
     {
         Debug.Log("No connected JoyCons");
     }
 }
예제 #2
0
 public void Start()
 {
     for (int i = 0; i < j.Count; ++i)
     {
         Joycon jc   = j [i];
         byte   LEDs = 0x0;
         LEDs |= (byte)(0x1 << i);
         jc.Attach(leds_: LEDs);
         jc.Begin();
     }
 }
예제 #3
0
 void Start()
 {
     for (int i = 0; i < j.Count; ++i)
     {
         Debug.Log(i);
         Joycon jc   = j [i];
         byte   LEDs = 0x0;
         LEDs |= (byte)(0x1 << i / 2);
         jc.Attach(leds_: LEDs);
         jc.Begin();
     }
 }
예제 #4
0
 void Start()
 {
     SceneManager.sceneUnloaded += OnSceneUnloaded;
     for (int i = 0; i < j.Count; ++i)
     {
         Debug.Log(i);
         Joycon jc   = j[i];
         byte   LEDs = 0x0;
         LEDs |= (byte)(0x1 << i);
         jc.Attach(leds_: LEDs);
         jc.Begin();
     }
 }
예제 #5
0
    void Start()
    {
        int jCnt = -1;

        for (int i = 0; i < JoyconList.Count; ++i)
        {
            jCnt = (i % 2 == 0) ? ++jCnt : jCnt;
            Debug.Log(i);
            Joycon jc   = JoyconList[i];
            byte   LEDs = 0x0;

            LEDs |= (byte)(0x1 << jCnt);

            jc.Id = jCnt;

            jc.Attach(leds_: LEDs);
            jc.Begin();
        }
    }
예제 #6
0
 void Start()
 {
     j.Attach(leds_: LEDs, imu: EnableIMU, localize: EnableLocalize);
     j.Begin();
 }