在我的游戏中,我可以显示GlobalRank,但是,我也想根据全局结果显示玩家在Ranking中的位置。
因此,在底线,应该有本地(在这个设备上)的结果。
基本上,在左下角,我想从LootLocker获得排名,但我正在努力获得排名...
IEnumerator ShowScores()
{
yield return new WaitForSeconds(2);
LootLockerSDKManager.GetScoreList(ID, maxScores, (response) =>
{
if (response.success)
{
LootLockerLeaderboardMember[] scores = response.items;
for (int i = 0; i < scores.Length; i++)
{
playerNames[i].text = (scores[i].member_id +"");
playerScores[i].text = (scores[i].score +"");
playerRank[i].text = (scores[i].rank + "");
//Rank of the localPlayer
Rank.text = (scores["here_Should_Be_This_Player_ID"].rank + "");
LootLockerSDKManager.GetPlayerName
// Entries[i].text = (scores[i].rank + ". " + scores[i].score + ". " + scores[i].member_id);
}
if (scores.Length < maxScores)
{
for (int i = scores.Length; i < maxScores; i++)
{
// Entries[i].text = (i + 1).ToString() + ". none";
}
}
}
else
{
}
});
}
1条答案
按热度按时间hmae6n7t1#
通过LootLocker支持团队修复了此问题步骤1 -加载LootLocker并获得响应步骤2 -加载排名并获得响应2步骤3 -使用来自LootLocker的“Response2.rank
等级文本=(响应2.等级+“”);