Files
peko-ios/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboManager.h

82 lines
2.3 KiB
C
Raw Normal View History

//
// GiftComboManager.h
// YuMi
//
// Created by P on 2024/9/5.
//
#import <Foundation/Foundation.h>
#import "GiftInfoModel.h"
#import "GiftComboView.h"
2024-09-12 14:01:12 +08:00
@class GiftReceiveInfoModel, UserInfoModel, GiftReceiveInfoModel, XPGiftCountModel;
typedef enum : NSUInteger {
ComboAction_ShowPanel,
ComboAction_RemovePanel,
2024-09-12 18:49:42 +08:00
ComboAction_Error,
ComboAction_Combo_Count_Update,
2024-12-04 21:22:38 +08:00
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
2024-12-04 21:22:38 +08:00
@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);
2024-12-04 21:22:38 +08:00
@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;
2024-09-12 14:01:12 +08:00
- (void)saveGiftCountModel:(XPGiftCountModel *)model;
- (void)resetCombo;
- (void)sendGift;
- (void)forceRemove;
- (void)forceBoomStateReset;
- (BOOL)loadEnable;
2024-09-12 14:01:12 +08:00
// 第一个 combo 由 send gift view 发起,需要手动 combo + 1
- (NSInteger)loadComboCountFromSendGiftView;
- (NSInteger)loadComboCount;
2024-09-12 14:01:12 +08:00
- (NSInteger)loadTotalGiftNum;
- (BOOL)isGiftCombing;
2024-09-12 18:49:42 +08:00
- (NSString *)loadErrorMessage;
- (void)receiveGiftInfoForDisplayComboFlags:(GiftReceiveInfoModel *)receiveInfo
2025-01-15 19:02:58 +08:00
container:(UIView *)container;
- (void)removeComboFlag;
@end
NS_ASSUME_NONNULL_END