我想检索最后得分,将其添加到我当前的游戏时间得分中。我尝试过使用
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)
}
})
}