SProfile
客户端玩家
在此类中Authorize
成员 3
| 函数 | Authorize | Requests access to profile functions, must be called prior to attempting to access profile. |
| 函数 | LoadProfile | Load the profile of player |
| 属性 | ActivePlayerProfile | – |
函数
Authorize
void Authorize(Closure onAuthorized = null, Closure onRejected = null)
void Authorize(Action onAuthorized = null, Action onRejected = null)
Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| onAuthorized | Closure | null |
| onRejected | Closure | null |
| onAuthorized | Action | null |
| onRejected | Action | null |
返回值
void
示例
Lua
Space.Profile.Authorize()
--or
Space.Profile.Authorize(AnOnAuthorizeFunction)
--or
Space.Profile.Authorize(AnOnAuthorizeFunction, AnOnRejectedFuncton)
LoadProfile
void LoadProfile(Closure onFinished)
Load the profile of player
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| onFinished | Callback Function | onFinished(SUserProfile) is called once profile is loaded |
返回值
void
示例
Lua
function onFinished(SUserProfile)
--
end
Space.Profile.LoadProfile(onFinished)
属性
ActivePlayerProfile只读
示例
Lua
Space.Profile.ActivePlayerProfile



