랭킹 받아오기

This commit is contained in:
Ino 2025-01-29 08:07:36 +09:00
parent 16b5bc2b42
commit 84bb7b1e26
2 changed files with 13 additions and 1 deletions

View File

@ -484,12 +484,22 @@ public class ServerInfo : MyCoroutine
{ {
NetWait.Ins.Set(true); NetWait.Ins.Set(true);
PlayFabProgressionAPI.GetLeaderboardAroundEntity(new GetLeaderboardAroundEntityRequest PlayFabProgressionAPI.GetLeaderboardAroundEntity(new GetLeaderboardAroundEntityRequest
{ LeaderboardName = leaderboard, MaxSurroundingEntries = 1 }, { LeaderboardName = leaderboard, MaxSurroundingEntries = 1,
Entity = new PlayFab.ProgressionModels.EntityKey { Id = m_LoginInfo.PlayFabId, Type = "title_player_account" } },
result => result =>
{ {
NetWait.Ins.Set(false); NetWait.Ins.Set(false);
if (!DSUtil.CheckNull(result) && result.Rankings.Count > 0) if (!DSUtil.CheckNull(result) && result.Rankings.Count > 0)
{ {
for (int i = 0; i < result.Rankings.Count; i++)
{
var temp = result.Rankings[i];
if (temp.Entity.Id.Equals(m_LoginInfo.PlayFabId))
{
my(temp);
break;
}
}
} }
else else
{ {
@ -512,6 +522,7 @@ public class ServerInfo : MyCoroutine
NetWait.Ins.Set(false); NetWait.Ins.Set(false);
if (!DSUtil.CheckNull(result) && result.Rankings.Count > 0) if (!DSUtil.CheckNull(result) && result.Rankings.Count > 0)
{ {
_act100?.Invoke(result.Rankings);
} }
else else
{ {

View File

@ -69,6 +69,7 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr
case eDungeon.d2_Maze: case eDungeon.d2_Maze:
SelectLv = Mathf.Max(1, SelectLv - 1); SelectLv = Mathf.Max(1, SelectLv - 1);
texts_maze[0].text = texts_maze[1].text = ""; texts_maze[0].text = texts_maze[1].text = "";
ServerInfo.Ins.Get_Rank("Rank_Maze", rank100 => { });
ServerInfo.Ins.Get_MyRank("Rank_Maze", my => ServerInfo.Ins.Get_MyRank("Rank_Maze", my =>
{ {
if (DSUtil.CheckNull(my)) if (DSUtil.CheckNull(my))