Пример #1
0
    public void Init(int nGoodIndex, int nGoodId, int nLeftCount)
    {
        Tab_GoldMoneyShop tabGoldMoneyShopItem = TableManager.GetGoldMoneyShopByID(nGoodId, 0);

        if (tabGoldMoneyShopItem == null)
        {
            return;
        }

        Tab_CommonItem tabItem = TableManager.GetCommonItemByID(tabGoldMoneyShopItem.ItemID, 0);

        if (tabItem == null)
        {
            return;
        }

        m_ItemSlot.InitInfo_GoldMoneyShopItem(tabGoldMoneyShopItem.ItemID, ItemSlotLogic.OnClickGoldMoneyShopOpenTips, tabGoldMoneyShopItem.StackSize > 0 ? tabGoldMoneyShopItem.StackSize.ToString() : "", tabGoldMoneyShopItem.StackSize > 0);

        m_NumContent.text   = nLeftCount <= 0 ? "[FF0000]" + nLeftCount.ToString() : nLeftCount.ToString();
        m_PriceContent.text = tabGoldMoneyShopItem.Price.ToString();
        m_NameLabel.text    = tabItem.Name;

        m_GoodsIndex = nGoodIndex;
        m_GoodsId    = nGoodId;
        m_ItemID     = tabItem.Id;
        m_LeftCount  = nLeftCount;
        m_nPrice     = tabGoldMoneyShopItem.Price;
    }