/// <summary> /// 一键解体(全部清除) /// </summary> void BtnDeleteAll_OnClickEventHandler(UIButton sender) { DialogWnd dialogWnd = WndManager.GetDialog <DialogWnd>(); if (dialogWnd) { dialogWnd.SetDialogLable(NGUIUtil.GetStringByKey("30000039"), NGUIUtil.GetStringByKey("88800063"), NGUIUtil.GetStringByKey("88800064")); dialogWnd.YESButtonOnClick = YesReAuth; dialogWnd.ShowDialog(); } }
void BtnBuySkillPoint_OnClickEventHandler(UIButton sender) { DialogWnd dialogWnd = WndManager.GetDialog <DialogWnd>(); if (dialogWnd) { int a = 10; //购买技能点 int c = UserDC.GetBuySkillPointTime(); //刷新次数 int b = ConfigM.GetBuyResumeSkill(c); //钻石费用 dialogWnd.Align = NGUIText.Alignment.Left; string str = string.Format(NGUIUtil.GetStringByKey("30000021"), a, b, c); dialogWnd.SetDialogLable(str, NGUIUtil.GetStringByKey("88800063"), NGUIUtil.GetStringByKey("88800064")); dialogWnd.YESButtonOnClick = YesReAuth; dialogWnd.ShowDialog(); } }
/// <summary> /// 升星 /// </summary> private void BtnShengXing_OnClickEventHandler(UIButton sender) { //判断碎片满足 int NeedCoin = 0; int NeedNum = 0; SoldierM.GetUpStarNeed(m_soldierInfo.SoldierTypeID, m_soldierInfo.StarLevel + 1, ref NeedNum, ref NeedCoin); int Have = m_soldierInfo.GetHaveFragmentNum();//当前灵魂石 if (m_soldierInfo.StarLevel == ConstantData.MaxStarLevel) { NGUIUtil.ShowTipWndByKey(30000026); return; } else if (UserDC.GetCoin() < NeedCoin) { NGUIUtil.ShowTipWndByKey(10000086); return; } else if (NeedNum > Have) { NGUIUtil.ShowTipWndByKey(10000087); return; } DialogWnd dialogWnd = WndManager.GetDialog <DialogWnd>(); if (dialogWnd) { //升星金币消耗是使用下一级的 string upStarCoin = string.Format(NGUIUtil.GetStringByKey("30000025"), NeedCoin); dialogWnd.SetDialogLable(upStarCoin, NGUIUtil.GetStringByKey("10000044"), NGUIUtil.GetStringByKey("88800068")); dialogWnd.YESButtonOnClick = YesUpStar; dialogWnd.ShowDialog(); } }
/// <summary> /// 升星 /// </summary> /// <param name="sender">Sender.</param> private void BtnShengXing_OnClickEventHandler(UIButton sender) { if (m_bIsShowQualityUp) { return; } CanStarResult result = buildingM.GetCanUpStar(m_Info); if (result == CanStarResult.CanUp) { DialogWnd wnd = WndManager.GetDialog <DialogWnd>(); if (wnd) { int iCoin = 0; int NeedFragmentNum = 0; buildingM.GetUpStarNeed(m_Info.BuildType, m_Info.StarLevel + 1, ref NeedFragmentNum, ref iCoin); wnd.SetDialogLable(string.Format("[ae690f]" + NGUIUtil.GetStringByKey("10000158") + "[-]", iCoin), "", ""); wnd.YESButtonOnClick = DoShengXing; wnd.ShowDialog(); } } }