public async void OnClickConnect() { connectButton.interactable = false; var cubeManager = ToioCubeManagerService.Instance.CubeManager; var cube = await cubeManager.SingleConnect(); if (cube != null) { var index = cubeManager.cubes.Count - 1; cube.idMissedCallback.AddListener("toio-twin", (_cube) => { OnPositionIdMissed(_cube, index); }); ToioLedUtility.TurnLedOn(cube, colors[index], 0); if (RemainingRequiredCubeCount <= 0) { StartGame(cubeManager); } } UpdateConnectButton(); connectButton.interactable = true; }
public void UpdateView(Cube cube, int index) { UIUtility.TrySetText(text, $"プレイヤー{index + 1}"); ToioLedUtility.TurnLedOn(cube, color, 0); }