From e25cf38c56d13fbb00a622451d60e9f92a8f9d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Tue, 9 Sep 2025 20:56:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=82=E6=88=98=E5=A3=B0=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/majiang/lichuan/EXMainView.lua | 3 ++- .../extend/majiang/lichuan/EXWitnessView.lua | 24 ++++++------------- .../main/majiang/MJWitnessView.lua | 19 ++++++++++++++- wb_unity_pro/Assets/link.xml | 17 ++++++++++++- .../ProjectSettings/GraphicsSettings.asset | 1 + .../ProjectSettings/ProjectSettings.asset | 3 ++- 6 files changed, 46 insertions(+), 21 deletions(-) diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index 94e180b3..52ceef46 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -262,8 +262,9 @@ function M:EventInit() info:UpdateHandCard() local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) info:UpdateOutCardList(outcard, card, self._cursor) - self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) self:PlayMJSound("chupai.mp3") + self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) + if seat == _room.self_player.seat then _room.curren_outcard_seat = -1 end diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua index af13d851..0946c853 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua @@ -38,7 +38,7 @@ function M:InitView() UpdateBeat:Add(self.OnUpdate, self) self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg }) - + self.Sound_path = "extend/majiang/lichuan/sound/" local centerBox = self._view:GetChild("Comp_ConterBox") self._ctr_cardbox = centerBox:GetController("seat") self._tex_leftTime = centerBox:GetChild("Text_Time") @@ -254,19 +254,14 @@ function M:EventInit() local card = arg[2] local seat = p.seat local info = self._player_card_info[self:GetPos(seat)] - print("lingmeng witness OutCard1", self:GetPos(seat), info) self:RemoveCursor() - print("lingmeng witness OutCard1-2") info:UpdateHandCardWitness(false) - print("lingmeng witness OutCard2") info:UpdateOutCardList(nil, nil, self._cursor) - print("ling 2zhihouq") - self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) self:PlayMJSound("chupai.mp3") - print("ling 2zhihou") + self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) if seat == _room.self_player.seat then _room.curren_outcard_seat = -1 end @@ -334,11 +329,11 @@ function M:EventInit() -- ↓↓↓先排列好特效图片 if HuMsg.type > 2 and HuMsg.type < 32 then - -- local sound_name = string.format(self.Sound_path .. "%s/%s.mp3", - -- ViewUtil.Sex_Chat[player.self_user.sex], - -- "he" .. HuMsg.type) - -- ViewUtil.PlaySound(self.asset_group, sound_name) - self:PlaySound(self.asset_group, player.self_user.sex, "he" .. HuMsg.type) + local sound_name = string.format(self.Sound_path .. "%s/%s.mp3", + ViewUtil.Sex_Chat[player.self_user.sex], + "he" .. HuMsg.type) + ViewUtil.PlaySound(self.asset_group, sound_name) + -- self:PlaySound(self.asset_group, player.self_user.sex, "he" .. HuMsg.type) local imgList = self.HuCardImg[HuMsg.type] for _, img in pairs(imgList) do local imgPath = "ui://Main_Majiang/" .. img @@ -471,11 +466,6 @@ function M:InitPlayerInfoView() end end -local majiang_asset_path = "base/main_majiang/sound/" -function M:PlayMJSound(path) - ViewUtil.PlaySound(self.asset_group, majiang_asset_path .. path) -end - function M:NewMJPlayerCardInfoView(view, index) return MJMainView.NewMJPlayerCardInfoView(self, view, index) --[[ diff --git a/lua_probject/main_project/main/majiang/MJWitnessView.lua b/lua_probject/main_project/main/majiang/MJWitnessView.lua index 59fe18f7..48d04fa7 100644 --- a/lua_probject/main_project/main/majiang/MJWitnessView.lua +++ b/lua_probject/main_project/main/majiang/MJWitnessView.lua @@ -1,5 +1,7 @@ local WitnessView = require("Game.View.WitnessView") local TableBG = require("Game.Data.TableBG") +local HuCardImg = import(".HuCardImg") + local bg_config = { @@ -12,7 +14,7 @@ local bg_config = { local M = {} setmetatable(M, { __index = WitnessView }) - +M.HuCardImg = HuCardImg --- Create a new function M.new() local self = setmetatable({}, { __index = M }) @@ -47,4 +49,19 @@ function M:InitView() TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) end +local majiang_asset_path = "base/main_majiang/sound/" +function M:PlayMJSound(path) + ViewUtil.PlaySound(self.asset_group, majiang_asset_path .. path) +end + +function M:PlayMJMusic(path) + ViewUtil.PlayMuisc(self.asset_group, majiang_asset_path .. path) +end + +function M:PlaySound(group, sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = majiang_asset_path .. string.format("%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound(group, path1) +end + return M diff --git a/wb_unity_pro/Assets/link.xml b/wb_unity_pro/Assets/link.xml index 1ad93287..fe535d64 100644 --- a/wb_unity_pro/Assets/link.xml +++ b/wb_unity_pro/Assets/link.xml @@ -9,4 +9,19 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/wb_unity_pro/ProjectSettings/GraphicsSettings.asset b/wb_unity_pro/ProjectSettings/GraphicsSettings.asset index a7bcfc3d..4da061a7 100644 --- a/wb_unity_pro/ProjectSettings/GraphicsSettings.asset +++ b/wb_unity_pro/ProjectSettings/GraphicsSettings.asset @@ -39,6 +39,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} diff --git a/wb_unity_pro/ProjectSettings/ProjectSettings.asset b/wb_unity_pro/ProjectSettings/ProjectSettings.asset index e39ef6ed..2b5d9d4d 100644 --- a/wb_unity_pro/ProjectSettings/ProjectSettings.asset +++ b/wb_unity_pro/ProjectSettings/ProjectSettings.asset @@ -791,7 +791,8 @@ PlayerSettings: Standalone: 1 iPhone: 1 il2cppCompilerConfiguration: {} - managedStrippingLevel: {} + managedStrippingLevel: + Android: 3 incrementalIl2cppBuild: {} allowUnsafeCode: 0 additionalIl2CppArgs: