| | |
| | | using TableConfig; |
| | | using EnhancedUI.EnhancedScroller; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class IceCrystalVeinWin : Window |
| | | { |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | GetAllStar();
|
| | | StarAll = iceCrystalVeinModel.GetAllStar();
|
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | AddIceLodeStarAwardList(); |
| | | SetGridMiddle(); |
| | | SetGridBotton();
|
| | | |
| | |
|
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | iceCrystalVeinModel.UpdateIceLodeInf += UpdateIceLodeInf; |
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | |
| | |
|
| | | private void UpdateIceLodeInf()
|
| | | {
|
| | | GetAllStar();
|
| | | StarAll = iceCrystalVeinModel.GetAllStar();
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (fbId == 31140)
|
| | | {
|
| | | GetAllStar();
|
| | | StarAll = iceCrystalVeinModel.GetAllStar();
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | #endregion |
| | |
| | | } |
| | | private void OnClickChallenge()
|
| | | {
|
| | | //model.currentDungeon = new Dungeon(31140, IndexSelect);
|
| | | //model.SingleChallenge(model.currentDungeon);
|
| | | if (iceCrystalVeinModel.IsFree(IndexSelect))//免费
|
| | | {
|
| | | EnterTheCopy();
|
| | | }
|
| | | else//收费
|
| | | {
|
| | | string str = "重复挑战该副本需要消耗50绑玉,确定要重复挑战?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), str, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | int GoldPaper = (int)UIHelper.GetMoneyCnt(2);
|
| | | if (GoldPaper >= 50)
|
| | | {
|
| | | EnterTheCopy();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | } |
| | | private void EnterTheCopy()
|
| | | {
|
| | | model.currentDungeon = new Dungeon(31140, IndexSelect);
|
| | | model.SingleChallenge(model.currentDungeon);
|
| | | } |
| | | |
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | |
| | | Obj2.SetActive(false);
|
| | | IceCrystalVeinCell iceCrystal = Obj1.GetComponent<IceCrystalVeinCell>();
|
| | | iceCrystal.SetIceCrystalVeinCell(Index);
|
| | | iceCrystal._Button.SetListener(()=> |
| | | iceCrystal._Button.SetListener(() =>
|
| | | {
|
| | | IndexSelect = Index;
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(IceCrystalVeinMiddle[i], true, (ulong)1);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(()=> |
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(IceCrystalVeinMiddle[type], false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | IceLodeStarAwardClass IceLode = IceLodeStarAwardList[i];
|
| | | ObjChild.SetActive(true);
|
| | | ItemCell _ItemCell = ObjChild.transform.Find("ItemCell_1").GetComponent<ItemCell>();
|
| | | Text TextStar= ObjChild.transform.Find("Text_Star").GetComponent<Text>();
|
| | | TextStar.text = StarAll + "/"+ IceLode.Star;
|
| | | Text TextStar = ObjChild.transform.Find("Text_Star").GetComponent<Text>();
|
| | | TextStar.text = StarAll + "/" + IceLode.Star;
|
| | | ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)1);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | |
| | | IceLodeStarAwardList.Add(Dic);
|
| | | }
|
| | | }
|
| | | } |
| | | private void GetAllStar()
|
| | | {
|
| | | StarAll = 0;
|
| | | for (int i = 0; i < iceCrystalVeinModel.LineList.Count; i++)
|
| | | {
|
| | | DungeonRecord dungeonRecord;
|
| | | if (model.TryGetRecord(31140, out dungeonRecord))
|
| | | {
|
| | | if (dungeonRecord.lineGrades.ContainsKey(iceCrystalVeinModel.LineList[i]))
|
| | | {
|
| | | StarAll += dungeonRecord.lineGrades[(iceCrystalVeinModel.LineList[i])];
|
| | | }
|
| | | } |
| | | }
|
| | | } |
| | | }
|
| | | } |
| | | |
| | | } |