//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, February 28, 2019 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace vnxbqy.UI { public class EquipSuitPropertyBar : MonoBehaviour { [SerializeField] Text m_Titile; [SerializeField] Text[] m_Properties; public void Display(EquipSuitPropertyEntry entry, bool isBrightUI, bool handActive=true) { var color = entry.actived && handActive ? UIHelper.GetUIColor(TextColType.Green, isBrightUI) : UIHelper.GetUIColor(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.SetActive(true); behaviour.text = PlayerPropertyConfig.GetFullDescription(property); } else { behaviour.SetActive(false); } behaviour.color = color; } } } }