// // 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, } ComboActionType; typedef enum : NSUInteger { ComboFlagAction_, // ComboAction_RemovePanel, // ComboAction_Combo_Count_Update, } ComboFlagActionType; NS_ASSUME_NONNULL_BEGIN @interface GiftComboManager : NSObject // 单例方法 + (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; - (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; @end NS_ASSUME_NONNULL_END