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"); } }
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(); } }
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(); } }
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(); } }
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(); } }
void Start() { j.Attach(leds_: LEDs, imu: EnableIMU, localize: EnableLocalize); j.Begin(); }