恢复修改

master
罗家炜 2025-06-17 18:09:58 +08:00
parent 58eee6f33a
commit 949b2bcae7
851 changed files with 6603 additions and 1152 deletions

View File

@ -12,6 +12,7 @@ GroupMgrEvent = {
BeInvited = "be_invited",
UpdateGroup = "UpdateGroup",
NewMailTip = "NewMailTip",
InviteResponse = "InviteResponse",
}
GroupMgrController = {
@ -35,8 +36,6 @@ function GroupMgrController.new()
self._eventmap = {}
self._dispatcher = {}
self._eventmap[Protocol.FGMGR_EVT_ADD_PLAY] = self.OnEvtAddPlay
self._eventmap[Protocol.FGMGR_EVT_DEL_PLAY] = self.OnEvtDelPlay
self._eventmap[Protocol.FGMGR_EVT_UPDATE_PLAY] = self.OnEvtUpdatePlay
@ -48,6 +47,7 @@ function GroupMgrController.new()
self._eventmap[Protocol.FGMGR_EVT_INVITED] = self.OnEvtInvited
self._eventmap[Protocol.FGMGR_EVT_UPDATE_GROUP] = self.OnEvtUpdateGroup
self._eventmap[Protocol.FGMGR_EVT_NEW_MAIL] = self.OnEvtNewMailTip
self._eventmap[Protocol.FGMGR_RESPONSE_INVITE] = self.FG_ResponseInvited
-- self:connect(callback)
return self
end
@ -290,10 +290,11 @@ function M:FG_GetOnlinePlayers(callback)
end
-- 邀请在线玩家
function M:FG_InvitePlayer(group_id, tag, roomid, pid, game_name, callback)
function M:FG_InvitePlayer(group_id, tag, player_id, roomid, pid, game_name, callback)
local _data = {}
_data.id = group_id
_data.tagId = tag
_data.player_id = player_id
_data.roomid = roomid
_data.pid = pid
_data.g_name = game_name
@ -303,11 +304,21 @@ function M:FG_InvitePlayer(group_id, tag, roomid, pid, game_name, callback)
end
-- 回复邀请
function M:FG_ResponseInvited(id, refuse)
local _data = {}
_data.invi_id = id
_data.refuse = refuse
self._mgr_client:send(Protocol.FGMGR_RESPONSE_INVITE, _data)
-- function M:FG_ResponseInvited(id, refuse)
-- local _data = {}
-- _data.invi_id = id
-- _data.refuse = refuse
-- self._mgr_client:send(Protocol.FGMGR_RESPONSE_INVITE, _data)
-- end
--被邀请玩家收到邀请
function M:FG_ResponseInvited(evt_data)
local invite_id = evt_data.invite_id
local g_name = evt_data.g_name
local roomid = evt_data.roomid
local pid = evt_data.pid
local groupid = evt_data.groupid
DispatchEvent(self._dispatcher, GroupMgrEvent.InviteResponse, invite_id, g_name, roomid, pid, groupid)
end
function M:PopEvent()

View File

@ -68,9 +68,14 @@ function M:PlayerRenderer(index, obj)
btn_invite.onClick:Set(function()
local mgr_ctr = ControllerManager.GetController(GroupMgrController)
local room = DataManager.CurrenRoom
mgr_ctr:FG_InvitePlayer(self.group_id, self._data_number[i].uid, room.room_id, room.play_id,
mgr_ctr:FG_InvitePlayer(self.group_id, self._data_number[i].uid, DataManager.SelfUser.account_id, room.room_id,
room.play_id,
room.room_config:GetGameName(),
function()
function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "邀请失败")
else
end
end)
end)
end

View File

@ -0,0 +1,122 @@
local FGInvitedMsgView = import('.FamilyInvitedMsgView')
local FamilyEventView = {}
local M = FamilyEventView
function FamilyEventView.new(root)
setmetatable(M, { __index = root })
local self = setmetatable({}, { __index = M })
local mgr_ctr = self._mgr_ctr
mgr_ctr:AddEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay))
mgr_ctr:AddEventListener(GroupMgrEvent.DelPlay, handler(self, self._evtDelPlay))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlay, handler(self, self._evtUpdatePlay))
mgr_ctr:AddEventListener(GroupMgrEvent.AddRoom, handler(self, self._evtAddRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo))
mgr_ctr:AddEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup))
mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip))
mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse))
return self
end
function M:_evtAddPlay(...)
local arg = { ... }
print("family event _evtAddPlay")
end
function M:_evtDelPlay(...)
local arg = { ... }
print("family event _evtDelPlay")
end
function M:_evtUpdatePlay(...)
local arg = { ... }
print("family event _evtUpdatePlay")
end
function M:_evtAddRoom(...)
local arg = { ... }
print("family event _evtAddRoom")
end
function M:_evtDelRoom(...)
local arg = { ... }
print("family event _evtDelRoom")
end
function M:_evtUpdateRoom(...)
local arg = { ... }
print("family event _evtUpdateRoom")
end
function M:_evtUpdatePlayerInfo(...)
local arg = { ... }
print("family event _evtUpdatePlayerInfo")
end
function M:_evtInvited(...)
local arg = { ... }
print("family event _evtInvited")
end
function M:_evtUpdateGroup(...)
local arg = { ... }
print("family event _evtUpdateGroup")
end
function M:_evtNewMailTip(...)
local arg = { ... }
print("family event _evtNewMailTip")
end
function M:_evtInviteResponse(...)
local arg = { ... }
local invite_id = arg[1]
local g_name = arg[2]
local roomid = arg[3]
local pid = arg[4]
local groupid = arg[5]
local roomCtr = ControllerManager.GetController(RoomController)
local gameId = DataManager.groups:get(groupid):getPlay(pid).gameId
local imv =
FGInvitedMsgView.new(
self._root_view,
groupid,
pid,
invite_id,
function()
roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM,
roomid,
groupid,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1')
-- RestartGame()
return
end
if response.ReturnCode ~= 0 then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
-- ViewManager.ChangeView(ViewManager.View_Lobby)
return
else
UpdateBeat:Remove(self.OnUpdate, self)
ViewManager.ChangeView(ViewManager.View_Main, gameId)
end
end,
groupid,
pid
)
end
)
-- imv:FillData(data)
imv:Show()
end
return M

View File

@ -0,0 +1,66 @@
-- 被邀请界面
local FGInvitedMsgView = {}
local M = FGInvitedMsgView
setmetatable(M, { __index = BaseWindow })
function FGInvitedMsgView.new(groupid, pid, invite_id, blur_view, callback)
print("lingmeng FGAssistInviteView")
local self = setmetatable({}, { __index = M })
self.class = "FGAssistInviteView"
self._blur_view = blur_view
self._animation = true
self._new_hide = false
self._put_map = false
self._close_destroy = true
self.groupid = groupid
self.pid = pid
self.invite_id = invite_id
self.callback = callback
print("lingmeng FGAssistInviteView1")
self:initView("ui://FGAssist/panel_invite")
print("lingmeng FGAssistInviteView2")
return self
end
function M:initView(url)
BaseWindow.init(self, url)
print("lingmeng FGAssistInviteView3")
self._viewText_groupName = self._view:GetChild('tex_group_name')
self._viewText_gameName = self._view:GetChild('tex_game_name')
self._viewText_inviteName = self._view:GetChild('tex_name')
self._viewText_playName = self._view:GetChild('tex_play_name')
self._viewText_playConfig = self._view:GetChild('text_play_config')
print("lingmeng FGAssistInviteView4")
self._view:GetChild('btn_no').onClick:Set(function()
print("lingmeng btn_no")
self:Destroy()
end)
print("lingmeng FGAssistInviteView5")
self._view:GetChild('btn_yes').onClick:Set(function()
print("lingmeng btn_yes", self.callback)
if self.callback then
self.callback()
end
self:Destroy()
end)
print("lingmeng FGAssistInviteViewend")
self:FillData()
end
function M:FillData()
end
function M:Destroy()
BaseWindow.Destroy(self)
end
return M

View File

@ -9,6 +9,7 @@ local FamilyNumberRecord = import(".Family.FamilyNumberRecord")
local FamilyAuditNumber = import(".Family.FamilyAuditNumber")
local FamilyJoinAndCreate = import(".Family.FamilyJoinAndCreate")
local FamilyBanDeskmate = import(".Family.FamilyBanDeskmate")
local FamilyEventView = import(".Family.FamilyEventView")
---
FamilyView = {}
@ -35,6 +36,7 @@ function M:init(url)
self.familyType = view:GetController('familyType')
self.btn_close = view:GetChild('btn_close')
self._mgr_ctr = ControllerManager.GetController(GroupMgrController)
self:InitCloseClick()
@ -52,6 +54,11 @@ function M:init(url)
self._child_familyNumberRecord = FamilyNumberRecord.New(self)
self.lastType = 1
end)
if FamilyEventView then
self._familyEventView = FamilyEventView.new(self)
self._familyEventView:_evtAddPlay()
end
end
function M:InitCloseClick()
@ -391,6 +398,21 @@ function M:OnUpdate()
local fgCtr = ControllerManager.GetController(NewGroupController)
local heatTime = os.time()
-- --12001事件
local func = self._mgr_ctr:PopEvent()
if (func ~= nil) then
local success, result = pcall(func)
if success then
else
print("witness error")
print(result)
-- self._gamectr = ControllerManager.GetController(GameController)
-- if self._gamectr then
-- self._gamectr:ResetConnect()
-- end
end
--func()
end
if self._group.update_room then
-- if self._roomNum == self._group.room_num then
-- for i = 1, self._group.room_num do

View File

@ -404,7 +404,7 @@ function M:EventInit()
---
local isZiMo = win_seat == lose_seat
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2))
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound("FuZhou_MJ", player.self_user.sex, hu_sound)
@ -420,6 +420,10 @@ function M:EventInit()
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)
coroutine.wait(0.3)
end
@ -802,16 +806,16 @@ function M:OnFangziAction(...)
-- local pNode = info._mask_liangpai
local effect = UIPackage.CreateObject("Extend_MJ_FuZhou", "FzEffect")
if fz.type == FZType.Peng then
self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框")
elseif fz.type == FZType.Chi then
self:PlaySound("FuZhou_MJ", player.self_user.sex, "chi" .. math.random(1, 3))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "chi")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
else
self:PlaySound("FuZhou_MJ", player.self_user.sex, "gang" .. math.random(1, 2))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "gang")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框")

View File

@ -46,7 +46,6 @@ function M:InitView(url)
end
function M:__BuGang(card1, card2, callback)
local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_GeJiu", "Gang_tip_choice")
_gang_tip_choice.visible = true
@ -65,12 +64,12 @@ function M:__BuGang(card1,card2, callback)
callback(card2)
end)
_gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width)/2, (self._view.height - _gang_tip_choice.height)/2)
_gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width) / 2,
(self._view.height - _gang_tip_choice.height) / 2)
self._view:AddChild(_gang_tip_choice)
self._gang_tip_choice = _gang_tip_choice
end
function M:SetShowGangZiProcess(currentLaizi1ID, currentLaizi2ID, bugangnum, isShowAnim)
--zhongid=currentLaizi1ID
if isShowAnim == nil then isShowAnim = false end
@ -80,10 +79,8 @@ function M:SetShowGangZiProcess(currentLaizi1ID,currentLaizi2ID,bugangnum,isShow
self:IsShowGangZi(self.Laizi1Btn, true)
self:IsShowGangZi(self.Laizi2Btn, true)
self.bugangnum.text = "当前 " .. bugangnum .. ""
end
function M:HideAllGangZiCard()
self.Laizi1Btn.visible = false
self.Laizi2Btn.visible = false
@ -307,7 +304,6 @@ function M:EventInit()
local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_GeJiu/" .. com_name)
coroutine.wait(0.3)
end
end
coroutine.wait(2)
@ -544,7 +540,8 @@ function M:_ChiView(tiplist, callback)
local list_choose1 = _pop_tip_choice:GetChild("Lst_choose")
local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2")
local crossCtr = _pop_tip_choice:GetController("state")
crossCtr.selectedIndex = #tiplist == 3 and 0 or (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4)))
crossCtr.selectedIndex = #tiplist == 3 and 0 or
(#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4)))
_pop_tip_choice:GetChild("Btn_cross").onClick:Add(function()
_pop_tip_choice:Dispose()
self._chipeng_tip.visible = true
@ -557,7 +554,8 @@ function M:_ChiView(tiplist, callback)
item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0
if tiplist[i].weight ~= 1 then
for j = 1, 4 do
item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tiplist[i].card)
item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang",
self:GetPrefix() .. "202_" .. tiplist[i].card)
end
else
local tem = {}
@ -568,9 +566,12 @@ function M:_ChiView(tiplist, callback)
table.sort(tem, function(a, b)
return a < b
end)
item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[1])
item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[2])
item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[3])
item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[1])
item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[2])
item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[3])
local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2)
item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1
end
@ -578,7 +579,8 @@ function M:_ChiView(tiplist, callback)
callback(tiplist[i].id)
end)
end
_pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2)
_pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2,
(self._view.height - _pop_tip_choice.height) / 2)
self._view:AddChild(_pop_tip_choice)
self._pop_tip_choice = _pop_tip_choice
end
@ -604,7 +606,7 @@ function M:OnFangziAction(...)
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
else
self:PlaySound("GeJiu_MJ", player.self_user.sex,"gang"..math.random(1, 2))
self:PlaySound("GeJiu_MJ", player.self_user.sex, "gang")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框")
@ -796,7 +798,6 @@ function M:__CloseTip()
self._pop_tip_choice:Dispose()
self._pop_tip_choice = nil
end
end
function M:__CloseGangTip()
@ -806,8 +807,6 @@ function M:__CloseGangTip()
end
end
function M:closeTipOnTuoguan()
self:__CloseTip()
end

View File

@ -404,7 +404,7 @@ function M:EventInit()
---
local isZiMo = win_seat == lose_seat
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2))
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound("JinXi_MJ", player.self_user.sex, hu_sound)
@ -420,6 +420,10 @@ function M:EventInit()
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("JinXi_MJ",
string.format("extend/majiang/jinxi/sound/%s/%s.mp3", ViewUtil.Sex_Chat[player.self_user.sex],
com_name))
local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_JinXi/" .. com_name)
coroutine.wait(0.3)
end
@ -803,16 +807,16 @@ function M:OnFangziAction(...)
-- local pNode = info._mask_liangpai
local effect = UIPackage.CreateObject("Extend_MJ_JinXi", "FzEffect")
if fz.type == FZType.Peng then
self:PlaySound("JinXi_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框")
elseif fz.type == FZType.Chi then
self:PlaySound("JinXi_MJ", player.self_user.sex, "chi" .. math.random(1, 3))
self:PlaySound("JinXi_MJ", player.self_user.sex, "chi")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
else
self:PlaySound("JinXi_MJ", player.self_user.sex, "gang" .. math.random(1, 2))
self:PlaySound("JinXi_MJ", player.self_user.sex, "gang")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框")

View File

@ -402,7 +402,7 @@ function M:EventInit()
---
local isZiMo = win_seat == lose_seat
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2))
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound("LiChuan_MJ", player.self_user.sex, hu_sound)
@ -418,6 +418,10 @@ function M:EventInit()
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("LiChuan_MJ",
string.format("extend/majiang/lichuan/sound/%s/%s.mp3", ViewUtil.Sex_Chat[player.self_user.sex],
com_name))
local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_LiChuan/" .. com_name)
coroutine.wait(0.3)
end
@ -805,16 +809,16 @@ function M:OnFangziAction(...)
-- local pNode = info._mask_liangpai
local effect = UIPackage.CreateObject("Extend_MJ_LiChuan", "FzEffect")
if fz.type == FZType.Peng then
self:PlaySound("LiChuan_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框")
elseif fz.type == FZType.Chi then
self:PlaySound("LiChuan_MJ", player.self_user.sex, "chi" .. math.random(1, 3))
self:PlaySound("LiChuan_MJ", player.self_user.sex, "chi")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
else
self:PlaySound("LiChuan_MJ", player.self_user.sex, "gang" .. math.random(1, 2))
self:PlaySound("LiChuan_MJ", player.self_user.sex, "gang")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框")

View File

@ -403,7 +403,7 @@ function M:EventInit()
---
local isZiMo = win_seat == lose_seat
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2))
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound("NanCheng_MJ", player.self_user.sex, hu_sound)
@ -419,6 +419,10 @@ function M:EventInit()
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("NanCheng_MJ",
string.format("extend/majiang/nancheng/sound/%s/%s.mp3", ViewUtil.Sex_Chat[player.self_user.sex],
com_name))
local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_NanCheng/" .. com_name)
print("lingmenghe", "ui://Extend_MJ_NanCheng/" .. com_name)
coroutine.wait(0.3)
@ -805,16 +809,16 @@ function M:OnFangziAction(...)
-- local pNode = info._mask_liangpai
local effect = UIPackage.CreateObject("Extend_MJ_NanCheng", "FzEffect")
if fz.type == FZType.Peng then
self:PlaySound("NanCheng_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框")
elseif fz.type == FZType.Chi then
self:PlaySound("NanCheng_MJ", player.self_user.sex, "chi" .. math.random(1, 3))
self:PlaySound("NanCheng_MJ", player.self_user.sex, "chi")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
else
self:PlaySound("NanCheng_MJ", player.self_user.sex, "gang" .. math.random(1, 2))
self:PlaySound("NanCheng_MJ", player.self_user.sex, "gang")
effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "")
effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "")
-- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Some files were not shown because too many files have changed in this diff Show More