游戏中各种状态的处理

This commit is contained in:
fengshuo
2022-02-15 17:59:05 +08:00
committed by chenguilong
parent 2d0e8e120a
commit d56f5845fc
9 changed files with 140 additions and 34 deletions

View File

@@ -285,11 +285,12 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
} else {
return;
}
if (!self.stageView.superview) {
[self.view insertSubview:self.stageView belowSubview:self.roomHeaderView];
}
if (self.roomInfo.type == RoomType_MiniGame) {
[self.stageView mas_remakeConstraints:^(MASConstraintMaker *make) {
@@ -712,6 +713,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self dismissViewControllerAnimated:YES completion:nil];
});
@@ -720,6 +722,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
} else {
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self dismissViewControllerAnimated:YES completion:nil];
}
@@ -743,6 +746,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self dismissViewControllerAnimated:YES completion:nil];
});
@@ -751,6 +755,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
} else {
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self dismissViewControllerAnimated:YES completion:nil];
}