观战声音
parent
3522b980a4
commit
e25cf38c56
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
--[[
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -9,4 +9,19 @@
|
|||
<namespace fullname="System.ComponentModel" preserve="all"/>
|
||||
<namespace fullname="System.Net.Configuration" preserve="all"/>
|
||||
</assembly>
|
||||
</linker>
|
||||
|
||||
<!-- 保留 Assembly-CSharp 下的 ToLua 框架 -->
|
||||
<assembly fullname="Assembly-CSharp">
|
||||
<!-- ToLua 入口类(反射用到的一定要保留) -->
|
||||
<type fullname="LuaInterface.LuaState" preserve="all"/>
|
||||
<type fullname="LuaInterface.LuaFunction" preserve="all"/>
|
||||
<type fullname="LuaInterface.LuaTable" preserve="all"/>
|
||||
<type fullname="LuaInterface.LuaDLL" preserve="all"/>
|
||||
</assembly>
|
||||
|
||||
<!-- 保留 FairyGUI 相关(如果你 UI 是 Lua+FairyGUI 绑定的) -->
|
||||
<assembly fullname="Assembly-CSharp">
|
||||
<namespace fullname="FairyGUI" preserve="all"/>
|
||||
</assembly>
|
||||
</linker>
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -791,7 +791,8 @@ PlayerSettings:
|
|||
Standalone: 1
|
||||
iPhone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
managedStrippingLevel:
|
||||
Android: 3
|
||||
incrementalIl2cppBuild: {}
|
||||
allowUnsafeCode: 0
|
||||
additionalIl2CppArgs:
|
||||
|
|
|
|||
Loading…
Reference in New Issue