using UnityEngine; using System.Collections; using UnityEngine.UI; using GCGame.Table; public class MarryStar : MonoBehaviour { public GameObject deepbg; public GameObject markBG; public Text attrDesc; private int curIndex; //当前下标 public void InitMarryAttrStar(int level, int index) { curIndex = index; Tab_MarryFetter marryFetter = TableManager.GetMarryFetterByID(level, 0); if(marryFetter == null) { return; } Tab_MarryStarBase starBase = TableManager.GetMarryStarBaseByID(marryFetter.FetterGrade, 0); if(starBase == null) { return; } InitAttrDesc(starBase.GetAttrIdbyIndex(index), starBase.GetAttrValuebyIndex(index)); ShowOrHideMarkBG(curIndex + 1 <= marryFetter.OpenStarCount); } public void InitAttrDesc(int _AttrId, int attrValue) { string attrId = "#{" + (_AttrId + 10000) + "}"; attrDesc.text = StrDictionary.GetClientDictionaryString("#{3472}", StrDictionary.GetClientDictionaryString(attrId), attrValue); } public void ShowOrHideMarkBG(bool isShow) { deepbg.SetActive(!isShow); markBG.SetActive(isShow); } }