コード例 #1
0
    private void InitUI()
    {
        IList <Shop_ReadyShop> allBeans = LocalModelManager.Instance.Shop_ReadyShop.GetAllBeans();
        int count = allBeans.Count;

        count        = MathDxx.Clamp(count, count, 2);
        this.goodbuy = LocalSave.Instance.BattleIn_GetFirstShop();
        for (int i = 0; i < count; i++)
        {
            FirstItemOnectrl onectrl = this.mPool.DeQueue <FirstItemOnectrl>();
            onectrl.Init(i, allBeans[i], GameLogic.Hold.BattleData.GetFirstShopBuy(i));
            onectrl.OnClickButton = new Action <FirstItemOnectrl>(this.OnClickBuy);
            onectrl.SetBuy(this.goodbuy[i]);
            RectTransform child = onectrl.transform as RectTransform;
            child.SetParentNormal(this.itemsparent);
            child.anchoredPosition = new Vector2(0f, (float)(i * -170));
        }
    }
コード例 #2
0
 private void OnClickBuy(FirstItemOnectrl one)
 {