少年修仙传客户端代码仓库
hch
2020-11-02 e1a6fa4d577ebf4833cc91bef8d2ff334ebb750f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Snxxz.UI;
using System.Collections;
using System.Collections.Generic;
 
using UnityEngine;
using System;
 
namespace EnhancedUI.EnhancedScroller
{
    public class ImpactRankPromoteCell : ScrollerUI
    {
        [SerializeField] WayCell[] m_WayCells;
 
        ImpactRankModel m_Model;
        ImpactRankModel model {
            get {
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<ImpactRankModel>());
            }
        }
 
        DailyQuestModel _questModel;
        DailyQuestModel QuestModel {
            get { return _questModel ?? (_questModel = ModelCenter.Instance.GetModel<DailyQuestModel>()); }
        }
 
        public override void Refresh(CellView cell)
        {
            var _line = cell.index;
            var _array = model.GetBillRankPromotePaths(model.presentSelectType);
            for (int i = 0; i < 2; i++)
            {
                int _index = _line * 2 + i;
                if (_index < _array.Count)
                {
                    m_WayCells[i].gameObject.SetActive(true);
                    var _way = _array[_index];
                    m_WayCells[i].Display(0, _way.x);
                }
                else
                {
                    m_WayCells[i].gameObject.SetActive(false);
                }
            }
        }
 
 
    }
}