2011-04-27 115 views
1

我在我的遊戲中融入遊戲中心......它的工作很好,但我現在有我新的問題:P 只有一個分數是提交的用戶..之後,沒有得分,甚至提交其更大然後張貼分數或更少... 任何想法,我有什麼確切地鬥... 問候 Haseeb遊戲中心得分提交問題

回答

1

我用這個來提交分數......是確保遊戲中心後即可獲得。 ..

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; 

    GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:gameCenterCategory] autorelease]; 

    int64_t score1 =socre; 
    scoreReporter.value = score1; 
    [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { 
     if (error != nil) { 
      NSLog(@"Submit failed"); 
     } 
     else { 
      NSLog(@"Score Submited"); 
     } 
    }]; 

    [pool release]; 
+0

.. 我被選中worng選項來顯示在遊戲中心設置的分數..我被選中顯示最低分第一..現在我已經改變dat選項現在它的工作很好.. tahnx到你的男人... 可以幫助我在那個問題... http://stackoverflow.com /問題/ 5803522/iphone-如何-DO-顯示排行榜屏功能於我,自己的遊戲開發功能於cocos2d中 – 2011-04-27 11:47:56

+0

是.....創建排行榜當u必須選擇的選項 – Rony 2011-04-27 11:55:54