/// <summary>
        /// Loads a limapp, all GameObjects under [ExperienceApp] will be inactive until Begin() is called
        /// </summary>
        /// <param name="experience"></param>
        /// <returns></returns>
        public BundleAsyncLoadOperationBase Load(Experience experience)
        {
            Setup();

            _loadOperation            = _bundleLoader.Load(experience);
            _loadOperation.Completed += OnAppLoadComplete;

            return(_loadOperation);
        }
 private void Cancel()
 {
     if (_loadOperation != null)
     {
         _loadOperation.Completed -= OnAppLoadComplete;
         _loadOperation.Cancel();
         _loadOperation = null;
     }
 }
Ejemplo n.º 3
0
    public override void Load(BundleAsyncLoadOperationBase loadingOperation)
    {
        gameObject.SetActive(true);

        if (_LoadingRoutine != null)
        {
            StopCoroutine(_LoadingRoutine);
        }

        _LoadingRoutine = StartCoroutine(RunLoadingBarCoro(loadingOperation));
    }
Ejemplo n.º 4
0
    protected override IEnumerator RunLoadingBarCoro(BundleAsyncLoadOperationBase loadingOperation)
    {
        if (!loadingOperation.IsDone)
        {
            while (loadingOperation.Progress < 1f)
            {
                UpdateLoadingBarProgress(loadingOperation.Progress);

                yield return(new WaitForEndOfFrame());
            }

            UpdateLoadingBarProgress(1f);
        }
    }
 protected abstract IEnumerator RunLoadingBarCoro(BundleAsyncLoadOperationBase loadingOperation);
 public abstract void Load(BundleAsyncLoadOperationBase loadingOperation);
 private void OnAppLoadComplete(BundleAsyncLoadOperationBase operationBase)
 {
     operationBase.Completed -= OnAppLoadComplete;
     ExperienceAppLoaded?.Invoke(operationBase.Experience, operationBase.ExperienceApp);
 }