| | |
| | | static NSString* sUserName; |
| | | static NSThread* _thread; |
| | | |
| | | static int initedState=0; //初始化状态,0初始化中,1成功,2失败 |
| | | static int initedState=0; //初始化状态,0初始化中,1成功,2未登录(因为ios在sdk登录成功 游戏还没初始化好无法处理逻辑,所以不能在1处理登录) |
| | | |
| | | static NSString * const kClientID = @"468442318367-ocoqrm0kei0gpkrnnq1ql628v4g4dbqd.apps.googleusercontent.com"; |
| | | |
| | |
| | | NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: |
| | | [NSNumber numberWithInt:S2U_DelAccount], @"code", nil]; |
| | | [self SendMessageToUnity:_dict]; |
| | | initedState=2; |
| | | } |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | NSLog(@"渠道登录失败"); |
| | | initedState=2; |
| | | } |
| | | } |
| | | |
| | |
| | | NSLog(@"渠道注销成功"); |
| | | NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil]; |
| | | [self SendMessageToUnity:_dict]; |
| | | initedState=2; |
| | | } |
| | | |
| | | - (void)sohaDidPurchaseFailed:(SohaTransaction *)transaction purchaseError:(NSString *)error { |
| | |
| | | case 0: |
| | | break; |
| | | case 1: |
| | | [Soha sohaLoginSDK]; |
| | | break; |
| | | case 2: |
| | | //ios特殊处理,sdk初始化比游戏快,导致游戏的sdk初始化值为false 需要在未登录处理 |
| | | [Soha sohaLoginSDK]; |
| | | break; |
| | | default: |
| | | break; |