예제 #1
0
        // Update is called once per frame
        void Update()
        {
            if (canvas.worldCamera == null)
            {
                assignUICamera(canvas, trinusProcessor.getUICamera());
            }

            if (trinusCursor != null && trinusCursor.gameObject.activeSelf)              //hack to correctly place the cursor in stereoscopic mode
            {
                updateTrinusCursor();
            }
            if (currentPage == UI_PAGE.CONNECTION_WAIT && trinusProcessor.isStreaming())
            {
                if (connectedEvent != null)
                {
                    connectedEvent.Invoke();
                }
                openGame();
            }
            else
            if (currentPage != UI_PAGE.NONE && trinusProcessor.getStatus() == corelib.util.DataStructs.STATUS.DISCONNECTED)
            {
                if (disconnectedEvent != null)
                {
                    currentPage = UI_PAGE.NONE;
                    disconnectedEvent.Invoke();
                }
                else
                {
                    startConnection();
                }
            }
        }