public override void initButton(int i) { if (type == ContentShopGoods.TEHUI_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as ShopWindow).tehuiButtonPerfab); } } nodeList [i].name = StringKit.intToFixString(i + 1); ButtonTeHuiGoods button = nodeList [i].GetComponent <ButtonTeHuiGoods> (); button.gameObject.transform.localScale = new Vector3(0.8f, 0.8f, 1f); button.fatherWindow = fatherWindow; button.updateGoods(goods [i] as Goods, shopUpdate, type); }
public override void updateItem(GameObject item, int index) { ButtonTeHuiGoods button = item.GetComponent <ButtonTeHuiGoods> (); button.updateGoods(goods [index] as Goods, shopUpdate, type); }