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 a2286fcc..76fe75be 100644 Binary files a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes differ 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}