//灵石对比 private void OnShowRuneContrastPanelClickCallBack(int runeId) { currentRuneId = runeId; RuneContrast contrastentity = new RuneContrast(); RuneInfo newrune = new RuneInfo(); RuneInfo originrune = new RuneInfo(); SlotInfo info = new SlotInfo(); info.slotid = currentSlotId; originrune.runeid = controller.GetRuneId(currentSlotId, currentRunePageId); originrune.iconid = controller.GetRuneIcon(originrune.runeid); originrune.level = controller.GetRuneLevel(originrune.runeid); originrune.nane = controller.GetRuneName(originrune.runeid); originrune.itemattribute = controller.GetRuneAttribute(originrune.runeid); newrune.runeid = currentRuneId; newrune.iconid = controller.GetRuneIcon(currentRuneId); newrune.level = controller.GetRuneLevel(currentRuneId); newrune.nane = controller.GetRuneName(currentRuneId); newrune.itemattribute = controller.GetRuneAttribute(currentRuneId); contrastentity.newrune = newrune; contrastentity.originrune = originrune; contrastentity.slot = info; contrastentity.replaceEvent = (int pageid, int newruneid, int slotid) => { controller.SendEquipRuneItem(pageid, newruneid, slotid); RuneRightChildChange(runePageInformationPanel.name); }; ShowRunePopViewUI(contrastentity, RunePopType.RuneContrastPanel); }
public void Init(RuneContrast runecontrast) { this.runeinfo = runecontrast.newrune; this.slotinfo = runecontrast.slot; this.replaceEvent = runecontrast.replaceEvent; orgineRune.Init(runecontrast.originrune); newRune.Init(runecontrast.newrune); }
private void BuySlot(SlotInfo sinfo) { if (sinfo.buycost <= DataManager.GetInstance().GetPlayerDiamond()) { buyEvent(sinfo.pageid, sinfo.slotid, sinfo.type); } else { Utils.MessageDispatcher.PostMessage(Constants.MessageType.OpenAlertWindow, null, UI.AlertType.ConfirmAlone, string.Format(MONEY_NOT_ENOUGH, JEWEL), TIP_TITLE); exitEvent(); } }
//购买灵石槽页面 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(); }