public void Init(BuyEntity item) { buyRuneInfo = item.info; this.itfd_sellcount.text = buycount.ToString(); this.txt_name.text = buyRuneInfo.nane; this.txt_attribute.text = buyRuneInfo.itemattribute; this.txt_describer.text = buyRuneInfo.describer; this.txt_count.text = string.Format(HAVE_COUNT, buyRuneInfo.count); this.buyEvent = item.buyEvent; GameResourceLoadManager.GetInstance().LoadAtlasSprite(buyRuneInfo.iconid, delegate(string name, AtlasSprite atlasSprite, System.Object param) { this.img_icon.SetSprite(atlasSprite); }, true); RefreshButton(); this.txt_costgold.text = (buycount * goldCost).ToString(); this.txt_costcrystal.text = (buycount * jewelCost).ToString(); this.txt_costember.text = (buycount * emberCost).ToString(); }
private void OnClickRuneBuyButton() { BuyEntity buyEntity = new BuyEntity(); buyEntity.info = new RuneInfo(); buyEntity.info.level = controller.GetRuneLevel(currentRuneId); buyEntity.info.iconid = controller.GetRuneIcon(currentRuneId); buyEntity.info.count = controller.GetRuneNumber(currentRuneId); buyEntity.info.nane = controller.GetRuneName(currentRuneId); buyEntity.info.itemattribute = controller.GetRuneAttribute(currentRuneId); buyEntity.info.describer = controller.GetRuneIntrotuce(currentRuneId); buyEntity.info.boughtNumber = controller.GetRuneBoughtNumber(currentRuneId); buyEntity.info.boughtNumberLimit = controller.GetRuneBoughtNumberLimit(currentRuneId); buyEntity.info.buyruneandprice = controller.GetItemCost(currentRuneId); buyEntity.buyEvent = (int count, int id, CurrencyType type) => { controller.SendRuneBuy(count, currentRuneId, type); }; ShowRunePopViewUI(buyEntity, RunePopType.RuneBuyUI); }