|
@@ -159,6 +159,9 @@ namespace GFGGame
|
|
private void RenderListCardPropertyItem(int index, GObject obj)
|
|
private void RenderListCardPropertyItem(int index, GObject obj)
|
|
{
|
|
{
|
|
UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
|
|
UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
|
|
|
|
+ if (_cardStarCfg == null)
|
|
|
|
+ ET.Log.Error("RenderListCardPropertyItemd _cardStarCfg is null");
|
|
|
|
+
|
|
int typeIndex = 1;
|
|
int typeIndex = 1;
|
|
if (_cardStarCfg.score1 > 0)
|
|
if (_cardStarCfg.score1 > 0)
|
|
typeIndex = 1;
|
|
typeIndex = 1;
|
|
@@ -168,8 +171,9 @@ namespace GFGGame
|
|
typeIndex = 3;
|
|
typeIndex = 3;
|
|
else if (_cardStarCfg.score4 > 0)
|
|
else if (_cardStarCfg.score4 > 0)
|
|
typeIndex = 4;
|
|
typeIndex = 4;
|
|
- if(_scores.ContainsKey(typeIndex))
|
|
|
|
- listItem.m_txtProperty.text = _scores[typeIndex].ToString();
|
|
|
|
|
|
+
|
|
|
|
+ _scores.TryGetValue(typeIndex, out var scoresValue);
|
|
|
|
+ listItem.m_txtProperty.text = scoresValue.ToString();
|
|
listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + typeIndex);
|
|
listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + typeIndex);
|
|
UI_ListScoreItem2.ProxyEnd();
|
|
UI_ListScoreItem2.ProxyEnd();
|
|
}
|
|
}
|