类型 表格 库 gamecircle.* 修订版 发布 2024.3703 关键字 成就
GameCircle SDK 为某些函数返回的统计百分位数数据的表示形式。
local leaderboardId = "myFirstLeaderboard" local gamecircle = require("plugin.gamecircle") gamecircle.Init(false, true, false) function LeaderboardCallback(returnValue) if returnValue.isError == true then print("Get Percentile request returned with error message: " .. returnValue.errorMessage) else print("Percentile information returned for leaderboard " .. returnValue.leaderboard.name) print("The local user's index in the list is : " .. returnValue.userIndex) print("-(-1 means user is not on leaderboard)") print("Here is the statistical information:") for i,stat in ipairs(returnValue) do print("#" .. i .. " " .. stat.playerAlias .. "-" .. stat.playerScore .. "-" .. percentile) end end end gamecircle.Leaderboard.GetPercentileRanks(leaderboardId, "GLOBAL_WEEK", LeaderboardCallback)