解决排行榜报错的问题
This commit is contained in:
parent
378d3590d1
commit
a55075d00a
@ -940,7 +940,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.00038004026, y: -0.004007142}
|
||||
m_AnchoredPosition: {x: 0.00038004026, y: 0.00013983398}
|
||||
m_SizeDelta: {x: 0, y: 1292.4}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &6944785608262845692
|
||||
@ -3377,7 +3377,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.00038004026, y: -0.00406069}
|
||||
m_AnchoredPosition: {x: 0.00038004026, y: -0.00003568369}
|
||||
m_SizeDelta: {x: 0, y: 1292.4}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &5343428874745105376
|
||||
|
@ -241,6 +241,7 @@ namespace GameLogic
|
||||
public string useClientData;
|
||||
public long exp;
|
||||
public long lv;
|
||||
public string campName; // 家族名称
|
||||
}
|
||||
|
||||
public class RoomInfoData
|
||||
|
@ -81,6 +81,7 @@ public class DataGameModelManager : GameBase.Singleton<DataGameModelManager>
|
||||
postPlayRankData.avatar = item.Value.protCustMessageData.imgURL;
|
||||
postPlayRankData.exp = item.Value.protCustMessageData.rankRo.exp;
|
||||
postPlayRankData.lv = item.Value.protCustMessageData.rankRo.lv;
|
||||
postPlayRankData.campName = DataGameSceneManager.Instance.GetStrs(int.Parse(item.Value.teamId) - 1);
|
||||
rankInfos.Add(postPlayRankData);
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ namespace GameLogic
|
||||
{
|
||||
if (!isJiaZuInit)
|
||||
{
|
||||
m_loopListView_JiaZuView.InitListView(m_PlayRankDatas.Count, OnGetItemByIndex);
|
||||
m_loopListView_JiaZuView.InitListView(m_PlayRankDatas.Count, OnGetItemByIndexJiaZu);
|
||||
isJiaZuInit = true;
|
||||
}
|
||||
m_loopListView_JiaZuView.SetListItemCount(m_PlayRankDatas.Count);
|
||||
@ -173,6 +173,7 @@ namespace GameLogic
|
||||
}
|
||||
|
||||
|
||||
// ÖÜÔÂ
|
||||
LoopListViewItem OnGetItemByIndex(LoopListView listView, int index)
|
||||
{
|
||||
if (index >= m_PlayRankDatas.Count)
|
||||
@ -186,7 +187,30 @@ namespace GameLogic
|
||||
}
|
||||
|
||||
|
||||
LoopListViewItem item = listView.AllocOrNewListViewItem("RankItem");
|
||||
LoopListViewItem item = listView.AllocOrNewListViewItem("m_itemRankItem");
|
||||
UIGameWorldRankItem itemScript = item.GetComponent<UIGameWorldRankItem>();
|
||||
|
||||
itemScript.OnInit(index, m_PlayRankDatas[index]);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
// ¼Ò×å
|
||||
LoopListViewItem OnGetItemByIndexJiaZu(LoopListView listView, int index)
|
||||
{
|
||||
if (index >= m_PlayRankDatas.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (m_PlayRankDatas[index] == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
LoopListViewItem item = listView.AllocOrNewListViewItem("m_itemRankItemJiaZu");
|
||||
UIGameWorldRankItem itemScript = item.GetComponent<UIGameWorldRankItem>();
|
||||
|
||||
itemScript.OnInit(index, m_PlayRankDatas[index]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user