gamecircle.IsPlayerSignedIn()

类型 函数
gamecircle.*
返回值 布尔值
修订 版本 2024.3703
关键词 gamecircle,初始化,init

概述

当有效用户登录 GameCircle 时,此函数返回 true。在最新的基于 Amazon 的设备上,玩家通常始终处于登录状态,但对于其他平台,有时需要登录。大多数(如果不是全部)GameCircle 调用仍然可以在没有玩家登录的情况下运行,但在有玩家登录之前,不会与服务器发生任何交互。

语法

local result = gamecircle.IsPlayerSignedIn()

示例

local gamecircle = require("plugin.gamecircle")   
gamecircle.Init(true, false, true)  
local state = "startup"  
Runtime:addEventListener("enterFrame", Update)  
function Update()  
    if state == "startup" and gamecircle.IsReady() then 
        if gamecircle.IsPlayerSignedIn()
            --From this point on you can start using GameCircle functions for achievements, leaderboards, & Whispersync.  
            state = "play"  
        end
    end  
end