类型 表 库 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 Scores request returned with error message: " .. returnValue.errorMessage)
else
print("Leaderboard information recieved!")
print("-num" .. returnValue.num)
for i, leaderboard in ipairs(returnValue) do
print("-Leaderboard ID" .. leaderboard.id)
print("--name" .. leaderboard.name)
print("--displayText" .. leaderboard.displayText)
print("--scoreFormat" .. leaderboard.scoreFormat)
print("--imageURL" .. leaderboard.imageURL)
print("--imageURL may be blank, as warned by Amazon's SDK documentation, when propegated outside basic GetLeaderboard function")
end
end
end
gamecircle.Leaderboard.GetLeaderboards(LeaderboardCallback)