| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | ////  GameCenterManager.h//  gameCenterDemo////  Created by 蒋龙 on 2020/7/1.//  Copyright © 2020 com.youloft.cq. All rights reserved.//#import <Foundation/Foundation.h>NS_ASSUME_NONNULL_BEGIN@protocol GameCenterManagerDelegate <NSObject>@optional/// 登录GameCenter回调/// @param msgDic 回调字典-(void)loginGameCenterDidCompleteWithDic:(NSDictionary *)msgDic;/// 上传分数回调/// @param msgDic 回调字典-(void)uploadHighScoreDidCompleteWithDic:(NSDictionary *)msgDic;/// 下载GameCenter 某一排行榜中的分数及排名情况回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典-(void)downLoadHighScoreDidCompleteWithDic:(NSDictionary *)msgDic;/// 系统排行榜页面被关闭-(void)systomGameCenterDidClose;/// 上传存档回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典-(void)upLoadArchiveDidCompleteWithDic:(NSDictionary *)msgDic;/// 下载全部存档回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典-(void)downLoadArchiveDidCompleteWithDic:(NSDictionary *)msgDic;/// 下载单个存档回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典/// @param archiveName 存档名称-(void)downLoadOneArchiveDidCompleteWithDic:(NSDictionary *)msgDic archiveName:(NSString *)archiveName;/// 删除存档回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典-(void)deleteArchiveDidCompleteWithDic:(NSDictionary *)msgDic;/// 解决存档冲突回调,code参数来判定状态,为200表示登录成功,非200 登录失败/// @param msgDic 回调字典-(void)resolveConflictingOfArchiveDidCompleteWithDic:(NSDictionary *)msgDic;@end@interface GameCenterManager : NSObject/// 回调协议@property (nonatomic, weak) id<GameCenterManagerDelegate> delegate;+ (instancetype)shareM;///登录 验证授权-(void)authPlayer;///显示排行榜 可以跳转到自定的 game 排行榜 和 跳转到那个时间段- (void)ShowSystomGameCenterWithLeaderboardId:(nullable NSString *)leaderboardId time:(int)timeType;//下载本人 game center 某一排行榜中的分数信息- (void)downLoadHighScoreWithTime:(int)timeType leaderboardId:(NSString *)leaderboardId;///获取排行榜信息 下载game center 某一排行榜中的分数及排名情况- (void)downLoadHighScoreWithTime:(int)timeType leaderboardId:(NSString *)leaderboardId count:(int)count;///上传最高分至对应排行榜-(void)saveHighScoreWithLeaderboardId:(NSString *)leaderboardId score:(long long)score;///上传存档至GameCenter-(void)uploadAcriveWithDataStr:(NSString *)dataStr name:(NSString *)name;///下载所有存档-(void)fetchAllSavedGames;/// 下载单个存档/// @param name 存档名称-(void)loadSaveData:(NSString *)name;///删除存档-(void)deleteSavedGamesWithName:(NSString *)name;///解决存档冲突-(void)resolveConflictingSavedGames:(NSString *)dataStr name:(NSString *)name;@endNS_ASSUME_NONNULL_END
 |