完成房间动画类重构

This commit is contained in:
edwinQQQ
2025-01-16 16:00:12 +08:00
parent e2f022246f
commit f963f0ed81
3 changed files with 1336 additions and 74 deletions

View File

@@ -38,20 +38,22 @@
CGFloat height = kGetScaleWidth(70); CGFloat height = kGetScaleWidth(70);
PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attachment.data]; PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attachment.data];
GameUniversalBannerView *bannerView = [[GameUniversalBannerView alloc] initWithFrame:CGRectMake(KScreenWidth, 80, width, height)]; GameUniversalBannerView *bannerView = [[GameUniversalBannerView alloc] initWithFrame:CGRectMake(KScreenWidth, 0, width, height)];
bannerView.model = model; bannerView.model = model;
bannerView.completeDisplay = complete; bannerView.completeDisplay = complete;
bannerView.didTapGo = go; bannerView.didTapGo = go;
bannerView.gameID = model.skipContent; bannerView.gameID = model.skipContent;
[superView addSubview:bannerView]; [superView addSubview:bannerView];
// TODO: pop
@kWeakify(bannerView); @kWeakify(bannerView);
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
bannerView.center = CGPointMake(superView.center.x, height/2 + 80); bannerView.center = CGPointMake(superView.center.x, height/2 + 0);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
bannerView.frame = CGRectMake(-KScreenWidth, 80, width, height); bannerView.frame = CGRectMake(-KScreenWidth, 0, width, height);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
@kStrongify(bannerView); @kStrongify(bannerView);
[bannerView removeFromSuperview]; [bannerView removeFromSuperview];

File diff suppressed because it is too large Load Diff

View File

@@ -269,8 +269,9 @@ GiftAnimationDelegate>
return; return;
} }
if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广 if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广
///
// [self receiveBroadcastGift:attachment]; // [self receiveBroadcastGift:attachment];
[self receiveRoomGiftBanner:attachment]; // [self receiveRoomGiftBanner:attachment];
} else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP } else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP
[self receiveNobleLevelUp:attachment]; [self receiveNobleLevelUp:attachment];
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){ }else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
@@ -892,7 +893,6 @@ GiftAnimationDelegate>
[self createTreasureFairyBannerAnimation:giftModel]; [self createTreasureFairyBannerAnimation:giftModel];
} }
[self.animationListB addObject:giftModel]; [self.animationListB addObject:giftModel];
} }
- (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment { - (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment {
self.isPlayOfB = YES; self.isPlayOfB = YES;