| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | |
| | | |
| | | void CreateScroller() |
| | | { |
| | | int jumpIndex = -1; |
| | | int index = -1; |
| | | heroListScroller.Refresh(); |
| | | var _List = HeroUIManager.Instance.heroCollectDict.Keys.ToList(); |
| | | _List.Reverse(); |
| | |
| | | for (int j = 0; j < ids.Count; j++) |
| | | { |
| | | if (j % 4 == 0) |
| | | { |
| | | { |
| | | index++; |
| | | CellInfo cellInfo = new CellInfo(); |
| | | cellInfo.infoInt1 = _List[i]; |
| | | heroListScroller.AddCell(ScrollerDataType.Normal, j, cellInfo); |
| | | } |
| | | |
| | | if (jumpIndex == -1) |
| | | { |
| | | //检查每个武将 |
| | | if (HeroUIManager.Instance.IsBookShowRedPoint(ids[j])) |
| | | { |
| | | jumpIndex = index; |
| | | } |
| | | } |
| | | } |
| | | index++; |
| | | } |
| | | heroListScroller.Restart(); |
| | | heroListScroller.JumpIndex(jumpIndex); |
| | | } |
| | | |
| | | |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | if (type == ScrollerDataType.Header) |