//购买灵石槽页面 private void OnShowRuneSlotBuyPanelClick(int pageId, int slotId, int itemId) { currentSlotId = slotId; SlotEntity entity = new SlotEntity(); SlotInfo slot = new SlotInfo(); slot.slotid = slotId; slot.pageid = currentRunePageId; slot.type = controller.GetRuneSlotType(currentSlotId); slot.buycost = controller.GetRuneSlotUnLockCost(currentSlotId); entity.slot = slot; entity.buyEvent = (int pageid, int slotid, int type) => { controller.SendUnlockRuneSlot(pageid, slotid, type); }; ShowRunePopViewUI(entity, RunePopType.RuneSlotBuyUI); }
public void Init(SlotEntity entity) { this.slotinfo = entity.slot; this.buyEvent = entity.buyEvent; this.txt_cost.text = entity.slot.buycost.ToString(); }