Example #1
0
        public int StartLoad()
        {
            int count = 0;

            if (this.mDependBundles != null)
            {
                foreach (var v in mDependBundles)
                {
                    if (!AsyncResourceManager.CheckLoaded(v.mPath))
                    {
                        count += v.StartLoad();
                    }
                    else
                    {
                        count += 1;
                    }
                }
            }
            if (!AsyncResourceManager.CheckLoaded(mMainBundle.mPath))
            {
                count          += mMainBundle.StartLoad();
                this.mLoadCount = count;
            }
            else
            {
                count           = count + 1;
                this.mLoadCount = count;
            }
            return(count);
        }
Example #2
0
    void Update()
    {
        mResourceManager.Update();
        mGameTimerManager.Execute();

        AsyncResourceManager.OnUpdate();
        SyncResourceManager.OnUpdate();
    }
Example #3
0
 public void EnterBattle()
 {
     GameTimerManager.Instance.ClearOnChangeScene();
     UIManager.Instance.DisposeAllLayers(false);
     //TODO PoolManagerDispose;
     AsyncResourceManager.UnloadBundles();
     SyncResourceManager.UnloadBundles();
     Resources.UnloadUnusedAssets();
 }
Example #4
0
 public void ChangeScene(bool reLogin)
 {
     GameTimerManager.Instance.ClearOnChangeScene();
     UIManager.Instance.DisposeAllLayers(reLogin);
     //TODO PoolManagerDispose;
     AsyncResourceManager.UnloadBundles();
     SyncResourceManager.UnloadBundles();
     Resources.UnloadUnusedAssets();
 }
Example #5
0
    async Task LoadInit()
    {
        await AsyncResourceManager.Init();

        await SyncResourceManager.Init(new CallBackDelegate(() => {
            UIManager.Instance.Init();
        }
                                                            ));

        SceneManager.Instance.EnterSceneById(0);
    }
Example #6
0
        public bool CheckLLoad()
        {
            if (!mMainBundle.CheckLoad() && !AsyncResourceManager.CheckLoaded(mMainBundle.mPath))
            {
                return(false);
            }
            if (this.mDependBundles != null)
            {
                foreach (var v in this.mDependBundles)
                {
                    if (!v.CheckLoad() && !AsyncResourceManager.CheckLoaded(v.mPath))
                    {
                        return(false);
                    }
                }
            }

            return(mMainBundle.CheckBundlePreloadAsset());
        }