public override IEnumerator OnLoad(Request request) { yield return(StartCoroutine(base.OnLoad(request))); SShop sShop = new SShop(); yield return(StartCoroutine(sShop.Download(ShopAsset.Url, App.Util.Global.versions.shop, (AssetBundle assetbundle) => { ShopAsset.assetbundle = assetbundle; ShopCacher.Instance.Reset(ShopAsset.Data.shopItems); ShopAsset.Clear(); }))); App.Model.Master.MShopItem.ShopType type = request.Get <App.Model.Master.MShopItem.ShopType>("type"); typeIndex = System.Array.FindIndex(types, t => t == type); ScrollViewSets(); yield return(0); }
public App.Model.Master.MShopItem[] GetAll(App.Model.Master.MShopItem.ShopType type) { return(System.Array.FindAll(datas, d => d.type == type)); }
public static void Show(App.Model.Master.MShopItem.ShopType type = App.Model.Master.MShopItem.ShopType.money) { Request request = Request.Create("type", type); App.Util.SceneManager.CurrentScene.StartCoroutine(Global.SceneManager.ShowDialog(SceneManager.Prefabs.ShopDialog, request)); }
private void ScrollViewSets() { App.Model.Master.MShopItem.ShopType type = types[typeIndex]; title.text = Language.Get(string.Format("shop_{0}", type.ToString())); ScrollViewSets(content, childItem, ShopCacher.Instance.GetAll(type)); }