diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua index 5c5ee0b4..381729b7 100644 --- a/lua_probject/base_project/Game/Controller/GameController.lua +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -38,7 +38,7 @@ GameEvent = { --推送道具互动 MISSILE = "MISSILE", - + --Home状态推送 HOMESTATE = "HOMESTATE", } @@ -419,6 +419,7 @@ end -- 聊天事件 function M:OnEventInteraction(evt_data) + --[[ if self._room.ban_chat1 == false or self._room.ban_chat2 == false then self._cacheEvent:Enqueue( function() @@ -427,9 +428,16 @@ function M:OnEventInteraction(evt_data) local type1 = evt_data['type'] local parm = evt_data['parm'] DispatchEvent(self._dispatcher, GameEvent.Interaction, p, type1, parm) - end - ) - end + end) + end]] + + self._cacheEvent:Enqueue(function() + local playerid = evt_data['playerid'] + local p = self._room:GetPlayerById(playerid) + local type1 = evt_data['type'] + local parm = evt_data['parm'] + DispatchEvent(self._dispatcher, GameEvent.Interaction, p, type1, parm) + end) end -- GPS更新事件 diff --git a/lua_probject/base_project/Game/Controller/RoomController.lua b/lua_probject/base_project/Game/Controller/RoomController.lua index 52587bc0..360cf348 100644 --- a/lua_probject/base_project/Game/Controller/RoomController.lua +++ b/lua_probject/base_project/Game/Controller/RoomController.lua @@ -117,8 +117,10 @@ function M:CreateRoom(game_id, _data, callback) end local join_room_frame = 0 + function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) printlog("公共进入房间接口=============PublicJoinRoom") + print("test,亲友圈ID是:",group_id) -- 同一帧不重复调用 local last_frame = join_room_frame join_room_frame = Time.frameCount @@ -127,6 +129,7 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) end -- 防止游戏没有离开控制器 ControllerManager.ChangeController(LoddyController) + local _data = {} if cmd == Protocol.WEB_FG_MATCH_ROOM then _data["is_null"] = tem diff --git a/lua_probject/base_project/Game/View/Common/BaseWindow.lua b/lua_probject/base_project/Game/View/Common/BaseWindow.lua index 41a41df6..c36813e6 100644 --- a/lua_probject/base_project/Game/View/Common/BaseWindow.lua +++ b/lua_probject/base_project/Game/View/Common/BaseWindow.lua @@ -65,10 +65,10 @@ function M:init(url) else ctr_hide_bg.selectedIndex = 0 end - printlog(url) + --printlog(url) self._view = UIPackage.CreateObjectFromURL(url) - printlog(self._view) - -- self._view.fairyBatching = true + --printlog(self._view) + --self._view.fairyBatching = true local btn_close = self._view:GetChild("btn_close") if (btn_close) then btn_close.onClick:Set(function() @@ -162,6 +162,8 @@ function M:Show() local scaleY = GRoot.inst.height / self._contentPane.height local scaleX = GRoot.inst.width / self._contentPane.width self._contentPane:SetScale(scaleX, scaleY) + --self._contentPane.x = 0 + --self._contentPane.y = 0 end if self._full then diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index 1f41c726..b134beed 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -8,7 +8,10 @@ local M = FamilyEventView function FamilyEventView.new(root) setmetatable(M, { __index = root }) local self = setmetatable({}, { __index = M }) + return self +end +function M:AddListener() local mgr_ctr = self._mgr_ctr mgr_ctr:AddEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay)) mgr_ctr:AddEventListener(GroupMgrEvent.DelPlay, handler(self, self._evtDelPlay)) @@ -31,7 +34,6 @@ function FamilyEventView.new(root) mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyRoomReflash, handler(self, self._evtOnFamilyRoomReflash)) mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyMemberOut, handler(self, self._evtOnFamilyMemberOut)) print("家族添加监听") - return self end function M:RemoveAll() diff --git a/lua_probject/base_project/Game/View/Family/PlayEditView.lua b/lua_probject/base_project/Game/View/Family/PlayEditView.lua index 0ebf28f5..3f7ee9c0 100644 --- a/lua_probject/base_project/Game/View/Family/PlayEditView.lua +++ b/lua_probject/base_project/Game/View/Family/PlayEditView.lua @@ -8,7 +8,7 @@ local function UpdateFamilyRoom(self) return end - view:UpdateFamilyRoom(self.groupId) + view:UpdateFamilyRoom(nil, self.groupId) end function PlayEditView.New() diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index fcf695b0..7dc93877 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -1132,7 +1132,7 @@ function M:Show() Broadcast.AddListener(BroadcastEvent.OnMemberChange, self.ReflashMember, self) Broadcast.AddListener(BroadcastEvent.OnOutFamily, self.Reflash, self) - self.Reflash() + self._familyEventView:AddListener() BaseView.Show(self) self:Reflash() diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua index 6a363756..c8c93dd2 100644 --- a/lua_probject/base_project/Game/View/MainView.lua +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -75,6 +75,8 @@ function M:init() UIPackage.AddPackage('base/chat/ui/Chat') self.Fix_Msg_Chat = ViewUtil.Fix_Msg_Chat -- 自动回复消息列表 self.Fix_Msg_Chat2 = nil -- 自动回复列表2 + self._scale = true + self._full_offset = false self.class = "MainView" self:InitView() self:SetTuoGuanState() diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua index 55270d95..0dbd8735 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua @@ -13,7 +13,7 @@ function GroupGameSettingView.new(blur_view, gid, pid, room_config, callback) local self = setmetatable({}, { __index = M }) self.class = "GroupGameSettingView" self._animation = false - self._full = true + --self._full = true self._full_offset = false self.selectedIndex = index self._close_destroy = true @@ -34,7 +34,8 @@ function GroupGameSettingView.new(blur_view, gid, pid, room_config, callback) self.rewards_data = {} self.callback = callback - self._full = true + --self._full = true + self._scale = true self:init("ui://NewGroup/View_GroupGameSetting") return self end diff --git a/lua_probject/base_project/Game/View/PlayerInfoView.lua b/lua_probject/base_project/Game/View/PlayerInfoView.lua index a7aa1a08..29c89a96 100644 --- a/lua_probject/base_project/Game/View/PlayerInfoView.lua +++ b/lua_probject/base_project/Game/View/PlayerInfoView.lua @@ -214,6 +214,10 @@ function M:UpdateScore(score) end end end + + local curScore = tonumber(self._tex_score.text) + curScore = curScore or 0 + self:ScoreAnimation(score - curScore) self._tex_score.text = tostring(score) end diff --git a/lua_probject/base_project/Game/View/PlayerInfoView2.lua b/lua_probject/base_project/Game/View/PlayerInfoView2.lua index 9fe6b418..e6055b89 100644 --- a/lua_probject/base_project/Game/View/PlayerInfoView2.lua +++ b/lua_probject/base_project/Game/View/PlayerInfoView2.lua @@ -45,6 +45,7 @@ function M:init() self._ctr_read = view:GetController('read') self._ctr_offline = view:GetController('offline') + self._tex_score = view:GetChild('text_jifen') self._btn_head = view:GetChild('btn_head') self._ctr_bank = view:GetController('bank') @@ -160,7 +161,7 @@ function M:FillData(player) if (DataManager.CurrenRoom.self_player ~= player) then self._ctr_offline.selectedIndex = player.line_state == 0 and 1 or 0 end - -- self:UpdateScore() + self:UpdateScore() self:Ready(player.ready) if player.entrust and player ~= room.self_player then @@ -183,7 +184,7 @@ function M:UpdateScore(score) -- end -- end end - -- self._tex_score.text = tostring(score) + self._tex_score.text = tostring(score) end function M:SetStartType(peopleNum, seat) @@ -360,6 +361,11 @@ function M:Destroy() end function M:ScoreAnimation(score) + + if score == 0 then + return + end + local imgPath = "ui://Main_Majiang/score" local symbol = "ui://Main_Majiang/score+" if score < 0 then diff --git a/lua_probject/base_project/Game/View/ResultView.lua b/lua_probject/base_project/Game/View/ResultView.lua index 1e218e78..8ad68519 100644 --- a/lua_probject/base_project/Game/View/ResultView.lua +++ b/lua_probject/base_project/Game/View/ResultView.lua @@ -95,6 +95,8 @@ end function M:init(url, isBigFull) self._animation = false + self._scale = true + self._full = false BaseWindow.init(self, url) self:InitView() diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua index 4cd18ffb..b59c479c 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua @@ -53,25 +53,4 @@ function M:FillData(player) PlayerInfoView2.FillData(self, player) end -function M:UpdateScore() - local score = self._player.total_score - local room = DataManager.CurrenRoom - if room:checkHpNonnegative() then - score = d2ad(self._player.cur_hp) - end - if not score then - score = 0 - end - if score < 0 then - self._ct_score.selectedIndex = 1 - self._tex_score2.text = score - else - self._ct_score.selectedIndex = 0 - if not room:checkHpNonnegative() then - score = "+" .. score - end - self._tex_score.text = score - end -end - return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua index 4cd18ffb..b59c479c 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua @@ -53,25 +53,4 @@ function M:FillData(player) PlayerInfoView2.FillData(self, player) end -function M:UpdateScore() - local score = self._player.total_score - local room = DataManager.CurrenRoom - if room:checkHpNonnegative() then - score = d2ad(self._player.cur_hp) - end - if not score then - score = 0 - end - if score < 0 then - self._ct_score.selectedIndex = 1 - self._tex_score2.text = score - else - self._ct_score.selectedIndex = 0 - if not room:checkHpNonnegative() then - score = "+" .. score - end - self._tex_score.text = score - end -end - return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua index 4cd18ffb..b59c479c 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua @@ -53,25 +53,4 @@ function M:FillData(player) PlayerInfoView2.FillData(self, player) end -function M:UpdateScore() - local score = self._player.total_score - local room = DataManager.CurrenRoom - if room:checkHpNonnegative() then - score = d2ad(self._player.cur_hp) - end - if not score then - score = 0 - end - if score < 0 then - self._ct_score.selectedIndex = 1 - self._tex_score2.text = score - else - self._ct_score.selectedIndex = 0 - if not room:checkHpNonnegative() then - score = "+" .. score - end - self._tex_score.text = score - end -end - return M diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua index 4cd18ffb..b59c479c 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua @@ -53,25 +53,4 @@ function M:FillData(player) PlayerInfoView2.FillData(self, player) end -function M:UpdateScore() - local score = self._player.total_score - local room = DataManager.CurrenRoom - if room:checkHpNonnegative() then - score = d2ad(self._player.cur_hp) - end - if not score then - score = 0 - end - if score < 0 then - self._ct_score.selectedIndex = 1 - self._tex_score2.text = score - else - self._ct_score.selectedIndex = 0 - if not room:checkHpNonnegative() then - score = "+" .. score - end - self._tex_score.text = score - end -end - return M diff --git a/lua_probject/main_project/main/majiang/MJMainView.lua b/lua_probject/main_project/main/majiang/MJMainView.lua index 660642ad..366b16b5 100644 --- a/lua_probject/main_project/main/majiang/MJMainView.lua +++ b/lua_probject/main_project/main/majiang/MJMainView.lua @@ -37,6 +37,8 @@ function M:InitView(url, use_custom_bg, custom_bg_config) self._room.card_type = DataManager.CardTypeList[tostring(self._room.game_id)] or 1 UIPackage.AddPackage("base/main_majiang/ui/Main_Majiang") + self._full = false + self._scale = true MainView.InitView(self, url) self.btn_setting = self._view:GetChild("btn_setting") local _view = self._view diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml index 0551859e..6c65e3ea 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main/PlayerHead_1.xml @@ -30,9 +30,9 @@ - + - + @@ -62,6 +62,7 @@ + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml index fe5308ae..900b9dab 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml @@ -10,7 +10,9 @@ - + + + @@ -105,10 +107,10 @@