コード例 #1
0
        public virtual void Finish()
        {
            if (_state != State.StagesPost)
            {
                _state = State.StagesPost;

                //Kill the pre and main stages
                _stagesPre.gameObject.SetActive(false);
                _stagesMain.gameObject.SetActive(false);
                QuickSingletonManager.GetInstance <QuickInstructionsManager>().Stop();

                QuickStageBase.ClearStackStages();

                QuickVRManager.Log("Elapsed Time = " + _timeRunning.ToString("f3") + " seconds");
                _stagesPost.Init();
            }
        }
コード例 #2
0
        protected virtual IEnumerator CoUpdate()
        {
            //Check if the game has expired
            bool gameExpired = false;

            if (_useExpirationDate)
            {
                if (!QuickUtils.IsInternetConnection())
                {
                    _guiCalibration.SetCalibrationInstructions(QuickUserGUICalibration.CalibrationStep.InternetConnectionRequired);
                    gameExpired = true;
                }
                else
                {
                    int day, month, year;
                    QuickUtils.GetDateOnline(out day, out month, out year);
                    DateTime timeNow = new DateTime(year, month, day);
                    DateTime timeExp = new DateTime(_expirationYear, _expirationMonth, _expirationDay);
                    if (timeNow >= timeExp)
                    {
                        _guiCalibration.SetCalibrationInstructions(QuickUserGUICalibration.CalibrationStep.TimeExpired);
                        gameExpired = true;
                        QuickVRManager.Log("GAME DATE EXPIRED!!!");
                    }
                }
            }

            if (gameExpired)
            {
                while (!InputManager.GetButtonDown(InputManager.DEFAULT_BUTTON_CONTINUE))
                {
                    yield return(null);
                }

                QuickUtils.CloseApplication();
            }
            else
            {
                //Execute the stagesPre
                _state = State.StagesPre;
                _stagesPre.Init();
            }
        }