From 5f4b6bd1601476ddb11eb72095e1ccc084bd7cd1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-7R8JEQQ\\k" <1076390229@qq.com> Date: Fri, 18 Jul 2025 16:02:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4=EF=BC=8C?= =?UTF-8?q?=E5=BF=83=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/GameController.lua | 10 ++++++++++ lua_probject/base_project/Game/Protocol.lua | 3 +++ .../base_project/Game/View/FamilyView.lua | 8 +++++--- .../base_project/Game/View/MainView.lua | 16 +++++++++++++++- .../base_project/Game/ViewManager.lua | 4 ++-- .../extend/majiang/fuzhou/EXMainView.lua | 13 +++++++++---- .../main_majiang/ui/Main_Majiang_fui.bytes | Bin 378400 -> 378407 bytes .../Assets/Scripts/GameApplication.cs | 1 + .../ProjectSettings/GraphicsSettings.asset | 1 + 9 files changed, 46 insertions(+), 10 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua index 4710f130..4f55536f 100644 --- a/lua_probject/base_project/Game/Controller/GameController.lua +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -80,6 +80,8 @@ function M:init(name) self._eventmap[Protocol.GAME_EVT_WITNESS_ROOM] = self.OnEvtEnterWitness self._eventmap[Protocol.GAME_EVT_Exit_WITNESS_ROOM] = self.OnEvtExieWitness + self._eventmap[Protocol.GAME_GANGFEN] = self.OnEvtGANGFEN + --self._eventmap[Protocol.GAME_AUTO_CARD] = self.OnEvtOpenGameHuTuoGtips end @@ -632,6 +634,14 @@ function M:OnEvtCloseTupGTips(msg) DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, false, t) end +function M:OnEvtGANGFEN(msg) + print("有人得分了") + local detSeat = msg["detSeat"] + local formSeat = msg["formSeat"] + local score = msg["score"] + DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, false, t) +end + function M:DispatchEventTuoGuan(p, isShow, t) DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, isShow, t) end diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index f84a6725..a7335832 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -501,4 +501,7 @@ Protocol = { GAME_EVT_CANCEL_READY_ENTRUST = "22011", --关闭托管倒计时 GAME_AUTO_CARD = "1303", --开启游戏托管 + + --加分显示 + GAME_GANGFEN = "gangfen", } diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index 650dcfa4..482eae86 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -623,7 +623,7 @@ end function M:OnUpdate() local fgCtr = ControllerManager.GetController(NewGroupController) - local heatTime = os.time() + local newTime = os.time() -- --12001事件 local func = self._mgr_ctr:PopEvent() if (func ~= nil) then @@ -669,13 +669,15 @@ function M:OnUpdate() -- -- print("====================================UpdateFamilyRoom", fgCtr, self._group.id) self:UpdateFamilyRoom(fgCtr, self._group.id) end - if not self.lastTime or self.lastTime - heatTime > 30 then + + local HeartbeatTime = 3 + if not self.lastTime or newTime - self.lastTime > HeartbeatTime then fgCtr:FG_SetFamilyHeartbeat(self._group.id, DataManager.SelfUser.account_id, function(res) self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false, 1) pt(res) end) - self.lastTime = heatTime + self.lastTime = newTime end end diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua index c1cffcb4..8e33af71 100644 --- a/lua_probject/base_project/Game/View/MainView.lua +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -15,6 +15,19 @@ local function GetSeat(data, uId) end end +local function RefalshBtnClose(self) + local btn_close = self._view:GetChild("btn_closeRoom") + local btn_close_cSytle = btn_close:GetController("cStyle") + local roomOwner = self._room.player_list[1].self_user.account_id + + if roomOwner == DataManager.SelfUser.account_id then + btn_close_cSytle.selectedIndex = 0 + else + btn_close_cSytle.selectedIndex = 1 + end +end + + --lingmeng新全局标记 lingmengxin = false @@ -502,7 +515,8 @@ function M:InitView(url, isHideIpAdds) self:ShowWitnessPlayer() end) end - + + RefalshBtnClose(self) ------------------------------------------------------------ end diff --git a/lua_probject/base_project/Game/ViewManager.lua b/lua_probject/base_project/Game/ViewManager.lua index fd023aa4..573b51bc 100644 --- a/lua_probject/base_project/Game/ViewManager.lua +++ b/lua_probject/base_project/Game/ViewManager.lua @@ -152,14 +152,14 @@ function ViewManager.ChangeView(id, game_id, callback) end function ViewManager.OnApplicationPause() - -- print("game pause") + print("game pause") if (_currenView ~= nil) then _currenView:OnApplicationPause() end end function ViewManager.OnApplicationActive() - -- print("game active") + print("game active") if (_currenView ~= nil) then _currenView:OnApplicationActive() end diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua index 88d0710f..5204cdee 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -416,15 +416,20 @@ function M:EventInit() he_list:Center() coroutine.start(function() + coroutine.wait(0.4) for i = 1, #win_list do local tem = win_list[i] if tem.type > 0 and tem.type < 32 then local com_name = "he" .. tem.type printlog("声音====>>>", com_name) - ViewUtil.PlaySound("FuZhou_MJ", - string.format("extend/majiang/fuhzou/sound/%s/%s.mp3", ViewUtil.Sex_Chat[player.self_user.sex], - com_name)) - local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_FuZhou/" .. com_name) + local sound_name = string.format("extend/majiang/fuzhou/sound/%s/%s.mp3", + ViewUtil.Sex_Chat[player.self_user.sex], + com_name) + ViewUtil.PlaySound("FuZhou_MJ", sound_name) + + local listObj = he_list:GetChild("list") + local imgPath = "ui://Extend_MJ_FuZhou/" .. com_name + listObj:AddItemFromPool(imgPath) coroutine.wait(0.3) end end diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes index a2286fcce2209a37aaa764eeb74f8ad4d067e572..76fe75be61a01cb524947e467670596531e38112 100644 GIT binary patch delta 133 zcmZ3`Bfh*xe1a2aCj$tuypV46-s;WBu4@*~%v{A>%^>^#A4uX75PR}4FfiJ1fVfIP zYyre&KoKb*mIh)yAU2rZq06{<^6ax*)6d^x=9q4)$7nNo-a?+qc9%sb_ZP9Z&(dQA SVkRJF24a@&v-DWorUL-$JR%AJ delta 129 zcmZ49Bfg+Ve1a2a69Wjaybx*h-s;WBu4@*+%v{A>%^>^#A4uX75PR}4Fff{OfVfIP zYyre&KoMae76D>)Al97Tq06{<^0ZGv({1$_Z6;s1$vRz2mr-;23Isi9)AAkS= diff --git a/wb_unity_pro/Assets/Scripts/GameApplication.cs b/wb_unity_pro/Assets/Scripts/GameApplication.cs index 110e3bef..349e1e98 100644 --- a/wb_unity_pro/Assets/Scripts/GameApplication.cs +++ b/wb_unity_pro/Assets/Scripts/GameApplication.cs @@ -137,6 +137,7 @@ public class GameApplication : MonoBehaviour } else { + Debug.Log("UNITY Pause"); //NetManager.KillAllConnection(); if (_luaClient != null) _luaClient.OnApplicationPause1(); diff --git a/wb_unity_pro/ProjectSettings/GraphicsSettings.asset b/wb_unity_pro/ProjectSettings/GraphicsSettings.asset index 4f4dac17..ad8f23e5 100644 --- a/wb_unity_pro/ProjectSettings/GraphicsSettings.asset +++ b/wb_unity_pro/ProjectSettings/GraphicsSettings.asset @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}