GKAchievement.ReportAchievements 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ReportAchievements(GKAchievement[], GKChallenge[], Action<NSError>) |
向 Game Center 報告提供的成就和比對挑戰,然後使用錯誤物件呼叫 |
ReportAchievements(GKAchievement[], Action<NSError>) |
向 Game Center 報告提供的成就,然後使用錯誤物件呼叫 |
ReportAchievements(GKAchievement[], GKChallenge[], Action<NSError>)
向 Game Center 報告提供的成就和比對挑戰,然後使用錯誤物件呼叫 completionHandler
,如果未發生錯誤, null
則為 。
[Foundation.Export("reportAchievements:withEligibleChallenges:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, GameKit.GKChallenge[] challenges, Action<Foundation.NSError> completionHandler);
static member ReportAchievements : GameKit.GKAchievement[] * GameKit.GKChallenge[] * Action<Foundation.NSError> -> unit
參數
- achievements
- GKAchievement[]
向 Game Center 回報的成就。
- 屬性
備註
完成處理常式只會在所有快取張貼到 Game Center 之後叫用一次。
適用於
ReportAchievements(GKAchievement[], Action<NSError>)
向 Game Center 報告提供的成就,然後使用錯誤物件呼叫 completionHandler
,如果未發生任何錯誤, null
則為 。
[Foundation.Export("reportAchievements:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, Action<Foundation.NSError> completionHandler);
[Foundation.Export("reportAchievements:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 8, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, Action<Foundation.NSError> completionHandler);
static member ReportAchievements : GameKit.GKAchievement[] * Action<Foundation.NSError> -> unit
參數
- achievements
- GKAchievement[]
- 屬性