少年修仙传客户端代码仓库
client_Hale
2019-04-15 f99a0cd6ed9f5df666b19549e6a7de9bf9b9e9c8
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, February 28, 2019
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
 
namespace Snxxz.UI
{
 
    public class EquipSuitPropertyBar : MonoBehaviour
    {
        [SerializeField] Text m_Titile;
        [SerializeField] Text[] m_Properties;
 
        public void Display(EquipSuitPropertyEntry entry)
        {
            var color = UIHelper.GetUIColor(entry.actived ? TextColType.Green : TextColType.White, true);
            m_Titile.color = color;
 
            for (var i = 0; i < m_Properties.Length; i++)
            {
                var behaviour = m_Properties[i];
                if (i < entry.properties.Count)
                {
                    var property = entry.properties[i];
                    behaviour.gameObject.SetActive(true);
                    behaviour.text = PlayerPropertyConfig.GetFullDescription(property);
                }
                else
                {
                    behaviour.gameObject.SetActive(false);
                }
 
                behaviour.color = color;
            }
        }
 
    }
 
}