public static void RequestGameLeaderboard(GameSystem.Mode mode, GameSystem.ModeType modeType, MonoBehaviour target, KTPlayLeaderboard.Callback callback, int startIndex = 0) { if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { string leaderboardId = LeaderboardIDs[(int)mode][(int)modeType]; Debug.Log("request leaderboard ID of game:" + leaderboardId); KTPlayLeaderboard.GlobalLeaderboard(leaderboardId, startIndex, Constant.TOP_RANK_COUNT, target, callback); } }
public static void ReportScore(GameSystem.Mode mode, GameSystem.ModeType modeType, int score) { if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { if (KTAccountManager.IsLoggedIn()) { string leaderboardId = LeaderboardIDs[(int)mode][(int)modeType]; KTPlayLeaderboard.ReportScore(score, leaderboardId, LeaderboardTarget, LeaderboardCallback); } } }