Beispiel #1
0
        protected override IEnumerator CoUpdate()
        {
            if (!QuickUtils.IsInternetConnection())
            {
                _guiCalibration.SetCalibrationInstructions(QuickUserGUICalibration.CalibrationStep.InternetConnectionRequired);

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

                QuickUtils.CloseApplication();
            }
        }
        protected virtual void Start()
        {
            StartPlayer();

            if (_hTracking)
            {
                QuickSingletonManager.GetInstance <CameraFade>().SetColor(Color.black);
                StartCoroutine(CoUpdate());
            }
            else
            {
                QuickVRManager.LogError("NO HEAD TRACKING FOUND!!! APPLICATION IS CLOSED");
                QuickUtils.CloseApplication();
            }
        }
        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();
            }
        }