1

我想检索最后一个分数以将其添加到我当前的播放时间分数中。我试过使用

delegate.onLocalPlayerScoreReceived(leaderboardRequest.localPlayerScore)

但它不起作用。我在这部分有一个错误,说未解析的标识符委托

let leaderboardRequest = GKLeaderboard() as GKLeaderboard!
if leaderboardRequest != nil
{
    leaderboardRequest.loadScoresWithCompletionHandler({ (scores:[AnyObject]!, error:NSError!) -> Void in
        if error != nil
        {
            //handle error
        }
        else
        {
            delegate.onLocalPlayerScoreReceived(leaderboardRequest.localPlayerScore)
        }
    })
}
4

0 回答 0