Exemplo n.º 1
0
        void ProcessWrongAnswer()
        {
            ChartBoostView.IncorrectText.gameObject.SetActive(true);

            if (_attempt > ATTEMPT_ALLOW)
            {
                Chartboost.didPassAgeGate(false);
                SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
            }
        }
Exemplo n.º 2
0
        public override void Execute()
        {
#if UNITY_EDITOR
            SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
            return;
#endif
            //On a device and has internet
            Retain();
            new Task(WaitForOrientationAndLoadChartboost(), true);
        }
        public override void Execute()
        {
            var geoScenes = SpecialSceneService.GetGeoBasedScenes();

            foreach (var sceneId in geoScenes)
            {
                if (CDNService.ShouldDownloadOptionalFile(sceneId + BibaContentConstants.UNITY3D_EXTENSION))
                {
                    SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Download);
                    Fail();
                }
            }
        }
        public override void Execute()
        {
            var timeInactive = DateTime.UtcNow - BibaGameModel.LastPlayedTime;

            if (timeInactive >= BibaGameConstants.INACTIVE_DURATION && BibaGameModel.SelectedEquipments.Count > 0)
            {
                SetMenuStateConditionSignal.Dispatch(MenuStateCondition.ShowInactive, true);

                if (BibaSceneStack.Count > 0 && BibaSceneStack.Peek().GetType() != typeof(IntroMenuState))
                {
                    SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Reset);
                }
            }
        }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
0
 void SendMenuStateTrigger(string stateTrigger)
 {
     SetMenuStateTriggerSignal.Dispatch(stateTrigger);
 }
Exemplo n.º 7
0
 void ProcessRightAnswer()
 {
     ChartBoostView.IncorrectText.gameObject.SetActive(false);
     Chartboost.didPassAgeGate(true);
     SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
 }
Exemplo n.º 8
0
 void SkipChartBoost(CBLocation location)
 {
     SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Next);
 }
Exemplo n.º 9
0
 void ScanCompletedAnimationCompleted()
 {
     SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.Yes);
 }
Exemplo n.º 10
0
 void TagServiceInitFailed()
 {
     SetMenuStateTriggerSignal.Dispatch(MenuStateTrigger.No);
 }