private void avatarView_OnBusy(AvatarBaseAsync view)
 {
     if (isLocal && loadingController.IsVisible)
     {
         loadingController.AddLoadingSystem(this);
     }
 }
        private void prepareForSceneTransition(string scene, string transitionScene, Dictionary <string, object> sceneArgs)
        {
            dispatcher.DispatchEvent(new SceneTransitionEvents.TransitionStart(scene));
            if (MonoSingleton <NativeAccessibilityManager> .Instance.AccessibilityLevel == NativeAccessibilityLevel.VOICE)
            {
                string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("GlobalUI.Accessibility.Loading");
                MonoSingleton <NativeAccessibilityManager> .Instance.Native.Speak(tokenTranslation);
            }
            LoadingController loadingController = Service.Get <LoadingController>();

            loadingController.AddLoadingSystem(this);
            if (string.IsNullOrEmpty(transitionScene))
            {
                transitionScene = "Loading";
            }
            CoroutineRunner.StopTransientCoroutines();
            if (sceneArgs != null)
            {
                currentSceneArgs = sceneArgs;
            }
            else
            {
                currentSceneArgs.Clear();
            }
        }
Esempio n. 3
0
 private void onTreeControllerLoadingContent(TreeController treeController)
 {
     if (TreeController.Equals(treeController) && !loadingController.HasLoadingSystem(this))
     {
         loadingController.AddLoadingSystem(this);
     }
 }
Esempio n. 4
0
 public virtual void ResumeSession()
 {
     if (HasSession)
     {
         if (Service.Get <ConnectionManager>().ConnectionState == ConnectionManager.NetworkConnectionState.NoConnection)
         {
             Service.Get <EventDispatcher>().DispatchEvent(default(SessionErrorEvents.NoNetworkOnResumeError));
             return;
         }
         LoadingController loadingController = Service.Get <LoadingController>();
         if (!loadingController.HasLoadingSystem(this))
         {
             loadingController.AddLoadingSystem(this);
         }
         mixSession.Resume(delegate(IResumeSessionResult result)
         {
             if (!result.Success)
             {
                 Service.Get <EventDispatcher>().DispatchEvent(default(SessionErrorEvents.NoSessionOnResumeError));
             }
             else
             {
                 eventDispatcher.DispatchEvent(default(SessionEvents.SessionResumedEvent));
             }
             Service.Get <LoadingController>().RemoveLoadingSystem(this);
         });
     }
     else
     {
         Service.Get <EventDispatcher>().DispatchEvent(default(SessionErrorEvents.NoSessionOnResumeError));
     }
 }
Esempio n. 5
0
    private void sceneTransition(string sceneName, string transitionScene, Dictionary <string, object> sceneArgs = null, bool allowSceneActivation = false)
    {
        Time.timeScale = 1f;
        LoadingController loadingController = Service.Get <LoadingController>();

        if (!loadingController.HasLoadingSystem(this))
        {
            loadingController.AddLoadingSystem(this);
        }
        if (string.IsNullOrEmpty(transitionScene))
        {
            transitionScene = "Loading";
        }
        TransitionState = ZoneTransitionEvents.ZoneTransition.States.Begin;
        dispatcher.DispatchEvent(new ZoneTransitionEvents.ZoneTransition(CurrentZone.SceneName, sceneName, ZoneTransitionEvents.ZoneTransition.States.Begin));
        dispatcher.AddListener <SceneTransitionEvents.TransitionComplete>(onSceneLoadComplete);
        Service.Get <SceneTransitionService>().LoadScene(sceneName, transitionScene, sceneArgs, allowSceneActivation);
    }
Esempio n. 6
0
 public override void ResumeSession()
 {
     if (HasSession)
     {
         if (Service.Get <ConnectionManager>().ConnectionState == ConnectionManager.NetworkConnectionState.NoConnection)
         {
             Service.Get <EventDispatcher>().DispatchEvent(default(SessionErrorEvents.NoNetworkOnResumeError));
             return;
         }
         LoadingController loadingController = Service.Get <LoadingController>();
         if (!loadingController.HasLoadingSystem(this))
         {
             loadingController.AddLoadingSystem(this);
         }
         CoroutineRunner.StartPersistent(delayResume(), this, "delay resume");
     }
     else
     {
         Service.Get <EventDispatcher>().DispatchEvent(default(SessionErrorEvents.NoSessionOnResumeError));
     }
 }
        private void applicationPause(bool isPaused)
        {
            if (SceneManager.GetActiveScene().name == "Boot" || (Service.IsSet <MembershipService>() && Service.Get <MembershipService>().IsPurchaseInProgress))
            {
                return;
            }
            LoadingController loadingController = Service.Get <LoadingController>();

            if (Service.IsSet <SessionManager>() && Service.Get <SessionManager>().HasSession)
            {
                if (isPaused)
                {
                    Service.Get <SessionManager>().PauseSession(immediately: true);
                    if (!loadingController.HasLoadingSystem(this))
                    {
                        loadingController.AddLoadingSystem(this);
                    }
                }
                else
                {
                    IsAppResuming = true;
                    Service.Get <SessionManager>().ResumeSession();
                }
            }
            if (Service.IsSet <ICPSwrveService>())
            {
                if (isPaused)
                {
                    Service.Get <ICPSwrveService>().Pause();
                }
                else
                {
                    Service.Get <ICPSwrveService>().Resume();
                }
            }
            if (!isPaused)
            {
                loadingController.RemoveLoadingSystem(this);
            }
        }
Esempio n. 8
0
 public override void OnEnter()
 {
     SuspendActiveQuest();
     if (stateController != null)
     {
         if (stateController.IsFirstIglooLoad && Service.Get <SceneLayoutDataManager>().IsInOwnIgloo())
         {
             stateController.OpenManageIglooPopup();
         }
         stateController.SendContextEvent("IglooScreenContainerContent", "igloolotsevent");
     }
     loadingController = Service.Get <LoadingController>();
     if (!loadingController.HasLoadingSystem(this))
     {
         loadingController.AddLoadingSystem(this);
     }
     eventChannel.AddListener <IglooUIEvents.SetStateButtonPressed>(onSceneStateButton);
     eventChannel.AddListener <IglooUIEvents.CreateIglooButtonPressed>(onManageIglooCreatePressed);
     eventChannel.AddListener <IglooUIEvents.CloseManageIglooPopup>(onCloseManageIglooPopup);
     eventChannel.AddListener <IglooUIEvents.LotNextButtonPressed>(onLotNextButtonPressed);
     eventChannel.AddListener <IglooUIEvents.LotBackButtonPressed>(onLotBackButtonPressed);
     eventChannel.AddListener <IglooUIEvents.LotScreenReady>(onLotScreenReady);
 }