public int GetCurrentPlayerRank(UM_Leaderboard leaderboard) { switch (Application.platform) { case RuntimePlatform.IPhonePlayer: GCLeaderBoard board = GameCenterManager.GetLeaderBoard(leaderboard.IOSId); if (board != null) { return(board.GetCurrentPlayerScore(GCBoardTimeSpan.ALL_TIME, GCCollectionType.GLOBAL).rank); } else { return(0); } case RuntimePlatform.Android: GPLeaderBoard gBoard = GooglePlayManager.instance.GetLeaderBoard(leaderboard.AndroidId); if (gBoard != null) { return(gBoard.GetCurrentPlayerScore(GPBoardTimeSpan.ALL_TIME, GPCollectionType.GLOBAL).rank); } else { return(0); } } return(0); }
private void OnScoresListLoaded(ISN_Result res) { if (res.IsSucceeded) { Debug.Log("Scores loaded"); loadedLeaderBoard = GameCenterManager.GetLeaderBoard(leaderBoardId); } else { Debug.Log("Failed to load scores"); } }
private void OnScoreListLoaded() { Debug.Log("Scores loaded"); loadedLeaderBoard = GameCenterManager.GetLeaderBoard(leaderBoardId); }