Example #1
0
 private void OnDestroy()
 {
     TreeController.OnLoadingContent -= onTreeControllerLoadingContent;
     TreeController.OnContentLoaded  -= onTreeControllerContentLoaded;
     if (loadingController.HasLoadingSystem(this))
     {
         loadingController.RemoveLoadingSystem(this);
     }
 }
Example #2
0
 private bool onLotScreenReady(IglooUIEvents.LotScreenReady evt)
 {
     if (loadingController.HasLoadingSystem(this))
     {
         loadingController.RemoveLoadingSystem(this);
     }
     return(false);
 }
 public void OnDestroy()
 {
     if (avatarDetailsData != null)
     {
         avatarDetailsData.PlayerOutfitChanged -= onPlayerOutfitChanged;
         avatarDetailsData.PlayerColorChanged  -= onPlayerColorChanged;
     }
     if (avatarView != null)
     {
         avatarView.OnBusy  -= avatarView_OnBusy;
         avatarView.OnReady -= avatarView_OnReady;
     }
     if (loadingController != null && loadingController.HasLoadingSystem(this))
     {
         loadingController.RemoveLoadingSystem(this);
     }
 }
Example #4
0
        private IEnumerator loadPrefab()
        {
            AssetRequest <GameObject> request = Content.LoadAsync <GameObject>(PrefabToLoad.Key);

            yield return(request);

            if (request.Asset != null)
            {
                Object.Instantiate(request.Asset, base.transform);
            }
            else
            {
                Log.LogErrorFormatted(this, "Failed to load prefab for content key {0}", PrefabToLoad.Key);
            }
            LoadingController loadingController = Service.Get <LoadingController>();

            if (loadingController.HasLoadingSystem(this))
            {
                loadingController.RemoveLoadingSystem(this);
            }
        }
        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);
            }
        }