商店包版本修改 此commit置顶 1.0.3

This commit is contained in:
liyuhua
2024-03-23 21:08:26 +08:00
parent cf2eeb9a00
commit 7e299b9212
3 changed files with 44 additions and 40 deletions

View File

@@ -43,7 +43,7 @@
CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation]; CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation];
animation3.duration = 0.8; animation3.duration = 0.8;
animation3.beginTime = 2.6;//0.8+0.8+1 animation3.beginTime = 2.6;
animation3.keyPath = @"transform.scale"; animation3.keyPath = @"transform.scale";
animation3.values = @[@3,@2.5,@2,@1.5,@1]; animation3.values = @[@3,@2.5,@2,@1.5,@1];
animation3.repeatCount = 1; animation3.repeatCount = 1;

View File

@@ -332,50 +332,53 @@ extension RoomVC : NIMChatManagerDelegate, NIMChatroomManagerDelegate, NIMLoginM
}else if msg.messageType == .custom{ }else if msg.messageType == .custom{
chatScreenView.dealWithCustomMsg(msg: msg) chatScreenView.dealWithCustomMsg(msg: msg)
roomEffectView.dealWithCustomMsg(msg: msg) roomEffectView.dealWithCustomMsg(msg: msg)
if let obj = msg.messageObject as? NIMCustomObject,let customObj = obj.attachment as? ChatCustomMsgModel{ startPlayAnimation(msg: msg)
if customObj.first == 3 || customObj.first == 12{
if let model = Deserialized<RectiveGiftModel>.toModel(with: customObj.data),let gift = model.gift == nil ? model.giftInfo : model.gift {
var userList:[String] = []
if userList.count <= 0 {
for item in model.targetUsers {
userList.append("\(item.uid)")
}
if userList.count <= 0{
userList.append(model.targetUid)
}
}
var starPoint = CGPoint(x: ScreenWidth/2, y: NavHeight)
if let point = micSeatView.getPointWithCell(uid: model.uid){
if point.x <= 0 || point.y <= 0{
}else{
starPoint = point
}
}
var curPoint = CGPoint(x: ScreenWidth/2, y: NavHeight)
for userUid in userList{
if let point = micSeatView.getPointWithCell(uid: userUid){
if point.x <= 0 || point.y <= 0{
}else{
curPoint = point
}
}
roomEffectView.startPlayAnimation(url: gift.giftUrl, start: starPoint, end: curPoint)
}
}
}
}
} }
micSeatView.dealWithNotMessage(msg: msg) micSeatView.dealWithNotMessage(msg: msg)
menuView.dealWithNotMessage(msg: msg) menuView.dealWithNotMessage(msg: msg)
} }
} }
func startPlayAnimation(msg:NIMMessage){
if let obj = msg.messageObject as? NIMCustomObject,let customObj = obj.attachment as? ChatCustomMsgModel{
if customObj.first == 3 || customObj.first == 12{
if let model = Deserialized<RectiveGiftModel>.toModel(with: customObj.data),let gift = model.gift == nil ? model.giftInfo : model.gift {
var userList:[String] = []
if userList.count <= 0 {
for item in model.targetUsers {
userList.append("\(item.uid)")
}
if userList.count <= 0{
userList.append(model.targetUid)
}
}
var starPoint = CGPoint(x: ScreenWidth/2, y: NavHeight)
if let point = micSeatView.getPointWithCell(uid: model.uid){
if point.x <= 0 || point.y <= 0{
}else{
starPoint = point
}
}
var curPoint = CGPoint(x: ScreenWidth/2, y: NavHeight)
for userUid in userList{
if let point = micSeatView.getPointWithCell(uid: userUid){
if point.x <= 0 || point.y <= 0{
}else{
curPoint = point
}
}
roomEffectView.startPlayAnimation(url: gift.giftUrl, start: starPoint, end: curPoint)
}
}
}
}
}
func send(_ message: NIMMessage, didCompleteWithError error: Error?) { func send(_ message: NIMMessage, didCompleteWithError error: Error?) {
if let sessionId = message.session?.sessionId,let roomUid = self.roomInfo?.roomId,sessionId != roomUid{ if let sessionId = message.session?.sessionId,let roomUid = self.roomInfo?.roomId,sessionId != roomUid{
return return
@@ -385,6 +388,7 @@ extension RoomVC : NIMChatManagerDelegate, NIMChatroomManagerDelegate, NIMLoginM
}else if message.messageType == .custom{ }else if message.messageType == .custom{
chatScreenView.dealWithCustomMsg(msg: message) chatScreenView.dealWithCustomMsg(msg: message)
roomEffectView.dealWithCustomMsg(msg: message) roomEffectView.dealWithCustomMsg(msg: message)
startPlayAnimation(msg: message)
} }
} }
func updateOnlineNum(num:Int){ func updateOnlineNum(num:Int){

View File

@@ -326,7 +326,7 @@ extension NormalMicSeatSuperView:UICollectionViewDelegate,UICollectionViewDataSo
if let cell = collectionView.cellForItem(at: IndexPath(row: i, section: 0)) as? NormalMicSeatCell{ if let cell = collectionView.cellForItem(at: IndexPath(row: i, section: 0)) as? NormalMicSeatCell{
if let user = cell.user,let curUid = user.uid,"\(curUid)" == uid{ if let user = cell.user,let curUid = user.uid,"\(curUid)" == uid{
let width = (ScreenWidth - UIDevice.scaleWidth(width: 20))/4 let width = (ScreenWidth - UIDevice.scaleWidth(width: 20))/4
let x = CGFloat(i) * width + UIDevice.scaleWidth(width: 10) + width / 2 let x = CGFloat(i%4) * width + UIDevice.scaleWidth(width: 10) + width / 2
point = CGPoint(x: x, y: i < 4 ? UIDevice.scaleWidth(width: 273) : UIDevice.scaleWidth(width: 418)) point = CGPoint(x: x, y: i < 4 ? UIDevice.scaleWidth(width: 273) : UIDevice.scaleWidth(width: 418))
break break
} }