Exemplo n.º 1
0
        public void Begin()
        {
            currentPanelIndex = 0;
            if (string.IsNullOrEmpty(RequestQuestionHookName))
            {
                if (EndAction != null)
                {
                    EndAction.Invoke();
                }
                OverridePosition = null;
                OverrideRotation = null;
                if (_pointer)
                {
                    _pointer.SetVisible(false);
                }
                ExitPoll.CurrentExitPollSet = null;
                Util.logDebug("CognitiveVR Exit Poll. You haven't specified a question hook to request!");
                return;
            }

            if (CognitiveVR_Manager.Instance != null)
            {
                //CognitiveVR_Manager.Instance.StartCoroutine(RequestQuestions());
                //hooks/questionsets. ask hook by id what their questionset is
                string url = Constants.GETEXITPOLLQUESTIONSET(RequestQuestionHookName);

                CognitiveVR.NetworkManager.GetExitPollQuestions(url, RequestQuestionHookName, QuestionSetResponse, 3);
            }
            else
            {
                Util.logDebug("Cannot display exitpoll. cognitiveVRManager not present in scene");
                if (EndAction != null)
                {
                    EndAction.Invoke();
                }
                OverridePosition = null;
                OverrideRotation = null;
                if (_pointer)
                {
                    _pointer.SetVisible(false);
                }
                ExitPoll.CurrentExitPollSet = null;
            }
        }