diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m index 0657ac93..33c34f9f 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m @@ -43,11 +43,11 @@ @property (nonatomic, assign) LittleGamePlayStatus sudGameStatus; @property(nonatomic,strong) NSMutableArray *userList; + @end + @implementation MSRoomGameView - - #pragma mark - Private Method - (void)updateSudGame { if(self.currentmgId == self.gameModel.data.mgId.integerValue)return; @@ -78,7 +78,10 @@ if(isEnterprise == NO){ [[SudMGP getCfg]setBackgroundMode:NO]; } - [SudMGP initSDK:KeyWithType(KeyType_SudGameAppID) appKey:KeyWithType(KeyType_SudGameAppKey) isTestEnv:isTestEnv listener:^(int retCode, const NSString *retMsg) { + [SudMGP initSDK:KeyWithType(KeyType_SudGameAppID) + appKey:KeyWithType(KeyType_SudGameAppKey) + isTestEnv:isTestEnv + listener:^(int retCode, const NSString *retMsg) { if (retCode == 0) { if (!self.currentmgId) { return; @@ -86,7 +89,6 @@ NSString * userId = [AccountInfoStorage instance].getUid; NSString * roomId = self.gameModel.roomId; NSLog(@"用户ID:%@,房间ID:%@, 游戏ID:%lld, code:%@", userId, roomId, self.currentmgId, self.code); -// NSString *language = [NSBundle getLanguageText]; if ([language hasPrefix:@"zh"]) { @@ -99,11 +101,6 @@ language = @"en-US"; // 英文 } self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:language fsmMG:self rootView:self]; - - - - - } else { /// 初始化失败, 可根据业务重试 NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@",retMsg); @@ -142,9 +139,6 @@ return [extModel model2dictionary]; } - - - ///下麦 - (void)onDownMic:(NSInteger)uid { if (uid == [AccountInfoStorage instance].getUid.integerValue) {//自己下麦 @@ -176,7 +170,6 @@ NSLog(@"ISudFSMMG:onGameStarted:游戏开始"); [self notifySelfInState:YES seatIndex:-1];///加入房间 [self handleSelfReadyEvent];///准备游戏 - } /** @@ -603,32 +596,28 @@ /// 销毁MG - (void)destroyMG { - - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [self.fsmAPP2MG destroyMG]; - }); - + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.fsmAPP2MG destroyMG]; + }); } #pragma mark - RoomGuestDelegate - (void)onRoomEntered { - [self updateSudGame]; } - (void)onRoomUpdate { - [self.fsmAPP2MG destroyMG]; [self updateSudGame]; } + #pragma mark - RoomGuestDelegate - (void)handleNIMCustomMessage:(NIMMessage *)message { } - (void)handleNIMNotificationMessage:(NIMMessage *)message { - NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content; switch (content.eventType) { @@ -659,4 +648,9 @@ } return _userList; } + +- (BOOL)isInSudGame { + return YES; +} + @end diff --git a/YuMi/en.lproj/Localizable.strings b/YuMi/en.lproj/Localizable.strings index 35330458..b5be06ce 100644 --- a/YuMi/en.lproj/Localizable.strings +++ b/YuMi/en.lproj/Localizable.strings @@ -268,7 +268,7 @@ "XPMonentsMineViewController2" = "Blocked successfully"; -"XPMonentsViewController1" = "Follow"; +"XPMonentsViewController1" = "Following"; "XPMonentsViewController2" = "Recommend"; "XPMonentsViewController3" = "Latest"; @@ -674,12 +674,12 @@ "XPDressUpShopCardViewController11" = "No nameplates temporarily"; "XPDressUpShopCardViewController12" = "No vehicles temporarily"; -"XPMineDressUpViewController0" = "My Dress Up"; -"XPMineDressUpViewController1" = "Headwear"; -"XPMineDressUpViewController2" = "Vehicle"; +"XPMineDressUpViewController0" = "My Item"; +"XPMineDressUpViewController1" = "Avatar Frame"; +"XPMineDressUpViewController2" = "Mount"; "XPMineDressUpViewController3" = "Nameplate"; -"XPMineDressUpViewController4" = "Information Card"; -"XPMineDressUpViewController5" = "Chat Bubbles"; +"XPMineDressUpViewController4" = "Profile Card"; +"XPMineDressUpViewController5" = "Chat Bubble"; "XPMineDressUpViewController6" = "Cancel using headwear successfully"; "XPMineDressUpViewController7" = "Cancel using vehicle successfully"; "XPMineDressUpViewController8" = "Cancel using nameplate successfully"; @@ -694,7 +694,7 @@ "XPMineDressUpListViewController12" = "Dear user, you don't have any vehicles yet!"; "XPDressUpShopViewController0" = "My Dress Up"; -"XPDressUpShopViewController1" = "Dress Up Shop"; +"XPDressUpShopViewController1" = "Mall"; "XPDressUpShopViewController6" = "Chat Bubbles"; "XPDressUpShopViewController7" = "My Coins"; "XPDressUpShopViewController8" = "Recharge"; @@ -2210,10 +2210,6 @@ "XPMonentsMineViewController2" = "Blocked successfully"; -"XPMonentsViewController1" = "Follow"; -"XPMonentsViewController2" = "Recommend"; - - "XPMonentsRecommendHeaderView0" = "Recommended Topics"; ///XPMonentsContentView.m