gamecircle.GetLocalPlayerProfile()

类型 函数
gamecircle.*
返回值
修订版本 版本 2024.3703
关键词 gamecircle,玩家,档案

概述

此函数允许您获取当前使用 Amazon 服务登录的玩家的信息。

语法

gamecircle.GetLocalPlayerPrifle(callback)
callback (必填)

函数 传递给回调函数,因为该请求需要 GameCircle SDK 与 Amazon 的服务器联系。回调函数将接收一个 [PlayerProfileReturn][gamecircle.PlayerProfileReturn] 类型的参数。

示例

local gamecircle = require("plugin.gamecircle")  
gamecircle.Init(true, false, true)  
function PlayerProfileCallback(returnValue)  
    if returnValue.isError == true then  
        print("Player Profile returned with error message: " .. returnValue.errorMessage)  
    else  
        print("PLayer Profile return with this info: " .. returnValue.player.alias .. "-" .. returnValue.player.id)  
    end  
end  
gamecircle.GetLocalPlayerProfile(PlayerProfileCallback)