新增 GiftComboManager 及相关模块的重构,优化了连击功能的接口,建立了清晰的分层架构,统一了并发模型,提升了可维护性和可测试性。同时,新增了 GiftComboConfig、GiftComboTransport 和 GiftComboUIAdapter 模块,简化了接口并提供了更好的错误处理机制,确保向后兼容性。

This commit is contained in:
edwinQQQ
2025-08-18 16:24:45 +08:00
parent 79f6f45bc1
commit 9688e4413b
11 changed files with 818 additions and 37 deletions

View File

@@ -121,14 +121,26 @@
- (void)handleTapNotification:(NSNotification *)note {
NSValue *value = note.userInfo[@"point"];
CGPoint point = [value CGPointValue];
// banner
CGPoint screenPoint = [self convertPoint:point toView:nil];
// FunctionContainer
[[NSNotificationCenter defaultCenter] postNotificationName:@"BannerTapToFunctionContainer"
object:nil
userInfo:@{@"point": [NSValue valueWithCGPoint:screenPoint]}];
NSLog(@"🔄 RoomHighValueGiftBannerAnimation: 接收到点击点 %@ (bannerContainer坐标系)", NSStringFromCGPoint(point));
// bannerContainer GameUniversalBannerView
CGPoint bannerPoint = [self convertPoint:point fromView:self.superview];
NSLog(@"🔄 RoomHighValueGiftBannerAnimation: 转换为 banner 坐标系 %@", NSStringFromCGPoint(bannerPoint));
NSLog(@"%@", CGRectContainsPoint(self.goButton.frame, bannerPoint) ? @"YES" : @"NO");
// go
CGPoint goButtonPoint = [self.goButton convertPoint:bannerPoint fromView:self];
if ([self.goButton pointInside:goButtonPoint withEvent:nil]) {
NSLog(@"🎯 RoomHighValueGiftBannerAnimation: tap 点与 go 按钮重合,触发游戏跳转事件");
[self handleTapGo];
} else {
CGPoint screenPoint = [self convertPoint:point toView:nil];
// FunctionContainer
[[NSNotificationCenter defaultCenter] postNotificationName:@"BannerTapToFunctionContainer"
object:nil
userInfo:@{@"point": [NSValue valueWithCGPoint:screenPoint]}];
}
}
- (void)addNotification {