public override void initButton(int i) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, heContent.laddderHePrefab); } nodeList [i].name = StringKit.intToFixString(i + 1); ButtonShopGoods button = nodeList [i].GetComponent <ButtonShopGoods> (); button.fatherWindow = fatherWindow; button.updateGoods(goods [i] as Goods, shopUpdate, type); }
public override void updateItem(GameObject item, int index) { ButtonShopGoods button = item.GetComponent <ButtonShopGoods> (); button.updateGoods(goods [index] as Goods, shopUpdate, type); }
public override void initButton(int i) { if (type == RMB_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as ShopWindow).goodsButtonPrefab); } } else if (type == GUILD_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as GuildShopWindow).goodsButtonPrefab); } } else if (type == MERIT_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as MeritShopWindow).goodsButtonPrefab); } } else if (type == STARSOUL_DEBRIS_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as StarSoulDebrisShopWindow).goodsButtonPrefab); } } else if (type == MYSTICAL_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as ShopWindow).goodsButtonPrefab); } } else if (type == SUPERDRAW_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as SuperDrawShopWindow).goodsButtonPrefab); } } else if (type == GODSWAR_SHOP) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as GodsWarShopWindow).goodsButtonPrefab); } } else if (type == HEROSYMBOL_SHOP) { if (nodeList[i] == null) { nodeList[i] = NGUITools.AddChild(gameObject, (fatherWindow as HuiJiShopWindow).goodsButtonPrefab); } } else if (type == JUNGONG_SHOP) { if (nodeList[i] == null) { nodeList[i] = NGUITools.AddChild(gameObject, (fatherWindow as LastBattleShopWindow).goodsButtonPrefab); } } else if (type == STAR_SHOP) { if (nodeList[i] == null) { nodeList[i] = NGUITools.AddChild(gameObject, (fatherWindow as StarShopWindow).goodsButtonPrefab); } } nodeList [i].name = StringKit.intToFixString(i + 1); ButtonShopGoods button = nodeList [i].GetComponent <ButtonShopGoods> (); button.fatherWindow = fatherWindow; button.updateGoods(goods [i] as Goods, shopUpdate, type); }