Пример #1
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.L))
        {
            StartCoroutine(_cloudVrClient.RequestGroupLinkage(this,
                                                              (linkage) => {
                Debug.Log(string.Format("Group Linkage : {0}:{1}", linkage.host, linkage.port));
            },
                                                              (errorCode, error) => {
                Debug.Log(string.Format("RequestGroupLinkage failed : {0} : {1}", errorCode.ToString(), error));
            }
                                                              ));
        }
        else if (Input.GetKeyDown(KeyCode.C))
        {
            if (_commandChannel.opened == false)
            {
                _commandChannel.Open();
                Debug.Log("CloudVR CommandChannel opened");
            }
            else
            {
                _commandChannel.Close();
                Debug.Log("CloudVR CommandChannel closed");
            }
        }

        _commandChannel.Update(Time.deltaTime);
    }
    private void Update()
    {
        if (commandChannel != null)
        {
            commandChannel.Update(Time.deltaTime);
        }


        if (state != CircleVRServerState.Playing)
        {
            return;
        }

        elapseTime += Time.deltaTime;
    }