小游戏调试完成

This commit is contained in:
fengshuo
2022-02-15 14:38:09 +08:00
committed by chenguilong
parent 3a6e9d731b
commit 96d7e1ee80
8 changed files with 137 additions and 85 deletions

View File

@@ -44,6 +44,7 @@
#import "XPSendGiftView.h"
#import "XPUserCardViewController.h"
#import "XPRoomViewController.h"
#import "XPLittleGameMiniStageView.h"
@interface XPRoomFunctionContainerView ()<XPAcrpssRoomPKPanelViewDelegate>
///host
@property (nonatomic,weak) id<RoomHostDelegate>delegate;
@@ -63,6 +64,8 @@
@property (nonatomic,strong) UIButton *editButton;
///pk
@property (nonatomic,strong) XPAcrpssRoomPKPanelView *acrossPKPanelView;
///
@property (nonatomic,strong) XPLittleGameMiniStageView *littleGameMiniView;
@end
@implementation XPRoomFunctionContainerView
@@ -83,6 +86,11 @@
return self;
}
#pragma mark - Public Method
- (void)hiddenSudGamePostionView {
[self.littleGameMiniView hiddenSudGamePostionView];
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.contributionButton];
@@ -95,7 +103,7 @@
- (void)initSubViewConstraints {
[self.contributionButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(-12);
make.top.mas_equalTo(kNavigationHeight+4);
make.top.mas_equalTo(kNavigationHeight);
make.width.mas_equalTo(90);
make.height.mas_equalTo(26);
}];
@@ -112,6 +120,23 @@
}];
}
- (void)showLittleGameMiniView:(RoomType)type {
if (type == RoomType_MiniGame) {
if (!self.littleGameMiniView.superview) {
[self addSubview:self.littleGameMiniView];
[self.littleGameMiniView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(0);
make.top.mas_equalTo(kNavigationHeight);
make.height.mas_equalTo(23);
}];
}
} else {
if (self.littleGameMiniView.superview) {
[self.littleGameMiniView removeFromSuperview];
}
}
}
#pragma mark - RoomGuestDelegate
- (void)onRoomUpdate {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
@@ -201,8 +226,6 @@
}
} roomUid:roomUid];
}
if (roomInfo.type == RoomType_Anchor) {
[self.contributionButton setTitle:@"主播榜" forState:UIControlStateNormal];
self.anchorGiftValueView.hidden = !roomInfo.showGiftValue;
@@ -378,7 +401,6 @@
}
}
#pragma mark - XPAcrpssRoomPKPanelViewDelegate
- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view onlookRoom:(NSString *)roomUid {
[self.delegate exitRoom];
@@ -719,4 +741,13 @@
}
return _acrossPKPanelView;
}
- (XPLittleGameMiniStageView *)littleGameMiniView {
if (!_littleGameMiniView) {
_littleGameMiniView = [[XPLittleGameMiniStageView alloc] init];
}
return _littleGameMiniView;
}
@end