赠送礼物给自己修改礼物结束动画为中间展示
This commit is contained in:
@@ -262,10 +262,11 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
|
||||
|
||||
Point senderPoint = micViewPoint.get(senderPosition);
|
||||
Point receivePoint = micViewPoint.get(receivePosition);
|
||||
//设置动画结束的位置
|
||||
if (receivePoint == null || isGameRoomMoreThan6People()) { //这种情况就是接收者已经不在麦上
|
||||
//礼物送到上面中间的位置
|
||||
receivePoint = new Point(UIUtil.getScreenWidth(context) / 2,
|
||||
UIUtil.dip2px(context, 35));
|
||||
receivePoint = new Point(UIUtil.getScreenWidth(context) / 2 - giftWidth / 2,
|
||||
UIUtil.getScreenHeight(context) / 2);
|
||||
}
|
||||
giftReceiveInfo.setGift(giftInfo);
|
||||
drawGiftView(senderPoint, receivePoint, giftReceiveInfo);
|
||||
@@ -733,6 +734,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
|
||||
final Point center = new Point();
|
||||
center.x = context.getResources().getDisplayMetrics().widthPixels / 2;
|
||||
center.y = context.getResources().getDisplayMetrics().heightPixels / 2;
|
||||
//设置开始播放动画的位置
|
||||
if (senderPoint == null || isGameRoomMoreThan6People()) {
|
||||
senderPoint = new Point(mScreenWidth / 2 - giftWidth / 2, UIUtil.dip2px(context, 25));
|
||||
}
|
||||
|
Reference in New Issue
Block a user