From dae256a07e95696c63c4b5390d9ad7575cd08e07 Mon Sep 17 00:00:00 2001 From: fatiao <515948292@qq.com> Date: Thu, 5 Mar 2026 18:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/UILiveRoom/LiveRoomGiftItem.prefab | 2 +- .../Prefabs/UI/UILiveRoom/LiveRoomItem.prefab | 100 +++++++++--------- Assets/Lua/Config/LiveRoomTalkCfg.lua | 18 ++-- Assets/Lua/UI/UILiveRoom/UILiveRoomView.lua | 43 ++++++-- 4 files changed, 92 insertions(+), 71 deletions(-) diff --git a/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomGiftItem.prefab b/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomGiftItem.prefab index a01b3e0f4..bdf16a6cf 100644 --- a/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomGiftItem.prefab +++ b/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomGiftItem.prefab @@ -180,7 +180,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &3135625391757224365 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomItem.prefab b/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomItem.prefab index 5e78ae6f1..e327738a7 100644 --- a/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomItem.prefab +++ b/Assets/Content/Prefabs/UI/UILiveRoom/LiveRoomItem.prefab @@ -5092,7 +5092,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &115939976440812648 RectTransform: m_ObjectHideFlags: 0 @@ -7869,9 +7869,9 @@ RectTransform: - {fileID: 2264348959941013774} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 572.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7123559852210247449 @@ -9695,9 +9695,9 @@ RectTransform: - {fileID: 8317714432452095997} m_Father: {fileID: 4254207596734884629} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: -230} m_SizeDelta: {x: 1080, y: 60} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &994507179122743829 @@ -16669,9 +16669,9 @@ RectTransform: - {fileID: 9213351548852728544} m_Father: {fileID: 4254207596734884629} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: -270} m_SizeDelta: {x: 329, y: 100} m_Pivot: {x: 0.5, y: 1} --- !u!222 &6890580478276637355 @@ -17118,9 +17118,9 @@ RectTransform: - {fileID: 9098074536275429445} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 362.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7242641719228348083 @@ -18317,9 +18317,9 @@ RectTransform: - {fileID: 8960957652178141439} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 992.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4863064043221393967 @@ -18530,9 +18530,9 @@ RectTransform: - {fileID: 2263461288545407719} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 47.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6286738948952423829 @@ -22077,7 +22077,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &903115546714470270 RectTransform: m_ObjectHideFlags: 0 @@ -26862,9 +26862,9 @@ RectTransform: - {fileID: 3252053939958040628} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 677.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6847939996159611283 @@ -29907,7 +29907,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.78039217} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -31044,9 +31044,9 @@ RectTransform: - {fileID: 4335789157840758689} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 887.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7312909129957150248 @@ -35034,9 +35034,9 @@ RectTransform: - {fileID: 7507344249561322973} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 152.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4373079736099867411 @@ -36501,9 +36501,9 @@ RectTransform: - {fileID: 3685485050247075530} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 467.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7034374317899172211 @@ -36857,9 +36857,9 @@ RectTransform: - {fileID: 201288052656005517} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 782.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3729285574982894415 @@ -37260,9 +37260,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 4254207596734884629} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: -265} m_SizeDelta: {x: 100, y: 10} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1796809333254120660 @@ -40486,9 +40486,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 4254207596734884629} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: -377.5} m_SizeDelta: {x: 100, y: 15} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1951121887629550732 @@ -41224,9 +41224,9 @@ RectTransform: - {fileID: 7025420972156680222} m_Father: {fileID: 4254207596734884629} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: 0} m_SizeDelta: {x: 1080, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &8666541955988551275 @@ -49229,9 +49229,9 @@ RectTransform: - {fileID: 1558870460956258642} m_Father: {fileID: 7025420972156680222} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 257.5, y: -74} m_SizeDelta: {x: 90, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2896725619175466137 @@ -49350,7 +49350,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 150} - m_SizeDelta: {x: 1080, y: 0} + m_SizeDelta: {x: 1080, y: 385} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5278942819024730963 CanvasRenderer: @@ -49413,7 +49413,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.74509805} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 diff --git a/Assets/Lua/Config/LiveRoomTalkCfg.lua b/Assets/Lua/Config/LiveRoomTalkCfg.lua index fbd1c7f8f..b19d9a38a 100644 --- a/Assets/Lua/Config/LiveRoomTalkCfg.lua +++ b/Assets/Lua/Config/LiveRoomTalkCfg.lua @@ -48,7 +48,7 @@ local LiveRoomTalkCfg = { ['Id']=6, ['Type']=1, ['Stage']=3, -['Time']=5, +['Time']=0, ['CMD']=1, ['Params1']={1}, ['Params2']={'第一组抽卡'}, @@ -57,7 +57,7 @@ local LiveRoomTalkCfg = { ['Id']=7, ['Type']=1, ['Stage']=3, -['Time']=5, +['Time']=0, ['CMD']=1, ['Params1']={1}, ['Params2']={'然后是第二组抽卡'}, @@ -66,7 +66,7 @@ local LiveRoomTalkCfg = { ['Id']=8, ['Type']=1, ['Stage']=3, -['Time']=5, +['Time']=0, ['CMD']=1, ['Params1']={1}, ['Params2']={'第三组抽卡'}, @@ -75,7 +75,7 @@ local LiveRoomTalkCfg = { ['Id']=9, ['Type']=1, ['Stage']=3, -['Time']=5, +['Time']=0, ['CMD']=1, ['Params1']={1}, ['Params2']={'接着是第四组'}, @@ -83,27 +83,27 @@ local LiveRoomTalkCfg = { [10]={ ['Id']=10, ['Type']=1, -['Stage']=3, +['Stage']=4, ['Time']=5, ['CMD']=1, ['Params1']={1}, -['Params2']={'最后一组抽卡'}, +['Params2']={'好,我们开始抽卡了!'}, }, [11]={ ['Id']=11, ['Type']=1, ['Stage']=4, -['Time']=5, +['Time']=30, ['CMD']=1, ['Params1']={1}, -['Params2']={'好啦,让我看看哥哥们都抽到了什么呢~'}, +['Params2']={'让我看看哥哥们都抽到了什么呢~'}, ['Params3']={'result_top1_player'}, }, [12]={ ['Id']=12, ['Type']=1, ['Stage']=4, -['Time']=2, +['Time']=5, ['CMD']=1, ['Params1']={1}, ['Params2']={'本轮抽卡结束了哦!没参与到抽卡的哥哥不要灰心,妹妹还会带来更多的福利!'}, diff --git a/Assets/Lua/UI/UILiveRoom/UILiveRoomView.lua b/Assets/Lua/UI/UILiveRoom/UILiveRoomView.lua index 4aab00652..f3d7c461b 100644 --- a/Assets/Lua/UI/UILiveRoom/UILiveRoomView.lua +++ b/Assets/Lua/UI/UILiveRoom/UILiveRoomView.lua @@ -82,6 +82,7 @@ function UILiveRoomView:AddEventListener() self:RefreshRoom() self:ResetReceiveGift_OnJoin(data.room_id) self:ResetChat_OnJoin(data.room_id) + self:ResetTalk() if data.room_type == LIVEROOM_TYPE_SELL or data.room_type == LIVEROOM_TYPE_BID then local cfgid = tonumber(string.split(data.room_state, ":")[2]) or nil @@ -418,6 +419,7 @@ function UILiveRoomView:ConfigRoom(itemLua, roomType) itemLua.readyPad:SetActive(false) itemLua.showPad:SetActive(false) itemLua.resultPad:SetActive(false) + itemLua.bg_talk:SetActive(false) --事件挂载 self.uiBase:AddButtonUniqueEventListener(itemLua.roomTitleBar.closeBtn.button, self, self.OnCloseBtn) @@ -438,8 +440,7 @@ function UILiveRoomView:OnCloseBtn() if self.sv_room.loopListView.ListViewInited then self.sv_room.loopListView:Dispose() end - - + self:ResetTalk() self:UIClose() end @@ -529,7 +530,7 @@ function UILiveRoomView:RefreshRoom() itemLua.readyPad:SetActive(false) itemLua.showPad:SetActive(false) itemLua.resultPad:SetActive(false) - itemLua.bg_talk:SetActive(false) + --itemLua.bg_talk:SetActive(false) --itemLua.roomBg.bg:SetActive(true) local data = ManagerContainer.DataMgr.LiveRoomData:GetData() @@ -704,17 +705,29 @@ end function UILiveRoomView:Set_Streamer_Talk(talk, talk_params) local talk_str = talkCfg[talk].Params2[talk_params] + self:ShowTalk(talk_str) + if self.showTalkTimerId ~= nil then + ManagerContainer.LuaTimerMgr:RemoveTimer(self.showTalkTimerId) + self.showTalkTimerId = nil + end + self.showTalkTimerId = ManagerContainer.LuaTimerMgr:AddTimer(5000, 1, self, self.ResetTalk, nil) +end +function UILiveRoomView:ShowTalk(talk_str) local itemlua = self:GetCurrPageLua() itemlua.bg_talk:SetActive(true) itemlua.bg_talk.text_talk.text.text = talk_str end - +function UILiveRoomView:ResetTalk() + local itemlua = self:GetCurrPageLua() + itemlua.bg_talk:SetActive(false) + if self.showTalkTimerId ~= nil then + ManagerContainer.LuaTimerMgr:RemoveTimer(self.showTalkTimerId) + self.showTalkTimerId = nil + end +end --endregion 房间 主播说话、动作 - - - --region 房间 聊天 聊天 function UILiveRoomView:ResetChat_OnJoin(room_id) @@ -794,13 +807,21 @@ function UILiveRoomView:GenChatItem(loopview, index, room_id) local level = tostring(data.player_info.level) local content = data.chat_content + local isShowVip = false if data.player_info.uid == 1000 then itemlua.rect1:SetActive(false) - content = "【系统】"..content + content = "【系统】"..content else - itemlua.rect1:SetActive(true) - --name = string.format("%s.Lv%s", name, level) + data.player_info.vip_level = 0 + if data.player_info.vip_level and data.player_info.vip_level > 0 then + itemlua.rect1:SetActive(true) + isShowVip = true + else + itemlua.rect1:SetActive(false) + content = string.format("【%s】%s", name, content) + end end + itemlua.text_vip.text.text = vip or "0" itemlua.text_name.text.text = name .. ":" --.. ".Lv" .. level .. ":" @@ -811,7 +832,7 @@ function UILiveRoomView:GenChatItem(loopview, index, room_id) itemlua.text_name.rectTransform.sizeDelta = Vector2(c_sizename, 50) itemlua.rect1.rectTransform.sizeDelta = Vector2(112 + 20 + c_sizename, 60) local c_sizeother = 47 + 112 + 20 + c_sizename - if data.player_info.uid == 1000 then + if isShowVip == false then c_sizeother = 47 end local c_sizeMax = 1020 - c_sizeother