Пример #1
0
 public void DownloadFileFromCDN(string fileName)
 {
     if (BibaUtility.CheckForInternetConnection())
     {
         RetrieveAndWriteData(BibaContentConstants.GetRelativePath(fileName), BibaContentConstants.GetPersistedPath(fileName));
     }
 }
Пример #2
0
 public void DownloadFilesFromCDN()
 {
     if (BibaUtility.CheckForInternetConnection())
     {
         ReloadContent();
         RetrieveAndWriteData(BibaContentConstants.GetRelativePath(BibaContentConstants.MANIFEST_FILENAME), BibaContentConstants.GetPersistedPath(BibaContentConstants.MANIFEST_FILENAME), ManifestRetrieved);
     }
 }
Пример #3
0
        IEnumerator WaitForOrientationAndLoadChartboost()
        {
            var menuState = BibaSceneStack.Peek();

            if (menuState is SceneMenuState && BibaUtility.CheckForInternetConnection())
            {
                while (Screen.orientation != ((SceneMenuState)menuState).Orientation)
                {
                    yield return(null);
                }

                Chartboost.setShouldPauseClickForConfirmation(true);
                Chartboost.showInterstitial(BibaDeviceSession.TagEnabled ? CBLocation.locationFromName(BibaAnalyticConstants.HOUSE_AD) : CBLocation.Default);

                Chartboost.didDisplayInterstitial    += InterstitialLoaded;
                Chartboost.didFailToLoadInterstitial += FailToLoadInterstitial;
                var timeLapsed = 0f;
                while (timeLapsed < CHART_BOOST_TIME_OUT && !_loadedChartboost)
                {
                    timeLapsed += Time.deltaTime;
                    yield return(null);
                }

                Chartboost.didDisplayInterstitial    -= InterstitialLoaded;
                Chartboost.didFailToLoadInterstitial -= FailToLoadInterstitial;

                if (!_loadedChartboost)
                {
                    SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
                }
            }
            else
            {
                SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
            }
            Release();
        }