// // GiftComboManager.h // YuMi // // Created by P on 2024/9/5. // #import #import "GiftInfoModel.h" #import "GiftComboView.h" @class GiftReceiveInfoModel, UserInfoModel, GiftReceiveInfoModel, XPGiftCountModel; typedef enum : NSUInteger { ComboAction_ShowPanel, ComboAction_RemovePanel, ComboAction_Error, ComboAction_Combo_Count_Update, ComboAction_Update_After_Send_Success, ComboAction_SendGift_Gold_Update } ComboActionType; typedef enum : NSUInteger { ComboFlagAction_, // ComboAction_RemovePanel, // ComboAction_Combo_Count_Update, } ComboFlagActionType; // 通知常量定义 UIKIT_EXTERN NSString * const kBoomStateForceResetNotification; NS_ASSUME_NONNULL_BEGIN @interface GiftComboManager : NSObject @property (nonatomic, assign, readonly) BOOL enableCombo; //@property(nonatomic, strong, nullable) GiftComboView *comboView; @property (nonatomic, strong) GiftReceiveInfoModel *sendGiftReceiveInfo; @property(nonatomic, copy) void(^handleComboSuccess)(GiftReceiveInfoModel *receiveModel, NSMutableDictionary *originDic); @property(nonatomic, copy) void(^handleRoomUIChanged)(BOOL comboViewDisplay); // 单例方法 + (instancetype)sharedManager; - (void)registerActions:(void(^ _Nullable)(ComboActionType type))action; - (void)enableToCombo:(BOOL)enable; - (void)saveSendGiftTo:(NSArray *)UIDs; - (void)saveGiftSourceType:(GiftSourceType)type; - (void)saveSendGiftInfo:(GiftInfoModel *)model; - (void)saveSendGiftType:(RoomSendGiftType)type; - (void)saveRoomUID:(NSString *)roomUID; - (void)saveSendGiftNum:(NSString *)numString; - (void)saveUserInfo:(UserInfoModel *)userInfo; - (void)saveSessionID:(NSString *)sessionID; - (void)saveGiftCountModel:(XPGiftCountModel *)model; - (void)resetCombo; - (void)sendGift; - (void)forceRemove; - (void)forceBoomStateReset; - (BOOL)loadEnable; // 第一个 combo 由 send gift view 发起,需要手动 combo + 1 - (NSInteger)loadComboCountFromSendGiftView; - (NSInteger)loadComboCount; - (NSInteger)loadTotalGiftNum; - (BOOL)isGiftCombing; - (NSString *)loadErrorMessage; - (void)receiveGiftInfoForDisplayComboFlags:(GiftReceiveInfoModel *)receiveInfo container:(UIView *)container; - (void)removeComboFlag; @end NS_ASSUME_NONNULL_END