private void ExcuteFlush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); FageUIMem current = stack.Peek () as FageUIMem; stack.Clear (); stack.Push (current); manager.GetRequests ().Dequeue (); }
private void ExcuteFlush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); FageUIMem current = stack.Peek() as FageUIMem; stack.Clear(); stack.Push(current); manager.GetRequests().Dequeue(); }
private void ExcutePush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); FageUIMem current = new FageUIMem(request.uiSet); stack.Push(current); // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { FageUIMem current = stack.Peek () as FageUIMem; current.Destroy (); this.current = current; } else { manager.ReserveState("FageUIManagerSwitch"); } }
private void ExcuteChange(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { stack.Pop(); } FageUIMem current = new FageUIMem (request.uiSet); stack.Push (current); // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { manager.ReserveState("FageUIManagerTransOut"); } else { manager.ReserveState("FageUIManagerSwitch"); } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { FageUIMem current = stack.Peek () as FageUIMem; this.current = current; current.Resume(manager.canvas, request.param); } else { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } }
private void ExcutePush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { FageUIMem current = stack.Peek() as FageUIMem; current.Destroy(); this.current = current; } else { manager.ReserveState("FageUIManagerSwitch"); } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { stack.Pop (); } if (stack.Count == 0) { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { FageUIMem current = stack.Peek() as FageUIMem; this.current = current; current.Resume(manager.canvas, request.param); } else { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { stack.Pop(); } if (stack.Count == 0) { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { manager.ReserveState("FageUIManagerTransOut"); } else { manager.ReserveState("FageUIManagerSwitch"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); List <string> resources = new List <string>(); List <string> loadBundles = new List <string>(); List <string> unloadBundles = new List <string>(); FageBundleLoader loader = stateMachine as FageBundleLoader; Dictionary <string, AssetBundle> downloadedBundles = loader.GetDownloadedBundles(); Dictionary <string, object> loadedAsset = loader.GetLoadedAssets(); List <string> loadedBundles = loader.GetLoadedBundles(); FageUIManager manager = FageUIManager.Instance; Stack stack = manager.GetStack(); Queue queue = manager.GetQueue(); if (stack.Count > 0) { FageUIMem mem = stack.Peek() as FageUIMem; foreach (string s in mem.uiSet.GetBundles()) { if (!resources.Contains(s)) { resources.Add(s); } } } if (queue.Count > 0) { FageUIPopupMem mem = queue.Peek() as FageUIPopupMem; foreach (string s in mem.uiSet.GetBundles()) { if (!resources.Contains(s)) { resources.Add(s); } } } foreach (FageBundle bundle in FageBundleRoot.Instance.bundles) { if ((!bundle.isDynamic) && (!loadBundles.Contains(bundle.id))) { loadBundles.Add(bundle.id); } else if ((resources.Contains(bundle.id)) && (!loadBundles.Contains(bundle.id))) { loadBundles.Add(bundle.id); } } foreach (string id in loadedBundles) { if (loadBundles.Contains(id)) { loadBundles.Remove(id); } else if (!unloadBundles.Contains(id)) { unloadBundles.Add(id); } } queueBundle = new Queue(); foreach (string s in loadBundles) { AssetBundle ab = downloadedBundles[s]; ab.name = s; queueBundle.Enqueue(ab); } foreach (string s in unloadBundles) { AssetBundle ab = downloadedBundles[s]; foreach (string abname in ab.GetAllAssetNames()) { loadedAsset.Remove(abname); } loadedBundles.Remove(s); } if (queueBundle.Count > 0) { AssetBundle ab = queueBundle.Peek() as AssetBundle; queueAsset = new Queue(ab.GetAllAssetNames()); } stateMachine.DispatchEvent(new FageBundleEvent(FageBundleEvent.LOADING)); }