家族
This commit is contained in:
parent
88a93f4110
commit
a3d22b0e04
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -357,7 +357,24 @@ namespace GameLogic
|
|||||||
{
|
{
|
||||||
public string name;
|
public string name;
|
||||||
public long score;
|
public long score;
|
||||||
|
public List<JiaZuDataChile> modelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JiaZuDataChile
|
||||||
|
{
|
||||||
|
public string model;
|
||||||
|
public long score;
|
||||||
|
public List<JiaZuChilePlayerData> avatarList;
|
||||||
|
public string uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JiaZuChilePlayerData
|
||||||
|
{
|
||||||
|
public string uid;
|
||||||
|
public string name;
|
||||||
|
public string avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,11 @@ namespace GameLogic
|
|||||||
{
|
{
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
public RectTransform m_KuaiSuRect;
|
public RectTransform m_KuaiSuRect;
|
||||||
|
public RectTransform m_KuaiSuImg;
|
||||||
public RectTransform m_ZhengChangRect;
|
public RectTransform m_ZhengChangRect;
|
||||||
|
public RectTransform m_ZhengChangImg;
|
||||||
public RectTransform m_ShenDuRect;
|
public RectTransform m_ShenDuRect;
|
||||||
|
public RectTransform m_ShenDuImg;
|
||||||
public TextMeshProUGUI m_KuaiSuValue;
|
public TextMeshProUGUI m_KuaiSuValue;
|
||||||
public TextMeshProUGUI m_ZhengChangValue;
|
public TextMeshProUGUI m_ZhengChangValue;
|
||||||
public TextMeshProUGUI m_ShenDuValue;
|
public TextMeshProUGUI m_ShenDuValue;
|
||||||
@ -39,6 +42,69 @@ namespace GameLogic
|
|||||||
|
|
||||||
m_Score.text = UITool.ConvertToString(data.score);
|
m_Score.text = UITool.ConvertToString(data.score);
|
||||||
m_TeamName.text = data.name;
|
m_TeamName.text = data.name;
|
||||||
|
|
||||||
|
m_KuaiSuRect.gameObject.SetActive(false);
|
||||||
|
m_KuaiSuImg.gameObject.SetActive(false);
|
||||||
|
m_ZhengChangRect.gameObject.SetActive(false);
|
||||||
|
m_ZhengChangImg.gameObject.SetActive(false);
|
||||||
|
m_ShenDuRect.gameObject.SetActive(false);
|
||||||
|
m_ShenDuImg.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
|
||||||
|
if (data.modelList != null && data.modelList.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int j = 0; j < data.modelList.Count; j++)
|
||||||
|
{
|
||||||
|
if (data.modelList[j].model == "우醵")
|
||||||
|
{
|
||||||
|
m_KuaiSuRect.gameObject.SetActive(true);
|
||||||
|
m_KuaiSuImg.gameObject.SetActive(true);
|
||||||
|
m_KuaiSuValue.text = "우醵:" + UITool.ConvertToString(data.modelList[j].score);
|
||||||
|
RefreshItemData(m_KuaiSuRect, data.modelList[j].avatarList);
|
||||||
|
}
|
||||||
|
else if (data.modelList[j].model == "攣끽")
|
||||||
|
{
|
||||||
|
m_ZhengChangRect.gameObject.SetActive(true);
|
||||||
|
m_ZhengChangImg.gameObject.SetActive(true);
|
||||||
|
m_ZhengChangValue.text = "攣끽:" + UITool.ConvertToString(data.modelList[j].score);
|
||||||
|
RefreshItemData(m_ZhengChangRect, data.modelList[j].avatarList);
|
||||||
|
}
|
||||||
|
else if (data.modelList[j].model == "<22>똑")
|
||||||
|
{
|
||||||
|
m_ShenDuRect.gameObject.SetActive(true);
|
||||||
|
m_ShenDuImg.gameObject.SetActive(true);
|
||||||
|
m_ShenDuValue.text = "<22>똑:" + UITool.ConvertToString(data.modelList[j].score);
|
||||||
|
RefreshItemData(m_ShenDuRect, data.modelList[j].avatarList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void RefreshItemData(RectTransform rect, List<JiaZuChilePlayerData> data)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < rect.transform.childCount; i++)
|
||||||
|
{
|
||||||
|
if (data.Count - 1 < i)
|
||||||
|
{
|
||||||
|
rect.transform.GetChild(i).gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rect.transform.GetChild(i).gameObject.SetActive(true);
|
||||||
|
RawImage rawImage = rect.transform.GetChild(i).transform.Find("Mask/HeadImg").GetComponent<RawImage>();
|
||||||
|
TextMeshProUGUI playerName = rect.transform.GetChild(i).transform.Find("m_tmp_PlayerName").GetComponent<TextMeshProUGUI>();
|
||||||
|
|
||||||
|
playerName.text = data[i].name;
|
||||||
|
|
||||||
|
// <20>零庫獗
|
||||||
|
AsyncImageDownload.Instance.SetAsyncImage(data[i].avatar, rawImage);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user