超级礼物
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
#import "RoomHalfHourRankModel.h"
|
||||
#import "ClientConfig.h"
|
||||
///View
|
||||
#import "XPRoomGiftBannerView.h"
|
||||
|
||||
#import "XPRoomGiftBroadcastView.h"
|
||||
#import "XPRoomCandyGiftView.h"
|
||||
#import "XPRoomDatingAnimationView.h"
|
||||
@@ -1991,69 +1991,6 @@
|
||||
|
||||
[self createGiftBroadcastViewAnimation:receiveInfo];
|
||||
|
||||
// GiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo;
|
||||
// if (!giftInfo) {
|
||||
// giftInfo = [[XPGiftStorage shareStorage] findGiftInfo: receiveInfo.giftId];
|
||||
// }
|
||||
// NSInteger giftTotal = 0;
|
||||
// if (receiveInfo.targetUids.count > 0) {
|
||||
// giftTotal = receiveInfo.giftNum * giftInfo.goldPrice * receiveInfo.targetUids.count;
|
||||
// } else {
|
||||
// giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
|
||||
// }
|
||||
// if (giftTotal >= 520) {
|
||||
// self.isPlayOfA = YES;
|
||||
// __block XPRoomGiftBannerView *view = [self.bannerDequePool anyObject];
|
||||
// if (view == nil) {
|
||||
// view = [[XPRoomGiftBannerView alloc] init];
|
||||
// [self.bannerVisiablePool addObject:view];
|
||||
// }else{
|
||||
// [self.bannerDequePool removeObject:view];
|
||||
// }
|
||||
// [self removeGiftBannerView:view];
|
||||
// [view configGiftBanner:receiveInfo users:[self makeBannerUsers]];
|
||||
// view.frame = CGRectMake(KScreenWidth, 80, KScreenWidth, 153);
|
||||
// [self.highLevleView addSubview:view];
|
||||
// POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
// springAnimation.springSpeed = 12;
|
||||
// springAnimation.springBounciness = 10.f;
|
||||
// springAnimation.fromValue = [NSValue valueWithCGPoint:view.center];
|
||||
// springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(view.frame.size.width / 2, view.center.y)];
|
||||
// @kWeakify(self);
|
||||
// [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
// @kStrongify(self);
|
||||
// if (finished) {
|
||||
// [self removeAnimation:view];
|
||||
// }
|
||||
// }];
|
||||
//
|
||||
// [springAnimation setAnimationDidStartBlock:^(POPAnimation *anim) {
|
||||
// @kStrongify(self);
|
||||
//
|
||||
//// if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
|
||||
//// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
//// [self playGiftEffectWithVapUrl:giftInfo.viewUrl];
|
||||
//// }
|
||||
//// if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
|
||||
//// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
//// [self playGiftEffect:giftInfo.vggUrl];
|
||||
//// }
|
||||
// }];
|
||||
//
|
||||
// [view pop_addAnimation:springAnimation forKey:@"spingOutAnimation"];
|
||||
// } else {
|
||||
//
|
||||
//// if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && receiveInfo.viewUrl.length > 0) {//播放vap动效
|
||||
//// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
//// [self playGiftEffectWithVapUrl:receiveInfo.viewUrl];
|
||||
//// }
|
||||
//// if (receiveInfo.vggUrl.length > 0) {///如果有特效的话就播放特效
|
||||
////
|
||||
//// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
//// [self playGiftEffect:receiveInfo.vggUrl];
|
||||
//// }
|
||||
// [self.animationListA removeObjectAtIndex:0];
|
||||
// }
|
||||
}
|
||||
|
||||
- (void)largeGiftStopCarEffect:(double)goldPrice {
|
||||
@@ -2066,38 +2003,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
//移除特效动画
|
||||
- (void)removeAnimation:(XPRoomGiftBannerView *)view{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:view.center];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(view.center.x - KScreenWidth, view.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() +5;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
moveAnimation.completionBlock = ^(POPAnimation *anim, BOOL finished) {
|
||||
if(finished){
|
||||
[view removeFromSuperview];
|
||||
self.isPlayOfA = NO;
|
||||
if(self.animationListA.count > 0){
|
||||
[self.animationListA removeObjectAtIndex:0];
|
||||
}
|
||||
|
||||
|
||||
if(self.animationListB.count > 0){
|
||||
// self.isAnimationListAFinish = YES;
|
||||
[self playAnimationWithModel];
|
||||
return;
|
||||
}
|
||||
if(self.animationListA.count > 0 && self.isPlayOfB == NO && self.isPlayOfA == NO){
|
||||
[self createGiftBannerViewAnimation:self.animationListA.firstObject];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} ;
|
||||
[view pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
}
|
||||
|
||||
|
||||
- (NSArray<XPGiftBannerUserInfoModel *> *)makeBannerUsers {
|
||||
NSArray<MicroQueueModel *> * microArray = [self.delegate getMicroQueue].allValues;
|
||||
@@ -2378,16 +2284,7 @@
|
||||
}
|
||||
|
||||
|
||||
///移除横幅的veiw 添加到复用池中
|
||||
- (void)removeGiftBannerView:(XPRoomGiftBannerView *)view {
|
||||
[view removeFromSuperview];
|
||||
[view resetData];
|
||||
[self.bannerVisiablePool removeObject:view];
|
||||
[self.bannerDequePool addObject:view];
|
||||
///svga的处理
|
||||
[self.giftEffectView stopAnimation];
|
||||
self.giftEffectView.hidden = YES;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (void)svgaPlayerDidFinishedAnimation:(SVGAPlayer *)player {
|
||||
if (player == self.giftEffectView) {
|
||||
|
Reference in New Issue
Block a user