예제 #1
0
 public void Disconnect()
 {
     if (null != cube && cube.isConnected)
     {
         cubeManager.DisconnectAll();
     }
 }
예제 #2
0
        IEnumerator LoopConnection()
        {
            yield return(new WaitForSeconds(3));

            // 切断 (CubeManager 利用した場合)
            cubeManager.DisconnectAll();    // ALT: cubeManager.Disconnect(cube);
            yield return(new WaitUntil(() => !cube.isConnected));

            yield return(new WaitForSeconds(3));

            // 再接続 (CubeManager 利用した場合)
            cubeManager.ReConnectAll();     // ALT: cubeManager.ReConnect(cube);
            yield return(new WaitUntil(() => cube.isConnected));

            StartCoroutine(LoopConnection());
        }