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); }
void Update() { mResourceManager.Update(); mGameTimerManager.Execute(); AsyncResourceManager.OnUpdate(); SyncResourceManager.OnUpdate(); }
public void EnterBattle() { GameTimerManager.Instance.ClearOnChangeScene(); UIManager.Instance.DisposeAllLayers(false); //TODO PoolManagerDispose; AsyncResourceManager.UnloadBundles(); SyncResourceManager.UnloadBundles(); Resources.UnloadUnusedAssets(); }
public void ChangeScene(bool reLogin) { GameTimerManager.Instance.ClearOnChangeScene(); UIManager.Instance.DisposeAllLayers(reLogin); //TODO PoolManagerDispose; AsyncResourceManager.UnloadBundles(); SyncResourceManager.UnloadBundles(); Resources.UnloadUnusedAssets(); }
async Task LoadInit() { await AsyncResourceManager.Init(); await SyncResourceManager.Init(new CallBackDelegate(() => { UIManager.Instance.Init(); } )); SceneManager.Instance.EnterSceneById(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()); }