15분 갱신 (테스트를 위해 기능 꺼둠)
This commit is contained in:
parent
96782161d0
commit
b134e6883e
|
|
@ -1,5 +1,6 @@
|
|||
using PlayFab.ProgressionModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class RankingUI_Rank : uScrollViewMgr
|
||||
{
|
||||
|
|
@ -8,24 +9,40 @@ public class RankingUI_Rank : uScrollViewMgr
|
|||
Dictionary<eDungeon, float> dic_RefreshTime = new Dictionary<eDungeon, float>();
|
||||
Dictionary<eDungeon, List<EntityLeaderboardEntry>> dic_ranks = new Dictionary<eDungeon, List<EntityLeaderboardEntry>>();
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
Act_Repeat_for1sec = () =>
|
||||
{
|
||||
var keys = dic_RefreshTime.Keys.ToArray();
|
||||
for (int i = 0; i < keys.Length; i++)
|
||||
{
|
||||
if (dic_RefreshTime[keys[i]] > 0f)
|
||||
dic_RefreshTime[keys[i]] -= 1f;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void Set(eDungeon dungeon)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
var leaderboard = MyValue.dic_Leaderboard[dungeon];
|
||||
ServerInfo.Ins.Get_Rank(leaderboard, rank100 =>
|
||||
//if (dic_RefreshTime[dungeon] <= 0f)
|
||||
{
|
||||
if (!dic_RefreshTime.ContainsKey(dungeon)) dic_RefreshTime.Add(dungeon, 0);
|
||||
dic_RefreshTime[dungeon] = 900;
|
||||
var leaderboard = MyValue.dic_Leaderboard[dungeon];
|
||||
ServerInfo.Ins.Get_Rank(leaderboard, rank100 =>
|
||||
{
|
||||
if (!dic_RefreshTime.ContainsKey(dungeon)) dic_RefreshTime.Add(dungeon, 0);
|
||||
dic_RefreshTime[dungeon] = 900;
|
||||
|
||||
if (!dic_ranks.ContainsKey(dungeon)) dic_ranks.Add(dungeon, null);
|
||||
dic_ranks[dungeon] = rank100;
|
||||
if (!dic_ranks.ContainsKey(dungeon)) dic_ranks.Add(dungeon, null);
|
||||
dic_ranks[dungeon] = rank100;
|
||||
|
||||
Set_ScrollView(dic_ranks[dungeon]);
|
||||
list_CardBase.ForEach(f => f.Set(MyEnumToInt.Ins.Get_Int(dungeon)));
|
||||
});
|
||||
Set_ScrollView(dic_ranks[dungeon]);
|
||||
list_CardBase.ForEach(f => f.Set(MyEnumToInt.Ins.Get_Int(dungeon)));
|
||||
});
|
||||
|
||||
ServerInfo.Ins.Get_MyRank(leaderboard, my => { myRank.Set(my); myRank.Set(MyEnumToInt.Ins.Get_Int(dungeon)); });
|
||||
ServerInfo.Ins.Get_MyRank(leaderboard, my => { myRank.Set(my); myRank.Set(MyEnumToInt.Ins.Get_Int(dungeon)); });
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue