少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
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
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
namespace vnxbqy.UI
{
    public class EquipStrengthMasterCell : CellView
    {
 
        [SerializeField] Text PlusSum;
        [SerializeField] Text MasterAttr1;
        [SerializeField] Text MasterAttr2;
 
        EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
 
 
 
        public void Display(int index)
        {
 
        }
 
        public void ShowMasterAttr(int level, int masterPlusLV)
        {
            int minLV = strengthModel.GetStrengthMinLV(level);
            var curMasterLV = strengthModel.GetMasterLV(strengthModel.SelectLevel);
            var masterInfo = ItemPlusMasterConfig.TryGetMasterInfo(level, masterPlusLV);
 
            PlusSum.text = UIHelper.AppendColor(curMasterLV  >= masterPlusLV ? TextColType.Green : TextColType.Gray, 
                                                Language.Get("Z2003") + masterPlusLV, true);
            //PlayerPropertyConfig.GetFullDescription(property.x, property.y);
 
            MasterAttr2.SetActive(masterInfo.MasterPlusAttrID.Length == 2);
            for (int i=0; i < masterInfo.MasterPlusAttrID.Length; i++)
            {
                switch (i)
                {
                    case 0:
                        {
                            MasterAttr1.text = UIHelper.AppendColor(curMasterLV >= masterPlusLV ? TextColType.Green : TextColType.Gray, 
                                PlayerPropertyConfig.GetFullDescription(masterInfo.MasterPlusAttrID[i], masterInfo.MasterPlusAttrValue[i]), true);
                            break;
                        }
                    case 1:
                        {
                            MasterAttr2.text = UIHelper.AppendColor(curMasterLV >= masterPlusLV ? TextColType.Green : TextColType.Gray,
                                PlayerPropertyConfig.GetFullDescription(masterInfo.MasterPlusAttrID[i], masterInfo.MasterPlusAttrValue[i]), true);
                            break;
                        }
                }
            }
        }
 
 
    }
 
}