| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, August 16, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using EnhancedUI.EnhancedScroller;
|
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | //神兽强化
|
| | | namespace Snxxz.UI
|
| | | { |
| | | {
|
| | | public class GodBeastClass
|
| | | {
|
| | | public int GodBeastNumber;//神兽编号
|
| | |
| | | public int EquipScore;//装备评分
|
| | | public int ItemPlace;//背包装备位置
|
| | | public int GodBeastId;//神兽ID
|
| | | } |
| | | public class GodBeastReinforcementWin : Window |
| | | }
|
| | | public class GodBeastReinforcementWin : Window
|
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController; |
| | | [SerializeField] GodBeastSlidingList m_GodBeastSlidingList; |
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | [SerializeField] GodBeastSlidingList m_GodBeastSlidingList;
|
| | | [SerializeField] GameObject m_Listprompt_Text;
|
| | | [SerializeField] GodBeastAttributes m_GodBeastAttributes;
|
| | | [SerializeField] UIEffect m_UIEffect;
|
| | |
| | | GodBeastModel GodBeastModel;
|
| | | GodBeastModel godBeastModel { get { return GodBeastModel ?? (GodBeastModel = ModelCenter.Instance.GetModel<GodBeastModel>()); } }
|
| | | public static event Action<int> ChooseToModify;
|
| | | private List<GodBeastClass> GodBeastList = new List<GodBeastClass>(); |
| | | private int CurrentlySelected = 0; |
| | | private int JumpIndex = 0; |
| | | public int Offset = 0;//偏移量 |
| | | #region Built-in |
| | | protected override void BindController() |
| | | private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
|
| | | private int CurrentlySelected = 0;
|
| | | private int JumpIndex = 0;
|
| | | public int Offset = 0;//偏移量
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | CurrentlySelected = 0;
|
| | | GetGodBeast();//获取神兽强化装备信息
|
| | | |
| | | |
| | | if (godBeastModel.ItemPlace != -1)//装备强化跳转选中
|
| | | {
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | |
| | | JumpIndex = 0;
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | m_GodBeastSlidingList.Init(); |
| | | m_GodBeastAttributes.Init(); |
| | | m_GodBeastSlidingList.Init();
|
| | | m_GodBeastAttributes.Init();
|
| | | m_GodBeastAttributes.GetGodBeastLocationMarker(CurrentlySelected);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | var offset = 0f;
|
| | | m_ScrollerController.JumpIndex(JumpIndex,ref offset);
|
| | | m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | JumpIndex = 0;
|
| | | godBeastModel.ItemPlace = -1;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent; |
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
|
| | | }
|
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion |
| | | |
| | | #endregion
|
| | |
|
| | | private void GetGodBeast()//存储神兽强化列表数据和排序
|
| | | {
|
| | | GodBeastList.Clear();
|
| | |
| | | godBeastClass.GodBeastQuality = itemModel[i].config.ItemColor;
|
| | | godBeastClass.GodBeastStar = itemModel[i].config.StarLevel;
|
| | | godBeastClass.EquipScore = itemModel[i].equipScore;
|
| | | godBeastClass.ItemPlace = itemModel[i].itemInfo.ItemPlace;
|
| | | godBeastClass.ItemPlace = itemModel[i].itemPlace;
|
| | | godBeastClass.GodBeastId = key;
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | if (IudetDogzEquipPlus == null)
|
| | |
| | | return -x.EquipScore.CompareTo(y.EquipScore);
|
| | | }
|
| | | return 1;
|
| | | } |
| | | }
|
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void GetDogZBagIndex()//获取选择的神兽装备的装备下标
|
| | | {
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|