From 2e92757ba3fe3e5c4b058b254d41c2efd68dec7a Mon Sep 17 00:00:00 2001 From: 1076390229 <1076390229@qq.com> Date: Sat, 9 Aug 2025 22:05:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=92=8C=E5=8A=A0=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base_project/Game/View/PlayerInfoView.lua | 4 ++ .../Game/View/PlayerInfoView2.lua | 10 ++- .../base_project/Game/View/ResultView.lua | 2 + .../majiang/fuzhou/EXPlayerInfoView.lua | 21 ------ .../extend/majiang/jinxi/EXPlayerInfoView.lua | 21 ------ .../majiang/lichuan/EXPlayerInfoView.lua | 21 ------ .../majiang/nancheng/EXPlayerInfoView.lua | 21 ------ .../main_project/main/majiang/MJMainView.lua | 2 + .../Main_new/Main/PlayerHead_1.xml | 3 +- .../Main_new/Main_new_2_jiangxi.xml | 16 ++--- .../main_majiang/ui/Main_Majiang_fui.bytes | Bin 381284 -> 381305 bytes .../Assets/StreamingAssets/init1_1.json | 16 ++--- .../Assets/StreamingAssets/init2_1.json | 60 +++++++++--------- 13 files changed, 64 insertions(+), 133 deletions(-) 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 eb8f76a6..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 @@ -2,7 +2,7 @@ - + @@ -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 38e8c07b..cfe15b89 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 @@ -1,6 +1,6 @@ - + @@ -107,10 +107,10 @@