private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { manager.ReserveState ("FageUIManagerTransOut"); } else { manager.GetRequests ().Dequeue (); } }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); FageUIPopupMem mem = new FageUIPopupMem (request.uiSet); queue.Enqueue(mem); if (queue.Count == 1) { manager.ReserveState("FageUIManagerSwitch"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek () as FageUIPopupMem; current.Destroy (); this.current = current; } else { manager.ReserveState("FageUIManagerSwitch"); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count > 0) { manager.ReserveState("FageUIManagerTransOut"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek () as FageUIPopupMem; this.current = current; current.Instantiate (manager.canvas, request.param); } else { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count == 0) { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); FageUIPopupMem mem = new FageUIPopupMem(request.uiSet); queue.Enqueue(mem); if (queue.Count == 1) { manager.ReserveState("FageUIManagerSwitch"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek() as FageUIPopupMem; current.Destroy(); this.current = current; } else { manager.ReserveState("FageUIManagerSwitch"); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { queue.Dequeue (); } if (queue.Count == 0) { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek() as FageUIPopupMem; this.current = current; current.Instantiate(manager.canvas, request.param); } else { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } }
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)); }