Example #1
0
    /// <summary>
    /// Setup the button with all the required information like product name etc.
    /// </summary>
    /// <param name="plannerUI"></param>
    /// <param name="shopAsset"></param>
    /// <param name="siblingIndex">Index on which position the button is in the shop-list child hierachy</param>
    public void Setup(ShoppingPlannerUI plannerUI, ShopAsset shopAsset, int siblingIndex)
    {
        this.plannerUI = plannerUI;
        ShopAsset      = shopAsset;
        SiblingIndex   = siblingIndex;
        nameLabel.text = shopAsset.AssetName;

        transform.localScale = Vector3.one;
    }
Example #2
0
        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);
        }