-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameCenterManager.h
More file actions
67 lines (58 loc) · 2.86 KB
/
GameCenterManager.h
File metadata and controls
67 lines (58 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// GameCenterManager.h
// UFOs
//
// Created by Kyle Richter on 1/25/11.
// Copyright 2011 Dragon Forged Software. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <GameKit/GameKit.h>
@protocol GameCenterManagerDelegate <NSObject>
@optional
- (void)processGameCenterAuthentication:(NSError*)error;
- (void)friendsFinishedLoading:(NSArray *)friends error:(NSError *)error;
- (void)playerDataLoaded:(NSArray *)players error:(NSError *)error;
- (void)scoreReported: (NSError*) error;
- (void)leaderboardUpdated: (NSArray *)scores error:(NSError *)error;
- (void)mappedPlayerIDToPlayer:(GKPlayer *)player error:(NSError *)error;
- (void)mappedPlayerIDsToPlayers:(NSArray *)players error:(NSError *)error;
- (void)localPlayerScore:(GKScore *)score error:(NSError *)error;
- (void)achievementSubmitted:(GKAchievement *)achievement error:(NSError *)error;
- (void)achievementEarned:(GKAchievementDescription *)achievement;
- (void)achievementDescriptionsLoaded:(NSArray *)descriptions error:(NSError *)error;
- (void)playerActivity:(NSNumber *)activity error:(NSError *)error;
- (void)playerActivityForGroup:(NSDictionary *)activityDict error:(NSError *)error;
@end
@interface GameCenterManager : NSObject <GameCenterManagerDelegate>
{
id <GameCenterManagerDelegate, NSObject> delegate;
NSMutableDictionary* earnedAchievementCache;
}
@property(nonatomic, retain) id <GameCenterManagerDelegate, NSObject> delegate;
@property(nonatomic, retain) NSMutableDictionary* earnedAchievementCache;
+ (BOOL)isGameCenterAvailable;
- (void)authenticateLocalUser;
- (void)callDelegateOnMainThread:(SEL)selector withArg:(id) arg error:(NSError*) err;
- (void)callDelegate:(SEL)selector withArg:(id)arg error:(NSError*) err;
- (void)retrieveFriendsList;
- (void)playersForIDs:(NSArray *)playerIDs;
- (void)playerforID:(NSString *)playerID;
- (void)reportScore: (int64_t) score forCategory: (NSString*) category;
- (void)storeScoreForLater:(NSData *)scoreData;
- (void)submitAllSavedScores;
- (void)retrieveScoresForCategory:(NSString *)category withPlayerScope:(GKLeaderboardPlayerScope)playerScope timeScope:(GKLeaderboardTimeScope)timeScope withRange: (NSRange)range;
- (void)mapPlayerIDtoPlayer:(NSString*)playerID;
- (void)mapPlayerIDstoPlayers:(NSArray*)playerIDs;
- (void)retrieveLocalScoreForCategory:(NSString *)category;
- (void)submitAchievement:(NSString*)identifier percentComplete:(double)percentComplete;
- (double)percentageCompleteOfAchievementWithIdentifier:(NSString *)identifier;
- (BOOL)achievementWithIdentifierIsComplete:(NSString *)identifier;
- (void)populateAchievementCache;
- (void)resetAchievements;
- (void)retrieveAchievmentMetadata;
- (void)storeAchievementToSubmitLater:(GKAchievement *)achievement;
- (void)submitAllSavedAchievements;
- (void)setupInvitationHandler:(id)inivationHandler;
- (void)findActivityForPlayerGroup:(NSUInteger)playerGroup;
- (void)findAllActivity;
@end