修复了大额礼物特效中断座驾动画的bug

This commit is contained in:
fengshuo
2022-08-24 11:33:15 +08:00
parent c111eadf00
commit dc916f815b

View File

@@ -1391,6 +1391,7 @@
self.isLargeGiftAnimating = YES; self.isLargeGiftAnimating = YES;
[self.carEffectView stopAnimation]; [self.carEffectView stopAnimation];
[self.carVapEffectView stopHWDMP4]; [self.carVapEffectView stopHWDMP4];
[self.carEffectQueue removeAllObjects];
} }
} }
@@ -1558,9 +1559,7 @@
} else if(player == self.carEffectView) { } else if(player == self.carEffectView) {
self.carEffectView.hidden = YES; self.carEffectView.hidden = YES;
[self.carEffectView removeFromSuperview]; [self.carEffectView removeFromSuperview];
if (self.isLargeGiftAnimating) { if (self.carEffectQueue.count > 0) {
[self.carEffectQueue removeAllObjects];
} else {
[self.carEffectQueue removeObjectAtIndex:0]; [self.carEffectQueue removeObjectAtIndex:0];
} }
if (self.carEffectQueue.count > 0) { if (self.carEffectQueue.count > 0) {
@@ -1599,9 +1598,7 @@
if (container == self.carVapEffectView) { if (container == self.carVapEffectView) {
[self.carVapEffectView removeFromSuperview]; [self.carVapEffectView removeFromSuperview];
self.carVapEffectView = nil; self.carVapEffectView = nil;
if (self.isLargeGiftAnimating) { if (self.carEffectQueue.count > 0) {
[self.carEffectQueue removeAllObjects];
} else {
[self.carEffectQueue removeObjectAtIndex:0]; [self.carEffectQueue removeObjectAtIndex:0];
} }
if (self.carEffectQueue.count > 0) { if (self.carEffectQueue.count > 0) {