少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-24 b98656e502fcf4c2928310b1e100dfd9daaa0bec
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
using System;
using UnityEngine;
using UnityEngine.UI;
using TableConfig;
using EnhancedUI.EnhancedScroller;
 
namespace Snxxz.UI
{
    public class CrossServerOneVsOneDanLvCell : ScrollerUI
    {
        [SerializeField] Image lvImg;
        [SerializeField] Text nameText;
        [SerializeField] Text scoreText;
 
        public override void Refresh(CellView cell)
        {
            var config = Config.Instance.Get<CrossServerArenaConfig>(cell.index);
            if (config == null) return;
            lvImg.SetSprite(config.IconKey);
            nameText.text = config.Name;
            nameText.color = UIHelper.GetDanLVColor(config.DanLV, true);
            var preConfig = Config.Instance.Get<CrossServerArenaConfig>(cell.index - 1);
            int score = preConfig == null ? 0 : preConfig.LVUpScore;
            scoreText.text = Language.Get("UnionLiven101", score);
        }
    }
}