diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua
index cb2a409c..a879eb1b 100644
--- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua
+++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua
@@ -527,7 +527,6 @@ function M:FG_Data_ChatRoom(evt_data)
recode.pid = recode.groupPid
recode.groupId = tonumber(recode.groupId)
end
-
group.records = evt_data.records
end
diff --git a/lua_probject/base_project/Game/Controller/LoddyController.lua b/lua_probject/base_project/Game/Controller/LoddyController.lua
index 227d98ba..2c6730c8 100644
--- a/lua_probject/base_project/Game/Controller/LoddyController.lua
+++ b/lua_probject/base_project/Game/Controller/LoddyController.lua
@@ -58,12 +58,17 @@ local function __ConntectGameServer(cmd, room, host, _data, callback)
end
-function M:CreateRoom(game_id, _data, callback)
+function M:CreateRoom(game_id, dataInfo, callback)
local _client = ControllerManager.WebClient
local data = {}
data.game_id = game_id
data["platform"] = GetPlatform()
- data.config_data = _data
+ data.config_data = dataInfo._data
+ data.name = dataInfo.name
+ data.gameId = game_id
+ data.hpData = dataInfo.hpData
+ data.hpOnOff = 0
+ data.gtype = 1
-- local runtime = os.clock()
_client:send(Protocol.WEB_CREATE_ROOM, data, function(res)
if (res.ReturnCode == Table_Error_code.ERR_IN_ROOM or res.ReturnCode == Table_Error_code.ERR_CREATE_ROOM) then
diff --git a/lua_probject/base_project/Game/Data/Room.lua b/lua_probject/base_project/Game/Data/Room.lua
index ead83b96..333fa999 100644
--- a/lua_probject/base_project/Game/Data/Room.lua
+++ b/lua_probject/base_project/Game/Data/Room.lua
@@ -209,7 +209,7 @@ function RoomConfig:GetDes(sp, str_people_num)
if self.tuoguan then
str = str .. "托管" .. sp
str = str .. "离线" .. self.tuoguan_active_time .. "秒托管" .. sp
- str = str .. str_tuoguan[self.tuoguan_result_type] .. sp
+ -- str = str .. str_tuoguan[self.tuoguan_result_type] .. sp
end
return str
end
diff --git a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
index af3e2681..88e37c4a 100644
--- a/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
+++ b/lua_probject/base_project/Game/View/Family/FamilyChatRoom.lua
@@ -36,7 +36,7 @@ end
local function ChatItemRenderer(index, obj, self)
--local data = self.ChatRoomData.records[index + 1]
- local record = self.group.records[index + 1]
+ local record = self.group.records[#self.group.records - index]
local group = DataManager.groups:get(record.groupId)
--local totalScore = json.decode(data.totalScore)
--local hpData = json.decode(record.hpData)
@@ -122,6 +122,7 @@ end
function FamilyChatRoom:Refalsh()
--self.list_chat.numItems = #self.ChatRoomData.records or 0
self.list_chat.numItems = #self.group.records or 0
+ self.list_chat:ScrollToView(#self.group.records - 1 or 0)
end
-- 新战绩推到时刷新一条
@@ -131,7 +132,7 @@ function FamilyChatRoom:OnNewChatRefalsh(arg)
end
self.list_chat.numItems = #self.group.records or 0
-
+ self.list_chat:ScrollToView(#self.group.records - 1 or 0)
--[[
local groupId = arg.gid
local maxRound = arg.datas.maxRound
diff --git a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua
index b89e108d..6caf9cde 100644
--- a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua
+++ b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua
@@ -346,6 +346,7 @@ function M:NumverRecordRenderer()
obj:GetChild('text_gameType').text = index == 0 and "麻将" or "扑克"
obj:GetChild('text_round').text = info.childNum
obj:GetChild('text_score').text = string.format("%s%s", info.totalScore >= 0 and "+" or "", info.totalScore)
+ obj:GetController('scoreColor').selectedIndex = info.totalScore >= 0 and 1 or 2
obj:GetChild('text_winNum').text = info.winNum
obj:GetChild('btn_lookRecord').touchable = info.childNum ~= 0
obj:GetChild('btn_lookRecord'):GetController('cColor').selectedIndex = info.childNum ~= 0 and 0 or 1
@@ -370,6 +371,7 @@ function M:NumverRecordRenderer()
obj:GetChild('text_gameType').text = index == 0 and "麻将" or "扑克"
obj:GetChild('text_round').text = info.childNum
obj:GetChild('text_score').text = string.format("%s%s", info.totalScore >= 0 and "+" or "", info.totalScore)
+ obj:GetController('scoreColor').selectedIndex = info.totalScore >= 0 and 1 or 2
obj:GetChild('text_winNum').text = info.winNum
obj:GetChild('btn_lookRecord').touchable = info.childNum ~= 0
obj:GetChild('btn_lookRecord'):GetController('cColor').selectedIndex = info.childNum ~= 0 and 0 or 1
@@ -392,6 +394,7 @@ end
function M:NumberRecordDetailRender()
local list_numberRecordDetail = self._viewlist_numberRecordDetail
list_numberRecordDetail:SetVirtual()
+
list_numberRecordDetail.itemRenderer = function(index, obj)
local info = self.records[self.gameTypeNum][self.readStatusNum][index + 1]
obj:GetChild('text_gameName').text = info.game_info.name
@@ -605,6 +608,11 @@ function M:RecursionGetNumberRecord(fgCtr, groupId, uid, index)
for i = 1, #info.totalScore do
if info.totalScore[i].accId == uid then
totalScore = info.totalScore[i].score
+ if i ~= 1 then
+ local fristInfo = info.totalScore[1]
+ info.totalScore[1] = info.totalScore[i]
+ info.totalScore[i] = fristInfo
+ end
end
end
if info.round ~= "1" or totalScore ~= 0 then
diff --git a/lua_probject/base_project/Game/View/Family/FamilyRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyRecord.lua
index 08c2691f..3b8530b2 100644
--- a/lua_probject/base_project/Game/View/Family/FamilyRecord.lua
+++ b/lua_probject/base_project/Game/View/Family/FamilyRecord.lua
@@ -105,7 +105,7 @@ function M:SetPageNum()
self:SetTouch(self._btn_nextPage)
else
local num = self.allCount % self.onePageChildCount
- self._viewList_record.numItems = num == 0 and self.onePageChildCount or num
+ self._viewList_record.numItems = num == 0 and (self.allCount == 0 and 0 or self.onePageChildCount) or num
self._viewList_record:RefreshVirtualList()
self:SetDontTouch(self._btn_nextPage)
end
diff --git a/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua
index 09ca5193..1943472b 100644
--- a/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua
+++ b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua
@@ -25,17 +25,142 @@ end
function M:init(url)
BaseWindow.init(self, url)
+
+
self.gl_view = GameListView.new(self._view, 1, 1, nil, function(mode_data)
self:OnCreateRoom(mode_data)
end, true, { _lobby_create = true })
--self.gl_view.IsHallGame=true
end
+local tuoguanTimeList = { 10, 30, 60, 120, 180, 240, 300 }
+-- 显示玩法体力值配置
+
function M:OnCreateRoom(mode_data)
if mode_data.type == 0 then
+ local tex_times = self._view:GetChild("tex_times")
+
+ -- 通用设置
+ local com_editSetting = self.gl_view:GetModeData().data._config:GetChild("com_editSetting")
+
+ self.cGps = com_editSetting:GetController("cGps")
+ self.cTuoguan = com_editSetting:GetController("cTuoguan")
+ self.cJiesan = com_editSetting:GetController("cJiesan")
+ self.cGongneng = com_editSetting:GetController("cGongneng")
+ self.cChat = com_editSetting:GetController("cChat")
+ self.cMisslie = com_editSetting:GetController("cMisslie")
+
+ self.hpData = {}
local mode = mode_data.data
--点击建房按钮后保存当前游戏的config
+ local btn_ok = self._view:GetChild("btn_ok")
local _data = mode:SelectedConfigData()
+ _data.game_id = mode.game_data.game_id
+ _data.isNonnegative = 0
+ _data.hp_no_limit = 0
+ _data.tuoguan = true
+
+ _data.tuoguan_active_timeIndex = 0
+ _data.tuoguan_result_type = 0
+ _data.isHidden = 0
+ _data.isvip = 0
+
+ -- GPS设置
+ local dis = 0
+ if self.cGps.selectedIndex == 0 then
+ dis = 100
+ elseif self.cGps.selectedIndex == 1 then
+ dis = 500
+ elseif self.cGps.selectedIndex == 2 then
+ dis = 0
+ end
+ _data.GPSDetection = dis
+
+ -- 托管
+ local time = 0
+ if self.cTuoguan.selectedIndex == 1 then
+ time = 30
+ elseif self.cTuoguan.selectedIndex == 2 then
+ time = 60
+ elseif self.cTuoguan.selectedIndex == 3 then
+ time = 120
+ end
+ _data.tuoguan_active_time = time
+
+ -- 解散
+ self.hpData.JieShan = self.cJiesan.selectedIndex + 1
+ -- 功能
+ self.hpData.GongNeng = self.cGongneng.selectedIndex + 1
+ -- 开启聊天
+ self.hpData.BanChat = self.cChat.selectedIndex
+ -- 开启表情互动
+ self.hpData.BanMissile = self.cMisslie.selectedIndex
+
+
+ local hpType = mode.game_data.hpType
+ self.hpData.limitInRoom = 0
+ self.hpData.limitPlay = 0
+ self.hpData.limitloot = 0
+ self.hpData.robot_room = 0
+ self.hpData.type = self._type
+ self.hpData.limitPump = self._limitPump
+ local hpOnOff = 0
+ if hpType > 1 and hpOnOff == 1 then
+ if self.hpData.limitInRoom < self.hpData.limitPlay then
+ ViewUtil.ErrorMsg(self._root_view, -9, "进入限制必须大于等于退出限制")
+ return
+ end
+ if self.hpData.limitPlay == 0 then
+ ViewUtil.ErrorMsg(self._root_view, -9, "退出房间限制不能为0")
+ return
+ end
+ end
+ local times = tonumber(tex_times.text)
+ self.hpData.times = ad2d(tonumber(times))
+
+ self.hpData.tex_times_room = 1
+
+
+ self.hpData.basePump = 0
+
+ self.hpData.rewards_list = {}
+
+ self.hpData.rewards_type = 1
+ self.hpData.rewardValueType = 1
+
+ self.hpData.xipai_rewardType = 1
+ self.hpData.xipai_rewardValueType = 1
+
+ self.hpData.anchou_rewardType = 1
+ self.hpData.anchou_rewardValueType = 1
+
+
+ if self.hpData.rewardValueType == 1 then
+ self.hpData.rewards_val = 100
+ else
+ self.hpData.rewards_val = ad2d(10000)
+ end
+
+ if self.hpData.xipai_rewardValueType == 1 then
+ self.hpData.xipai_rewards_val = 100
+ else
+ self.hpData.xipai_rewards_val = ad2d(10000)
+ end
+
+
+ if self.hpData.anchou_rewardValueType == 1 then
+ self.hpData.anchou_rewards_val = 100
+ else
+ self.hpData.anchou_rewards_val = ad2d(10000)
+ end
+
+ local com_editSetting = self._view:GetChild("tex_name")
+
+
+ local tex_name = self._view:GetChild("tex_name")
+ local name = " "
+ -- print("jefe:")
+ pt(self.hpData)
---- print("OnCreateRoom================")
--pt(_data)
if not _data["stamina"] then _data["stamina"] = 0 end
@@ -53,7 +178,6 @@ function M:OnCreateRoom(mode_data)
DataManager.SelfUser.location = Location.new()
end
if _data["GPSDetection"] and _data["GPSDetection"] > 0 and DataManager.SelfUser.location:Location2String() == "" then
- -- if DataManager.SelfUser.location:Location2String() == "" then
ViewUtil.ErrorTip(nil, "正在获取GPS定位,请稍候重试。")
get_gps()
return
@@ -61,7 +185,7 @@ function M:OnCreateRoom(mode_data)
ViewUtil.ShowModalWait(self._root_view, "正在创建房间...")
- loddyCtr:CreateRoom(game_id, _data, function(res)
+ loddyCtr:CreateRoom(game_id, { _data = _data, hpData = self.hpData, name = name }, function(res)
self:__OnCreateRoomAction(res)
end)
end
diff --git a/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua b/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua
index 56b9c85a..de336de3 100644
--- a/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua
+++ b/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua
@@ -52,6 +52,8 @@ function M:init(url)
end)
btn_sound.onClick:Add(function()
+ slider_sound.value = 0
+ GameApplication.Instance.SoundValue = 0
GameApplication.Instance.SoundMute = btn_sound.selected;
end)
diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua
index 488b68eb..565163b5 100644
--- a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua
+++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua
@@ -51,6 +51,9 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
local mainCtr = self._view:GetController("main")
local playerNum = self._view:GetController("playerNum")
local showBtnTypeCtr = self._view:GetController("showType")
+ local Text_BoJing = self._view:GetChild('Text_BoJing')
+
+ Text_BoJing.visible = false
--回放不需要显示还剩下多少牌
if self.flag_back then
@@ -180,6 +183,8 @@ function M:fillResult0(room, peopleNum, result)
infoList.hu_score = infoList.hu_score or 0
infoList.round_score = infoList.round_score or 0
+ playerInfoComp:GetChild("Text_BoJing").visible = false
+
playerInfoComp:GetChild("text_name").text = playInfo.self_user.nick_name
playerInfoComp:GetChild("Text_BoJing").text = infoList.jing_score >= 0 and
string.format("+%d", infoList.jing_score) or infoList.jing_score
diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
index 01fc7fd1..ad194e88 100644
--- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
+++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua
@@ -534,6 +534,15 @@ function M:EventInit()
self:PlayMJSound("end_music.mp3")
end
end
+ -- 扣分动画
+ if result then
+ for _, pScore in pairs(result.info_list) do
+ local infoView = self._player_info[self:GetPos(pScore.seat)]
+ infoView:UpdateScore(pScore.total_score, true)
+ end
+ end
+ coroutine.wait(0.3)
+
coroutine.wait(0.5)
self._clearingView:Show()
self._popEvent = true
diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua
index bc898d8c..ad252d7a 100644
--- a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua
+++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua
@@ -1,6 +1,7 @@
local MJPlayBackView = require("main.majiang.MJPlayBackView")
local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView")
+local HuCardImg = import(".HuCardImg")
local Record_Event = import(".RecordEvent")
@@ -27,6 +28,12 @@ function M:InitView(url)
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
+
+ self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
+ self.asset_group = "FuZhou_MJ"
+ self.HuCardImg_path = "ui://Extend_MJ_FuZhou/"
+ self.Sound_path = "extend/majiang/fuzhou/sound/"
+
self._eventmap = {}
self._cmdmap = {}
@@ -37,6 +44,7 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
+
self.com_logocType.selectedIndex = 0
end
@@ -59,7 +67,7 @@ function M:FillRoomData(data)
for i = 1, #room.player_list do
local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)]
- card_info:Clear()
+ card_info:Clear()
table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
@@ -99,15 +107,71 @@ function M:ShowStep(index)
end
if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
local card = p.outcard_list[#p.outcard_list]
- info:UpdateOutCardList(nil, nil, self._cursor)
+ info:UpdateOutCardList(nil, card, self._cursor)
+ self:PlayMJSound("chupai.mp3")
+ self:PlaySound("FuZhou_MJ", p.self_user.sex, tostring(card))
else
info:UpdateOutCardList()
end
- if (step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat) or step.cmd == Record_Event.Evt_Action then
+ if (step.cmd == Record_Event.Evt_GetCard or step.cmd == Record_Event.Evt_Action) and p.seat == step.current_out_seat then
info:UpdateHandCard(true, true)
+ if step.cmd == Record_Event.Evt_Action then
+ pt("lingmeng step ", step)
+ local fz = step.fz
+ local info = self._player_card_info[self:GetPos(i)]
+ local loader_HuEffect = info._viewClip_Peng_Gang
+ local effects = ""
+ if fz.type == FZType.Peng then
+ self:PlaySound("Main_Majiang", p.self_user.sex, "peng")
+ effects = "clip_peng"
+ elseif fz.type == FZType.Chi then
+
+ else
+ self:PlaySound("Main_Majiang", p.self_user.sex, "gang")
+ effects = "clip_gang"
+ end
+ local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", effects))
+ clip:SetSize(loader_HuEffect.width, loader_HuEffect.height)
+ loader_HuEffect:AddChild(clip)
+ clip:SetPlaySettings(0, -1, 1, -1)
+ clip.onPlayEnd:Add(function()
+ if clip.parent then
+ clip.parent:RemoveChild(clip)
+ end
+ clip:Dispose()
+ end)
+ clip.playing = true
+ coroutine.start(function()
+ coroutine.wait(0.3)
+ self._popEvent = true
+ end)
+ end
else
info:UpdateHandCard(false, true)
end
+ ----多人胡的时候,同时显示胡
+ if step.cmd == Record_Event.Evt_Result then
+ --所有都显示胡吧,暂时没做胡和自摸的判断
+ if step.result_data.info_list[i].is_win then
+ local info2 = self._player_card_info[self:GetPos(step.result_data.info_list[i].seat)]
+ local loader_HuEffect = info2._viewLoader_selfHuCardEffect
+ local isZiMo = false
+ DataManager.CurrenRoom.isZiMoHu = isZiMo
+ local hu_sound = isZiMo and ("zimo") or ("hu")
+ printlog("声音====>>>", hu_sound)
+ self:PlaySound(self.asset_group, p.self_user.sex, hu_sound)
+
+ local effects = isZiMo and ("tile_zimo") or ("tile_hu")
+ loader_HuEffect.visible = true
+ loader_HuEffect.url = "ui://Main_Majiang/" .. effects
+ loader_HuEffect:SetScale(2, 2)
+ local hu_tween = loader_HuEffect:TweenScale(Vector2(1, 1), 0.3)
+ hu_tween:SetEase(EaseType.QuartOut)
+ hu_tween:OnComplete(function()
+ loader_HuEffect.visible = false
+ end)
+ end
+ end
end
if step.cmd == Record_Event.Evt_Win then
self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
@@ -141,23 +205,125 @@ function M:ShowStep(index)
end
if step.cmd == Record_Event.Evt_Result then
if not self.result then
- self.result = EXClearingView.new(self, { flag_back = true })
- self.result:InitData(0, self._room, step.result_data)
+ local result = step.result_data
+ self.result = EXClearingView.new(self, { flag_back = true })
+ self.result:InitData(0, self._room, result)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
- -- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
+ self.result._view.visible = false
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
+
+ local liuju = result and result.liuju or nil
+ coroutine.start(function()
+ coroutine.wait(0.3)
+
+ --逐个显示胡的特效
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local player = self._room:GetPlayerBySeat(hu_info.seat)
+ local info = self._player_card_info[self:GetPos(hu_info.seat)]
+
+ if hu_info.is_win then
+ local win_list = hu_info.win_list
+
+ local list_HuCardEffect = info._viewList_HuEffect
+ local Effects = {}
+ --先循环一遍把杠上开花放在最前面
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+ if HuMsg.type > 2 and HuMsg.type < 60 then
+ if self.HuCardImg[HuMsg.type][1] == "tile_cs_gangshanghua" then
+ local imgPath = "ui://Main_Majiang/tile_cs_gangshanghua"
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ table.remove(win_list, i)
+ break
+ end
+ end
+ end
+
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+
+ -- ↓↓↓先排列好特效图片
+ if HuMsg.type > 2 and HuMsg.type < 60 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)
+
+ local imgList = self.HuCardImg[HuMsg.type]
+ for _, img in pairs(imgList) do
+ local imgPath = "ui://Main_Majiang/" .. img
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ end
+ end
+ end
+
+ --小于四个字段时动态调整胡特效
+ if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
+ list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
+ else
+ list_HuCardEffect.columnGap = 0
+ end
+
+ -- ↓↓↓播放动画
+ for _, imgObj in pairs(Effects) do
+ imgObj.visible = true
+
+ local effect_xingxing = imgObj:GetChild("effect_xingxing")
+ effect_xingxing:SetPlaySettings(0, -1, 1, -1);
+ effect_xingxing.visible = true
+ effect_xingxing.playing = true
+ effect_xingxing.onPlayEnd:Set(function()
+ effect_xingxing.visible = false
+ end)
+
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader:SetScale(2, 2)
+ imgLoader:Center()
+ imgLoader:TweenScale(Vector2(1, 1), 0.3)
+ coroutine.wait(0.5)
+ end
+
+ coroutine.wait(0.3)
+ list_HuCardEffect:RemoveChildrenToPool()
+ end
+ end
+
+ --统一显示弹出分数
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local head_info = self._player_info[self:GetPos(hu_info.seat)]
+
+ -- 扣分动画
+ head_info:UpdateScore(hu_info.total_score, true)
+ end
+ coroutine.wait(0.3)
+
+ if liuju then
+ self:PlayMJSound("liuju.mp3")
+ coroutine.wait(3)
+ self:PlayMJSound("end_music.mp3")
+ else
+ self:PlayMJSound("end_music.mp3")
+ end
+ coroutine.wait(0.5)
+ self.result._view.visible = true
+ end)
else
self.result._view.visible = true
end
- -- self.result._view:Center()
- -- else
- -- if self.result then
- -- self.result._view.visible = false
- -- end
end
end
@@ -225,7 +391,8 @@ function M:CmdAction(cmd, index)
fz.type = cmd.data.type
fz.card = cmd.data.card
fz.opcard = cmd.data.opcard
- fz.from_seat = cmd.data.from_seat
+ fz.from_seat = cmd.data.from_seat
+ data.fz = fz
local uf = data.player_card_data[cmd.data.from_seat]
if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
table.remove(uf.outcard_list, #uf.outcard_list)
diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua
index 316b4688..f07675cf 100644
--- a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua
+++ b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua
@@ -1,6 +1,7 @@
local MJPlayBackView = require("main.majiang.MJPlayBackView")
local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView")
+local HuCardImg = import(".HuCardImg")
local Record_Event = import(".RecordEvent")
@@ -9,323 +10,489 @@ local M = {}
--- Create a new
function M.new()
- setmetatable(M, { __index = MJPlayBackView })
- local self = setmetatable({}, { __index = M })
- self.class = "PlayBackView"
- self:init()
+ setmetatable(M, { __index = MJPlayBackView })
+ local self = setmetatable({}, { __index = M })
+ self.class = "PlayBackView"
+ self:init()
- return self
+ return self
end
function M:InitView(url)
- local room = self._room
- UIPackage.AddPackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi")
- MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
- local _cardbox = self._view:GetChild("cardbox")
- --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
- self._ctr_cardbox = _cardbox:GetController("c1")
- self._tex_round = self._view:GetChild("tex_round")
- self._tex_LeftCard = self._view:GetChild("remaining_card")
- self._anchor = self._view:GetChild("mask_tips")
- self._eventmap = {}
+ local room = self._room
+ UIPackage.AddPackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi")
+ MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
+ local _cardbox = self._view:GetChild("cardbox")
+ --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
+ self._ctr_cardbox = _cardbox:GetController("c1")
+ self._tex_round = self._view:GetChild("tex_round")
+ self._tex_LeftCard = self._view:GetChild("remaining_card")
+ self._anchor = self._view:GetChild("mask_tips")
- self._cmdmap = {}
- self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard
- self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard
- self._cmdmap[Record_Event.Evt_Action] = self.CmdAction
- self._cmdmap[Record_Event.Evt_Win] = self.CmdWin
- self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
- self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
- self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
- self.com_logocType.selectedIndex = 3
+ self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
+ self.asset_group = "JinXi_MJ"
+ self.HuCardImg_path = "ui://Extend_MJ_JinXi/"
+ self.Sound_path = "extend/majiang/jinxi/sound/"
+
+ self._eventmap = {}
+
+ self._cmdmap = {}
+ self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard
+ self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard
+ self._cmdmap[Record_Event.Evt_Action] = self.CmdAction
+ self._cmdmap[Record_Event.Evt_Win] = self.CmdWin
+ self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
+ self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
+ self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
+
+ self.com_logocType.selectedIndex = 3
end
function M:FillRoomData(data)
- MJPlayBackView.FillRoomData(self)
- if self._win_pic then self._win_pic:Dispose() end
- if self._niao then self._niao:Dispose() end
- self._currentStep = 0
- local room = DataManager.CurrenRoom
- local _player_card_info = self._player_card_info
- local left_count = data.info.left_card
- self:UpdateLeftCard(left_count)
- local round = data.info.round
- self:UpdateRound(round)
+ MJPlayBackView.FillRoomData(self)
+ if self._win_pic then self._win_pic:Dispose() end
+ if self._niao then self._niao:Dispose() end
+ self._currentStep = 0
+ local room = DataManager.CurrenRoom
+ local _player_card_info = self._player_card_info
+ local left_count = data.info.left_card
+ self:UpdateLeftCard(left_count)
+ local round = data.info.round
+ self:UpdateRound(round)
- local roominfo_panel = self._view:GetChild("roominfo_panel1")
- roominfo_panel:GetChild("tex_roomid").text = room.room_id
- roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
+ local roominfo_panel = self._view:GetChild("roominfo_panel1")
+ roominfo_panel:GetChild("tex_roomid").text = room.room_id
+ roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
- for i = 1, #room.player_list do
- local p = room.player_list[i]
- local card_info = _player_card_info[self:GetPos(p.seat)]
+ for i = 1, #room.player_list do
+ local p = room.player_list[i]
+ local card_info = _player_card_info[self:GetPos(p.seat)]
card_info:Clear()
- table.sort(p.card_list, self.HandCardSortAndJing)
- card_info:UpdateHandCard(false, true)
- self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
- end
+ table.sort(p.card_list, self.HandCardSortAndJing)
+ card_info:UpdateHandCard(false, true)
+ self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
+ end
- self:GenerateAllStepData(data)
- self:UpdateStep(1)
+ self:GenerateAllStepData(data)
+ self:UpdateStep(1)
self:Play()
- -- self:ShowStep(0)
+ -- self:ShowStep(0)
end
function M:ShowStep(index)
- local step = self._step[index + 1]
- self:UpdateLeftCard(step.left_card)
- -- self._ctr_cardbox.selectedIndex = step.current_out_seat
- self:UpdateCardBox(self:GetPos(step.current_out_seat))
- self:UpdateStep(index + 1)
- if step.cmd ~= Record_Event.Evt_OutCard then
- self:RemoveCursor()
- end
- for i = 1, #step.player_card_data do
- local p = self._room:GetPlayerBySeat(i)
- local info = self._player_card_info[self:GetPos(i)]
- p.card_list = step.player_card_data[i].card_list
- p.outcard_list = step.player_card_data[i].outcard_list
- p.fz_list = step.player_card_data[i].fz_list
- p.hand_left_count = #p.card_list
- info:Clear()
- info:ResetFzList()
- p.piao_niao = step.player_card_data[i].piao_niao
- local head_info = self._player_info[self:GetPos(i)]
- if p.piao_niao and p.piao_niao > 0 then
- head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao
- head_info._view:GetController("piao_niao").selectedIndex = 1
- else
- head_info._view:GetController("piao_niao").selectedIndex = 0
- end
- if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
- local card = p.outcard_list[#p.outcard_list]
- info:UpdateOutCardList(nil, nil, self._cursor)
- else
- info:UpdateOutCardList()
- end
- if (step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat) or step.cmd == Record_Event.Evt_Action then
- info:UpdateHandCard(true, true)
- else
- info:UpdateHandCard(false, true)
- end
- end
- if step.cmd == Record_Event.Evt_Win then
- self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
- local info = self._player_card_info[self:GetPos(step.win)]
- info._view:AddChild(self._win_pic)
- self._win_pic:Center()
- else
- if self._win_pic then
- self._win_pic:Dispose()
- end
- end
- if step.cmd == Record_Event.Evt_Niao then
- local niao_list = step.niao
- self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_JinXi/Panel_Birds")
- local list = self._niao:GetChild("Lst_birds")
- list:RemoveChildrenToPool()
- for i = 1, #niao_list do
- local item = list:AddItemFromPool()
- item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
- if niao_list[i].score > 0 then
- item:GetController("bg").selectedIndex = 2
- end
- end
- self._view:AddChild(self._niao)
- self._view:AddChild(self._view:GetChild("panel_record"))
- self._niao:Center()
- else
- if self._niao then
- self._niao:Dispose()
- end
- end
- if step.cmd == Record_Event.Evt_Result then
- if not self.result then
+ local step = self._step[index + 1]
+ self:UpdateLeftCard(step.left_card)
+ -- self._ctr_cardbox.selectedIndex = step.current_out_seat
+ self:UpdateCardBox(self:GetPos(step.current_out_seat))
+ self:UpdateStep(index + 1)
+ if step.cmd ~= Record_Event.Evt_OutCard then
+ self:RemoveCursor()
+ end
+ for i = 1, #step.player_card_data do
+ local p = self._room:GetPlayerBySeat(i)
+ local info = self._player_card_info[self:GetPos(i)]
+ p.card_list = step.player_card_data[i].card_list
+ p.outcard_list = step.player_card_data[i].outcard_list
+ p.fz_list = step.player_card_data[i].fz_list
+ p.hand_left_count = #p.card_list
+ info:Clear()
+ info:ResetFzList()
+ p.piao_niao = step.player_card_data[i].piao_niao
+ local head_info = self._player_info[self:GetPos(i)]
+ if p.piao_niao and p.piao_niao > 0 then
+ head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao
+ head_info._view:GetController("piao_niao").selectedIndex = 1
+ else
+ head_info._view:GetController("piao_niao").selectedIndex = 0
+ end
+ if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
+ local card = p.outcard_list[#p.outcard_list]
+ info:UpdateOutCardList(nil, card, self._cursor)
+ self:PlayMJSound("chupai.mp3")
+ self:PlaySound("JinXi_MJ", p.self_user.sex, tostring(card))
+ else
+ info:UpdateOutCardList()
+ end
+ if (step.cmd == Record_Event.Evt_GetCard or step.cmd == Record_Event.Evt_Action) and p.seat == step.current_out_seat then
+ info:UpdateHandCard(true, true)
+ if step.cmd == Record_Event.Evt_Action then
+ pt("lingmeng step ", step)
+ local fz = step.fz
+ local info = self._player_card_info[self:GetPos(i)]
+ local loader_HuEffect = info._viewClip_Peng_Gang
+ local effects = ""
+ if fz.type == FZType.Peng then
+ self:PlaySound("Main_Majiang", p.self_user.sex, "peng")
+ effects = "clip_peng"
+ elseif fz.type == FZType.Chi then
+
+ else
+ self:PlaySound("Main_Majiang", p.self_user.sex, "gang")
+ effects = "clip_gang"
+ end
+ local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", effects))
+ clip:SetSize(loader_HuEffect.width, loader_HuEffect.height)
+ loader_HuEffect:AddChild(clip)
+ clip:SetPlaySettings(0, -1, 1, -1)
+ clip.onPlayEnd:Add(function()
+ if clip.parent then
+ clip.parent:RemoveChild(clip)
+ end
+ clip:Dispose()
+ end)
+ clip.playing = true
+ coroutine.start(function()
+ coroutine.wait(0.3)
+ self._popEvent = true
+ end)
+ end
+ else
+ info:UpdateHandCard(false, true)
+ end
+ ----多人胡的时候,同时显示胡
+ if step.cmd == Record_Event.Evt_Result then
+ --所有都显示胡吧,暂时没做胡和自摸的判断
+ if step.result_data.info_list[i].is_win then
+ local info2 = self._player_card_info[self:GetPos(step.result_data.info_list[i].seat)]
+ local loader_HuEffect = info2._viewLoader_selfHuCardEffect
+ local isZiMo = false
+ DataManager.CurrenRoom.isZiMoHu = isZiMo
+ local hu_sound = isZiMo and ("zimo") or ("hu")
+ printlog("声音====>>>", hu_sound)
+ self:PlaySound(self.asset_group, p.self_user.sex, hu_sound)
+
+ local effects = isZiMo and ("tile_zimo") or ("tile_hu")
+ loader_HuEffect.visible = true
+ loader_HuEffect.url = "ui://Main_Majiang/" .. effects
+ loader_HuEffect:SetScale(2, 2)
+ local hu_tween = loader_HuEffect:TweenScale(Vector2(1, 1), 0.3)
+ hu_tween:SetEase(EaseType.QuartOut)
+ hu_tween:OnComplete(function()
+ loader_HuEffect.visible = false
+ end)
+ end
+ end
+ end
+ if step.cmd == Record_Event.Evt_Win then
+ self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
+ local info = self._player_card_info[self:GetPos(step.win)]
+ info._view:AddChild(self._win_pic)
+ self._win_pic:Center()
+ else
+ if self._win_pic then
+ self._win_pic:Dispose()
+ end
+ end
+ if step.cmd == Record_Event.Evt_Niao then
+ local niao_list = step.niao
+ self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_JinXi/Panel_Birds")
+ local list = self._niao:GetChild("Lst_birds")
+ list:RemoveChildrenToPool()
+ for i = 1, #niao_list do
+ local item = list:AddItemFromPool()
+ item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
+ if niao_list[i].score > 0 then
+ item:GetController("bg").selectedIndex = 2
+ end
+ end
+ self._view:AddChild(self._niao)
+ self._view:AddChild(self._view:GetChild("panel_record"))
+ self._niao:Center()
+ else
+ if self._niao then
+ self._niao:Dispose()
+ end
+ end
+ if step.cmd == Record_Event.Evt_Result then
+ if not self.result then
+ local result = step.result_data
self.result = EXClearingView.new(self, { flag_back = true })
- self.result:InitData(0, self._room, step.result_data)
- self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
- self.result._view.width = GRoot.inst.width
- self.result._view.height = GRoot.inst.height
- -- self.result._view:GetChild("btn_confirm").visible = false
- self._anchor:AddChild(self.result._view)
- self.result._view.x = self._anchor.x * -1
- self.result._view.y = self._anchor.y * -1
- else
- self.result._view.visible = true
- end
- -- self.result._view:Center()
- -- else
- -- if self.result then
- -- self.result._view.visible = false
- -- end
- end
+ self.result:InitData(0, self._room, result)
+ self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
+ self.result._view.width = GRoot.inst.width
+ self.result._view.height = GRoot.inst.height
+ self._anchor:AddChild(self.result._view)
+ self.result._view.visible = false
+ self.result._view.x = self._anchor.x * -1
+ self.result._view.y = self._anchor.y * -1
+
+ local liuju = result and result.liuju or nil
+ coroutine.start(function()
+ coroutine.wait(0.3)
+
+ --逐个显示胡的特效
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local player = self._room:GetPlayerBySeat(hu_info.seat)
+ local info = self._player_card_info[self:GetPos(hu_info.seat)]
+
+ if hu_info.is_win then
+ local win_list = hu_info.win_list
+
+ local list_HuCardEffect = info._viewList_HuEffect
+ local Effects = {}
+ --先循环一遍把杠上开花放在最前面
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+ if HuMsg.type > 2 and HuMsg.type < 60 then
+ if self.HuCardImg[HuMsg.type][1] == "tile_cs_gangshanghua" then
+ local imgPath = "ui://Main_Majiang/tile_cs_gangshanghua"
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ table.remove(win_list, i)
+ break
+ end
+ end
+ end
+
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+
+ -- ↓↓↓先排列好特效图片
+ if HuMsg.type > 2 and HuMsg.type < 60 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)
+
+ local imgList = self.HuCardImg[HuMsg.type]
+ for _, img in pairs(imgList) do
+ local imgPath = "ui://Main_Majiang/" .. img
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ end
+ end
+ end
+
+ --小于四个字段时动态调整胡特效
+ if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
+ list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
+ else
+ list_HuCardEffect.columnGap = 0
+ end
+
+ -- ↓↓↓播放动画
+ for _, imgObj in pairs(Effects) do
+ imgObj.visible = true
+
+ local effect_xingxing = imgObj:GetChild("effect_xingxing")
+ effect_xingxing:SetPlaySettings(0, -1, 1, -1);
+ effect_xingxing.visible = true
+ effect_xingxing.playing = true
+ effect_xingxing.onPlayEnd:Set(function()
+ effect_xingxing.visible = false
+ end)
+
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader:SetScale(2, 2)
+ imgLoader:Center()
+ imgLoader:TweenScale(Vector2(1, 1), 0.3)
+ coroutine.wait(0.5)
+ end
+
+ coroutine.wait(0.3)
+ list_HuCardEffect:RemoveChildrenToPool()
+ end
+ end
+
+ --统一显示弹出分数
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local head_info = self._player_info[self:GetPos(hu_info.seat)]
+
+ -- 扣分动画
+ head_info:UpdateScore(hu_info.total_score, true)
+ end
+ coroutine.wait(0.3)
+
+ if liuju then
+ self:PlayMJSound("liuju.mp3")
+ coroutine.wait(3)
+ self:PlayMJSound("end_music.mp3")
+ else
+ self:PlayMJSound("end_music.mp3")
+ end
+ coroutine.wait(0.5)
+ self.result._view.visible = true
+ end)
+ else
+ self.result._view.visible = true
+ end
+ end
end
function M:GenerateAllStepData(data)
- local cmdList = self.cmdList
- self._step = {}
- local step = {}
- local info = data.info
- step.cmd = ""
- step.left_card = info.left_card
- step.last_out_seat = 0
- step.current_out_seat = 1
- step.win = 0
- step.niao = 0
+ local cmdList = self.cmdList
+ self._step = {}
+ local step = {}
+ local info = data.info
+ step.cmd = ""
+ step.left_card = info.left_card
+ step.last_out_seat = 0
+ step.current_out_seat = 1
+ step.win = 0
+ step.niao = 0
- step.player_card_data = {}
- for i = 1, #self._room.player_list do
- local p = info.playerData[i]
- local u = {}
- u.seat = p.seat
- u.card_list = p.hand_card
- u.hand_left_count = #u.card_list
- u.fz_list = {}
- u.outcard_list = {}
- u.piao_niao = p.piao_niao
- step.player_card_data[u.seat] = u
- end
- self._step[#self._step + 1] = step
+ step.player_card_data = {}
+ for i = 1, #self._room.player_list do
+ local p = info.playerData[i]
+ local u = {}
+ u.seat = p.seat
+ u.card_list = p.hand_card
+ u.hand_left_count = #u.card_list
+ u.fz_list = {}
+ u.outcard_list = {}
+ u.piao_niao = p.piao_niao
+ step.player_card_data[u.seat] = u
+ end
+ self._step[#self._step + 1] = step
- for i = 1, #cmdList do
- local tem = cmdList[i]
- self._cmdmap[tem.cmd](self, tem, i)
- end
+ for i = 1, #cmdList do
+ local tem = cmdList[i]
+ self._cmdmap[tem.cmd](self, tem, i)
+ end
end
function M:CmdGetCard(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.current_out_seat = cmd.seat
- data.left_card = cmd.data.left_count
- local u = data.player_card_data[cmd.seat]
- u.card_list[#u.card_list + 1] = cmd.data.card
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.current_out_seat = cmd.seat
+ data.left_card = cmd.data.left_count
+ local u = data.player_card_data[cmd.seat]
+ u.card_list[#u.card_list + 1] = cmd.data.card
end
function M:CmdOutCard(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.last_out_seat = cmd.seat
- local u = data.player_card_data[cmd.seat]
- list_remove(u.card_list, cmd.data.card)
- table.sort(u.card_list, self.HandCardSortAndJing)
- u.outcard_list[#u.outcard_list + 1] = cmd.data.card
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.last_out_seat = cmd.seat
+ local u = data.player_card_data[cmd.seat]
+ list_remove(u.card_list, cmd.data.card)
+ table.sort(u.card_list, self.HandCardSortAndJing)
+ u.outcard_list[#u.outcard_list + 1] = cmd.data.card
end
function M:CmdAction(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.last_out_seat = 0
- data.current_out_seat = cmd.seat
- local u = data.player_card_data[cmd.seat]
- for i = 1, #cmd.data.opcard do
- list_remove(u.card_list, cmd.data.opcard[i])
- end
- local fz = {}
- fz.type = cmd.data.type
- fz.card = cmd.data.card
- fz.opcard = cmd.data.opcard
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.last_out_seat = 0
+ data.current_out_seat = cmd.seat
+ local u = data.player_card_data[cmd.seat]
+ for i = 1, #cmd.data.opcard do
+ list_remove(u.card_list, cmd.data.opcard[i])
+ end
+ local fz = {}
+ fz.type = cmd.data.type
+ fz.card = cmd.data.card
+ fz.opcard = cmd.data.opcard
fz.from_seat = cmd.data.from_seat
- local uf = data.player_card_data[cmd.data.from_seat]
- if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
- table.remove(uf.outcard_list, #uf.outcard_list)
- end
- if fz.type ~= FZType.Gang_Peng then
- u.fz_list[#u.fz_list + 1] = fz
- else
- for i = 1, #u.fz_list do
- if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then
- u.fz_list[i].type = FZType.Gang_Peng
- end
- end
- end
+ data.fz = fz
+ local uf = data.player_card_data[cmd.data.from_seat]
+ if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
+ table.remove(uf.outcard_list, #uf.outcard_list)
+ end
+ if fz.type ~= FZType.Gang_Peng then
+ u.fz_list[#u.fz_list + 1] = fz
+ else
+ for i = 1, #u.fz_list do
+ if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then
+ u.fz_list[i].type = FZType.Gang_Peng
+ end
+ end
+ end
end
function M:CmdWin(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.win = cmd.seat
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.win = cmd.seat
end
function M:CmdNiao(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.niao = cmd.data.niao
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.niao = cmd.data.niao
end
function M:CmdPiao(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.player_card_data[cmd.seat].piao_niao = cmd.data.num
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.player_card_data[cmd.seat].piao_niao = cmd.data.num
end
function M:CmdResult(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.result_data = cmd.data
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.result_data = cmd.data
end
function M:CopyLastStep(index)
- local step = {}
- local last_step = self._step[index]
- step = membe_deep_clone(last_step)
- self._step[#self._step + 1] = step
- step.result_data = nil
- return step
+ local step = {}
+ local last_step = self._step[index]
+ step = membe_deep_clone(last_step)
+ self._step[#self._step + 1] = step
+ step.result_data = nil
+ return step
end
function M:UpdateLeftCard(num)
- self._tex_LeftCard.text = "余" .. num .. "张"
+ self._tex_LeftCard.text = "余" .. num .. "张"
end
function M:UpdateCardBox(seat)
- local index = seat
- local people_num = self._room.room_config.people_num
- if people_num == 2 and seat == 2 then
- index = 3
- elseif people_num == 3 and seat == 3 then
- index = 4
- end
- self._ctr_cardbox.selectedIndex = index
+ local index = seat
+ local people_num = self._room.room_config.people_num
+ if people_num == 2 and seat == 2 then
+ index = 3
+ elseif people_num == 3 and seat == 3 then
+ index = 4
+ end
+ self._ctr_cardbox.selectedIndex = index
end
function M:UpdateRound()
- self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
- self._room.room_config.round)
+ self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
+ self._room.room_config.round)
end
function M:UpdateStep(step)
- self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步"
+ self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步"
end
function M.HandCardSortAndJing(a, b)
- local jing = DataManager.CurrenRoom.jing
- if a == jing or b == jing then
- if a == b then
- return a < b
- end
- return a == jing
- else
- if a < 200 then
- a = a + 1000
- elseif a < 300 then
- a = a + 3000
- elseif a < 400 then
- a = a + 2000
- else
- a = a + 4000
- end
- if b < 200 then
- b = b + 1000
- elseif b < 300 then
- b = b + 3000
- elseif b < 400 then
- b = b + 2000
- else
- b = b + 4000
- end
- return a < b
- end
+ local jing = DataManager.CurrenRoom.jing
+ if a == jing or b == jing then
+ if a == b then
+ return a < b
+ end
+ return a == jing
+ else
+ if a < 200 then
+ a = a + 1000
+ elseif a < 300 then
+ a = a + 3000
+ elseif a < 400 then
+ a = a + 2000
+ else
+ a = a + 4000
+ end
+ if b < 200 then
+ b = b + 1000
+ elseif b < 300 then
+ b = b + 3000
+ elseif b < 400 then
+ b = b + 2000
+ else
+ b = b + 4000
+ end
+ return a < b
+ end
end
return M
diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua
index 333e1d3b..86503d58 100644
--- a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua
+++ b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua
@@ -1,6 +1,7 @@
local MJPlayBackView = require("main.majiang.MJPlayBackView")
local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView")
+local HuCardImg = import(".HuCardImg")
local Record_Event = import(".RecordEvent")
@@ -27,6 +28,12 @@ function M:InitView(url)
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
+
+ self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
+ self.asset_group = "LiChuan_MJ"
+ self.HuCardImg_path = "ui://Extend_MJ_LiChuan/"
+ self.Sound_path = "extend/majiang/lichuan/sound/"
+
self._eventmap = {}
self._cmdmap = {}
@@ -100,7 +107,7 @@ function M:ShowStep(index)
end
if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
local card = p.outcard_list[#p.outcard_list]
- info:UpdateOutCardList(nil, nil, self._cursor)
+ info:UpdateOutCardList(nil, card, self._cursor)
self:PlayMJSound("chupai.mp3")
self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card))
else
@@ -108,11 +115,62 @@ function M:ShowStep(index)
end
if (step.cmd == Record_Event.Evt_GetCard or step.cmd == Record_Event.Evt_Action) and p.seat == step.current_out_seat then
info:UpdateHandCard(true, true)
+ if step.cmd == Record_Event.Evt_Action then
+ pt("lingmeng step ", step)
+ local fz = step.fz
+ local info = self._player_card_info[self:GetPos(i)]
+ local loader_HuEffect = info._viewClip_Peng_Gang
+ local effects = ""
+ if fz.type == FZType.Peng then
+ self:PlaySound("Main_Majiang", p.self_user.sex, "peng")
+ effects = "clip_peng"
+ elseif fz.type == FZType.Chi then
+
+ else
+ self:PlaySound("Main_Majiang", p.self_user.sex, "gang")
+ effects = "clip_gang"
+ end
+ local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", effects))
+ clip:SetSize(loader_HuEffect.width, loader_HuEffect.height)
+ loader_HuEffect:AddChild(clip)
+ clip:SetPlaySettings(0, -1, 1, -1)
+ clip.onPlayEnd:Add(function()
+ if clip.parent then
+ clip.parent:RemoveChild(clip)
+ end
+ clip:Dispose()
+ end)
+ clip.playing = true
+ coroutine.start(function()
+ coroutine.wait(0.3)
+ self._popEvent = true
+ end)
+ end
else
info:UpdateHandCard(false, true)
end
- if step.cmd == Record_Event.Evt_Action then
+ ----多人胡的时候,同时显示胡
+ if step.cmd == Record_Event.Evt_Result then
+ --所有都显示胡吧,暂时没做胡和自摸的判断
+ if step.result_data.info_list[i].is_win then
+ local info2 = self._player_card_info[self:GetPos(step.result_data.info_list[i].seat)]
+ local loader_HuEffect = info2._viewLoader_selfHuCardEffect
+ local isZiMo = false
+ DataManager.CurrenRoom.isZiMoHu = isZiMo
+ local hu_sound = isZiMo and ("zimo") or ("hu")
+ printlog("声音====>>>", hu_sound)
+ self:PlaySound(self.asset_group, p.self_user.sex, hu_sound)
+ local effects = isZiMo and ("tile_zimo") or ("tile_hu")
+ loader_HuEffect.visible = true
+ loader_HuEffect.url = "ui://Main_Majiang/" .. effects
+ loader_HuEffect:SetScale(2, 2)
+ local hu_tween = loader_HuEffect:TweenScale(Vector2(1, 1), 0.3)
+ hu_tween:SetEase(EaseType.QuartOut)
+ hu_tween:OnComplete(function()
+ loader_HuEffect.visible = false
+ end)
+ end
end
end
if step.cmd == Record_Event.Evt_Win then
@@ -147,23 +205,125 @@ function M:ShowStep(index)
end
if step.cmd == Record_Event.Evt_Result then
if not self.result then
+ local result = step.result_data
self.result = EXClearingView.new(self, { flag_back = true })
- self.result:InitData(0, self._room, step.result_data)
+ self.result:InitData(0, self._room, result)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
- -- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
+ self.result._view.visible = false
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
+
+ local liuju = result and result.liuju or nil
+ coroutine.start(function()
+ coroutine.wait(0.3)
+
+ --逐个显示胡的特效
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local player = self._room:GetPlayerBySeat(hu_info.seat)
+ local info = self._player_card_info[self:GetPos(hu_info.seat)]
+
+ if hu_info.is_win then
+ local win_list = hu_info.win_list
+
+ local list_HuCardEffect = info._viewList_HuEffect
+ local Effects = {}
+ --先循环一遍把杠上开花放在最前面
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+ if HuMsg.type > 2 and HuMsg.type < 60 then
+ if self.HuCardImg[HuMsg.type][1] == "tile_cs_gangshanghua" then
+ local imgPath = "ui://Main_Majiang/tile_cs_gangshanghua"
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ table.remove(win_list, i)
+ break
+ end
+ end
+ end
+
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+
+ -- ↓↓↓先排列好特效图片
+ if HuMsg.type > 2 and HuMsg.type < 60 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)
+
+ local imgList = self.HuCardImg[HuMsg.type]
+ for _, img in pairs(imgList) do
+ local imgPath = "ui://Main_Majiang/" .. img
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ end
+ end
+ end
+
+ --小于四个字段时动态调整胡特效
+ if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
+ list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
+ else
+ list_HuCardEffect.columnGap = 0
+ end
+
+ -- ↓↓↓播放动画
+ for _, imgObj in pairs(Effects) do
+ imgObj.visible = true
+
+ local effect_xingxing = imgObj:GetChild("effect_xingxing")
+ effect_xingxing:SetPlaySettings(0, -1, 1, -1);
+ effect_xingxing.visible = true
+ effect_xingxing.playing = true
+ effect_xingxing.onPlayEnd:Set(function()
+ effect_xingxing.visible = false
+ end)
+
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader:SetScale(2, 2)
+ imgLoader:Center()
+ imgLoader:TweenScale(Vector2(1, 1), 0.3)
+ coroutine.wait(0.5)
+ end
+
+ coroutine.wait(0.3)
+ list_HuCardEffect:RemoveChildrenToPool()
+ end
+ end
+
+ --统一显示弹出分数
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local head_info = self._player_info[self:GetPos(hu_info.seat)]
+
+ -- 扣分动画
+ head_info:UpdateScore(hu_info.total_score, true)
+ end
+ coroutine.wait(0.3)
+
+ if liuju then
+ self:PlayMJSound("liuju.mp3")
+ coroutine.wait(3)
+ self:PlayMJSound("end_music.mp3")
+ else
+ self:PlayMJSound("end_music.mp3")
+ end
+ coroutine.wait(0.5)
+ self.result._view.visible = true
+ end)
else
self.result._view.visible = true
end
- -- self.result._view:Center()
- -- else
- -- if self.result then
- -- self.result._view.visible = false
- -- end
end
end
@@ -232,6 +392,7 @@ function M:CmdAction(cmd, index)
fz.card = cmd.data.card
fz.opcard = cmd.data.opcard
fz.from_seat = cmd.data.from_seat
+ data.fz = fz
local uf = data.player_card_data[cmd.data.from_seat]
if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
table.remove(uf.outcard_list, #uf.outcard_list)
diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua
index 0c9f3139..14176587 100644
--- a/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua
+++ b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua
@@ -51,6 +51,9 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
local mainCtr = self._view:GetController("main")
local playerNum = self._view:GetController("playerNum")
local showBtnTypeCtr = self._view:GetController("showType")
+ local Text_BoJing = self._view:GetChild('Text_BoJing')
+
+ Text_BoJing.visible = false
--回放不需要显示还剩下多少牌
if self.flag_back then
@@ -180,6 +183,8 @@ function M:fillResult0(room, peopleNum, result)
infoList.hu_score = infoList.hu_score or 0
infoList.round_score = infoList.round_score or 0
+ playerInfoComp:GetChild("Text_BoJing").visible = false
+
playerInfoComp:GetChild("text_name").text = playInfo.self_user.nick_name
playerInfoComp:GetChild("Text_BoJing").text = infoList.jing_score >= 0 and
string.format("+%d", infoList.jing_score) or infoList.jing_score
diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua
index 1b49fd48..ec6804fd 100644
--- a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua
+++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua
@@ -535,6 +535,14 @@ function M:EventInit()
self:PlayMJSound("end_music.mp3")
end
end
+
+ -- 扣分动画
+ for _, pScore in pairs(result.info_list) do
+ local infoView = self._player_info[self:GetPos(pScore.seat)]
+ infoView:UpdateScore(pScore.total_score, true)
+ end
+ coroutine.wait(0.3)
+
coroutine.wait(0.5)
self._clearingView:Show()
self._popEvent = true
diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua
index 54ccf012..3a5d7b4b 100644
--- a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua
+++ b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua
@@ -1,6 +1,7 @@
local MJPlayBackView = require("main.majiang.MJPlayBackView")
local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView")
+local HuCardImg = import(".HuCardImg")
local Record_Event = import(".RecordEvent")
@@ -9,323 +10,489 @@ local M = {}
--- Create a new
function M.new()
- setmetatable(M, { __index = MJPlayBackView })
- local self = setmetatable({}, { __index = M })
- self.class = "PlayBackView"
- self:init()
+ setmetatable(M, { __index = MJPlayBackView })
+ local self = setmetatable({}, { __index = M })
+ self.class = "PlayBackView"
+ self:init()
- return self
+ return self
end
function M:InitView(url)
- local room = self._room
- UIPackage.AddPackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng")
- MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
- local _cardbox = self._view:GetChild("cardbox")
- --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
- self._ctr_cardbox = _cardbox:GetController("c1")
- self._tex_round = self._view:GetChild("tex_round")
- self._tex_LeftCard = self._view:GetChild("remaining_card")
- self._anchor = self._view:GetChild("mask_tips")
- self._eventmap = {}
+ local room = self._room
+ UIPackage.AddPackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng")
+ MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
+ local _cardbox = self._view:GetChild("cardbox")
+ --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
+ self._ctr_cardbox = _cardbox:GetController("c1")
+ self._tex_round = self._view:GetChild("tex_round")
+ self._tex_LeftCard = self._view:GetChild("remaining_card")
+ self._anchor = self._view:GetChild("mask_tips")
- self._cmdmap = {}
- self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard
- self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard
- self._cmdmap[Record_Event.Evt_Action] = self.CmdAction
- self._cmdmap[Record_Event.Evt_Win] = self.CmdWin
- self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
- self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
- self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
- self.com_logocType.selectedIndex = 1
+ self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
+ self.asset_group = "NanCheng_MJ"
+ self.HuCardImg_path = "ui://Extend_MJ_NanCheng/"
+ self.Sound_path = "extend/majiang/nancheng/sound/"
+
+ self._eventmap = {}
+
+ self._cmdmap = {}
+ self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard
+ self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard
+ self._cmdmap[Record_Event.Evt_Action] = self.CmdAction
+ self._cmdmap[Record_Event.Evt_Win] = self.CmdWin
+ self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
+ self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
+ self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
+
+ self.com_logocType.selectedIndex = 1
end
function M:FillRoomData(data)
- MJPlayBackView.FillRoomData(self)
- if self._win_pic then self._win_pic:Dispose() end
- if self._niao then self._niao:Dispose() end
- self._currentStep = 0
- local room = DataManager.CurrenRoom
- local _player_card_info = self._player_card_info
- local left_count = data.info.left_card
- self:UpdateLeftCard(left_count)
- local round = data.info.round
- self:UpdateRound(round)
+ MJPlayBackView.FillRoomData(self)
+ if self._win_pic then self._win_pic:Dispose() end
+ if self._niao then self._niao:Dispose() end
+ self._currentStep = 0
+ local room = DataManager.CurrenRoom
+ local _player_card_info = self._player_card_info
+ local left_count = data.info.left_card
+ self:UpdateLeftCard(left_count)
+ local round = data.info.round
+ self:UpdateRound(round)
- local roominfo_panel = self._view:GetChild("roominfo_panel1")
- roominfo_panel:GetChild("tex_roomid").text = room.room_id
- roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
+ local roominfo_panel = self._view:GetChild("roominfo_panel1")
+ roominfo_panel:GetChild("tex_roomid").text = room.room_id
+ roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
- for i = 1, #room.player_list do
- local p = room.player_list[i]
- local card_info = _player_card_info[self:GetPos(p.seat)]
+ for i = 1, #room.player_list do
+ local p = room.player_list[i]
+ local card_info = _player_card_info[self:GetPos(p.seat)]
card_info:Clear()
- table.sort(p.card_list, self.HandCardSortAndJing)
- card_info:UpdateHandCard(false, true)
- self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
- end
+ table.sort(p.card_list, self.HandCardSortAndJing)
+ card_info:UpdateHandCard(false, true)
+ self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
+ end
- self:GenerateAllStepData(data)
- self:UpdateStep(1)
+ self:GenerateAllStepData(data)
+ self:UpdateStep(1)
self:Play()
- -- self:ShowStep(0)
+ -- self:ShowStep(0)
end
function M:ShowStep(index)
- local step = self._step[index + 1]
- self:UpdateLeftCard(step.left_card)
- -- self._ctr_cardbox.selectedIndex = step.current_out_seat
- self:UpdateCardBox(self:GetPos(step.current_out_seat))
- self:UpdateStep(index + 1)
- if step.cmd ~= Record_Event.Evt_OutCard then
- self:RemoveCursor()
- end
- for i = 1, #step.player_card_data do
- local p = self._room:GetPlayerBySeat(i)
- local info = self._player_card_info[self:GetPos(i)]
- p.card_list = step.player_card_data[i].card_list
- p.outcard_list = step.player_card_data[i].outcard_list
- p.fz_list = step.player_card_data[i].fz_list
- p.hand_left_count = #p.card_list
- info:Clear()
- info:ResetFzList()
- p.piao_niao = step.player_card_data[i].piao_niao
- local head_info = self._player_info[self:GetPos(i)]
- if p.piao_niao and p.piao_niao > 0 then
- head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao
- head_info._view:GetController("piao_niao").selectedIndex = 1
- else
- head_info._view:GetController("piao_niao").selectedIndex = 0
- end
- if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
- local card = p.outcard_list[#p.outcard_list]
- info:UpdateOutCardList(nil, nil, self._cursor)
- else
- info:UpdateOutCardList()
- end
- if (step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat) or step.cmd == Record_Event.Evt_Action then
- info:UpdateHandCard(true, true)
- else
- info:UpdateHandCard(false, true)
- end
- end
- if step.cmd == Record_Event.Evt_Win then
- self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
- local info = self._player_card_info[self:GetPos(step.win)]
- info._view:AddChild(self._win_pic)
- self._win_pic:Center()
- else
- if self._win_pic then
- self._win_pic:Dispose()
- end
- end
- if step.cmd == Record_Event.Evt_Niao then
- local niao_list = step.niao
- self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_NanCheng/Panel_Birds")
- local list = self._niao:GetChild("Lst_birds")
- list:RemoveChildrenToPool()
- for i = 1, #niao_list do
- local item = list:AddItemFromPool()
- item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
- if niao_list[i].score > 0 then
- item:GetController("bg").selectedIndex = 2
- end
- end
- self._view:AddChild(self._niao)
- self._view:AddChild(self._view:GetChild("panel_record"))
- self._niao:Center()
- else
- if self._niao then
- self._niao:Dispose()
- end
- end
- if step.cmd == Record_Event.Evt_Result then
- if not self.result then
+ local step = self._step[index + 1]
+ self:UpdateLeftCard(step.left_card)
+ -- self._ctr_cardbox.selectedIndex = step.current_out_seat
+ self:UpdateCardBox(self:GetPos(step.current_out_seat))
+ self:UpdateStep(index + 1)
+ if step.cmd ~= Record_Event.Evt_OutCard then
+ self:RemoveCursor()
+ end
+ for i = 1, #step.player_card_data do
+ local p = self._room:GetPlayerBySeat(i)
+ local info = self._player_card_info[self:GetPos(i)]
+ p.card_list = step.player_card_data[i].card_list
+ p.outcard_list = step.player_card_data[i].outcard_list
+ p.fz_list = step.player_card_data[i].fz_list
+ p.hand_left_count = #p.card_list
+ info:Clear()
+ info:ResetFzList()
+ p.piao_niao = step.player_card_data[i].piao_niao
+ local head_info = self._player_info[self:GetPos(i)]
+ if p.piao_niao and p.piao_niao > 0 then
+ head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao
+ head_info._view:GetController("piao_niao").selectedIndex = 1
+ else
+ head_info._view:GetController("piao_niao").selectedIndex = 0
+ end
+ if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
+ local card = p.outcard_list[#p.outcard_list]
+ info:UpdateOutCardList(nil, card, self._cursor)
+ self:PlayMJSound("chupai.mp3")
+ self:PlaySound("NanCheng_MJ", p.self_user.sex, tostring(card))
+ else
+ info:UpdateOutCardList()
+ end
+ if (step.cmd == Record_Event.Evt_GetCard or step.cmd == Record_Event.Evt_Action) and p.seat == step.current_out_seat then
+ info:UpdateHandCard(true, true)
+ if step.cmd == Record_Event.Evt_Action then
+ pt("lingmeng step ", step)
+ local fz = step.fz
+ local info = self._player_card_info[self:GetPos(i)]
+ local loader_HuEffect = info._viewClip_Peng_Gang
+ local effects = ""
+ if fz.type == FZType.Peng then
+ self:PlaySound("Main_Majiang", p.self_user.sex, "peng")
+ effects = "clip_peng"
+ elseif fz.type == FZType.Chi then
+
+ else
+ self:PlaySound("Main_Majiang", p.self_user.sex, "gang")
+ effects = "clip_gang"
+ end
+ local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", effects))
+ clip:SetSize(loader_HuEffect.width, loader_HuEffect.height)
+ loader_HuEffect:AddChild(clip)
+ clip:SetPlaySettings(0, -1, 1, -1)
+ clip.onPlayEnd:Add(function()
+ if clip.parent then
+ clip.parent:RemoveChild(clip)
+ end
+ clip:Dispose()
+ end)
+ clip.playing = true
+ coroutine.start(function()
+ coroutine.wait(0.3)
+ self._popEvent = true
+ end)
+ end
+ else
+ info:UpdateHandCard(false, true)
+ end
+ ----多人胡的时候,同时显示胡
+ if step.cmd == Record_Event.Evt_Result then
+ --所有都显示胡吧,暂时没做胡和自摸的判断
+ if step.result_data.info_list[i].is_win then
+ local info2 = self._player_card_info[self:GetPos(step.result_data.info_list[i].seat)]
+ local loader_HuEffect = info2._viewLoader_selfHuCardEffect
+ local isZiMo = false
+ DataManager.CurrenRoom.isZiMoHu = isZiMo
+ local hu_sound = isZiMo and ("zimo") or ("hu")
+ printlog("声音====>>>", hu_sound)
+ self:PlaySound(self.asset_group, p.self_user.sex, hu_sound)
+
+ local effects = isZiMo and ("tile_zimo") or ("tile_hu")
+ loader_HuEffect.visible = true
+ loader_HuEffect.url = "ui://Main_Majiang/" .. effects
+ loader_HuEffect:SetScale(2, 2)
+ local hu_tween = loader_HuEffect:TweenScale(Vector2(1, 1), 0.3)
+ hu_tween:SetEase(EaseType.QuartOut)
+ hu_tween:OnComplete(function()
+ loader_HuEffect.visible = false
+ end)
+ end
+ end
+ end
+ if step.cmd == Record_Event.Evt_Win then
+ self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
+ local info = self._player_card_info[self:GetPos(step.win)]
+ info._view:AddChild(self._win_pic)
+ self._win_pic:Center()
+ else
+ if self._win_pic then
+ self._win_pic:Dispose()
+ end
+ end
+ if step.cmd == Record_Event.Evt_Niao then
+ local niao_list = step.niao
+ self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_NanCheng/Panel_Birds")
+ local list = self._niao:GetChild("Lst_birds")
+ list:RemoveChildrenToPool()
+ for i = 1, #niao_list do
+ local item = list:AddItemFromPool()
+ item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
+ if niao_list[i].score > 0 then
+ item:GetController("bg").selectedIndex = 2
+ end
+ end
+ self._view:AddChild(self._niao)
+ self._view:AddChild(self._view:GetChild("panel_record"))
+ self._niao:Center()
+ else
+ if self._niao then
+ self._niao:Dispose()
+ end
+ end
+ if step.cmd == Record_Event.Evt_Result then
+ if not self.result then
+ local result = step.result_data
self.result = EXClearingView.new(self, { flag_back = true })
- self.result:InitData(0, self._room, step.result_data)
- self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
- self.result._view.width = GRoot.inst.width
- self.result._view.height = GRoot.inst.height
- -- self.result._view:GetChild("btn_confirm").visible = false
- self._anchor:AddChild(self.result._view)
- self.result._view.x = self._anchor.x * -1
- self.result._view.y = self._anchor.y * -1
- else
- self.result._view.visible = true
- end
- -- self.result._view:Center()
- -- else
- -- if self.result then
- -- self.result._view.visible = false
- -- end
- end
+ self.result:InitData(0, self._room, result)
+ self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
+ self.result._view.width = GRoot.inst.width
+ self.result._view.height = GRoot.inst.height
+ self._anchor:AddChild(self.result._view)
+ self.result._view.visible = false
+ self.result._view.x = self._anchor.x * -1
+ self.result._view.y = self._anchor.y * -1
+
+ local liuju = result and result.liuju or nil
+ coroutine.start(function()
+ coroutine.wait(0.3)
+
+ --逐个显示胡的特效
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local player = self._room:GetPlayerBySeat(hu_info.seat)
+ local info = self._player_card_info[self:GetPos(hu_info.seat)]
+
+ if hu_info.is_win then
+ local win_list = hu_info.win_list
+
+ local list_HuCardEffect = info._viewList_HuEffect
+ local Effects = {}
+ --先循环一遍把杠上开花放在最前面
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+ if HuMsg.type > 2 and HuMsg.type < 60 then
+ if self.HuCardImg[HuMsg.type][1] == "tile_cs_gangshanghua" then
+ local imgPath = "ui://Main_Majiang/tile_cs_gangshanghua"
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ table.remove(win_list, i)
+ break
+ end
+ end
+ end
+
+ for i = 1, #win_list do
+ local HuMsg = win_list[i]
+
+ -- ↓↓↓先排列好特效图片
+ if HuMsg.type > 2 and HuMsg.type < 60 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)
+
+ local imgList = self.HuCardImg[HuMsg.type]
+ for _, img in pairs(imgList) do
+ local imgPath = "ui://Main_Majiang/" .. img
+ local imgObj = list_HuCardEffect:AddItemFromPool()
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader.url = imgPath
+ imgObj.visible = false
+ Effects[#Effects + 1] = imgObj
+ end
+ end
+ end
+
+ --小于四个字段时动态调整胡特效
+ if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
+ list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
+ else
+ list_HuCardEffect.columnGap = 0
+ end
+
+ -- ↓↓↓播放动画
+ for _, imgObj in pairs(Effects) do
+ imgObj.visible = true
+
+ local effect_xingxing = imgObj:GetChild("effect_xingxing")
+ effect_xingxing:SetPlaySettings(0, -1, 1, -1);
+ effect_xingxing.visible = true
+ effect_xingxing.playing = true
+ effect_xingxing.onPlayEnd:Set(function()
+ effect_xingxing.visible = false
+ end)
+
+ local imgLoader = imgObj:GetChild("loader_img")
+ imgLoader:SetScale(2, 2)
+ imgLoader:Center()
+ imgLoader:TweenScale(Vector2(1, 1), 0.3)
+ coroutine.wait(0.5)
+ end
+
+ coroutine.wait(0.3)
+ list_HuCardEffect:RemoveChildrenToPool()
+ end
+ end
+
+ --统一显示弹出分数
+ for i = 1, #result.info_list do
+ local hu_info = result.info_list[i]
+ local head_info = self._player_info[self:GetPos(hu_info.seat)]
+
+ -- 扣分动画
+ head_info:UpdateScore(hu_info.total_score, true)
+ end
+ coroutine.wait(0.3)
+
+ if liuju then
+ self:PlayMJSound("liuju.mp3")
+ coroutine.wait(3)
+ self:PlayMJSound("end_music.mp3")
+ else
+ self:PlayMJSound("end_music.mp3")
+ end
+ coroutine.wait(0.5)
+ self.result._view.visible = true
+ end)
+ else
+ self.result._view.visible = true
+ end
+ end
end
function M:GenerateAllStepData(data)
- local cmdList = self.cmdList
- self._step = {}
- local step = {}
- local info = data.info
- step.cmd = ""
- step.left_card = info.left_card
- step.last_out_seat = 0
- step.current_out_seat = 1
- step.win = 0
- step.niao = 0
+ local cmdList = self.cmdList
+ self._step = {}
+ local step = {}
+ local info = data.info
+ step.cmd = ""
+ step.left_card = info.left_card
+ step.last_out_seat = 0
+ step.current_out_seat = 1
+ step.win = 0
+ step.niao = 0
- step.player_card_data = {}
- for i = 1, #self._room.player_list do
- local p = info.playerData[i]
- local u = {}
- u.seat = p.seat
- u.card_list = p.hand_card
- u.hand_left_count = #u.card_list
- u.fz_list = {}
- u.outcard_list = {}
- u.piao_niao = p.piao_niao
- step.player_card_data[u.seat] = u
- end
- self._step[#self._step + 1] = step
+ step.player_card_data = {}
+ for i = 1, #self._room.player_list do
+ local p = info.playerData[i]
+ local u = {}
+ u.seat = p.seat
+ u.card_list = p.hand_card
+ u.hand_left_count = #u.card_list
+ u.fz_list = {}
+ u.outcard_list = {}
+ u.piao_niao = p.piao_niao
+ step.player_card_data[u.seat] = u
+ end
+ self._step[#self._step + 1] = step
- for i = 1, #cmdList do
- local tem = cmdList[i]
- self._cmdmap[tem.cmd](self, tem, i)
- end
+ for i = 1, #cmdList do
+ local tem = cmdList[i]
+ self._cmdmap[tem.cmd](self, tem, i)
+ end
end
function M:CmdGetCard(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.current_out_seat = cmd.seat
- data.left_card = cmd.data.left_count
- local u = data.player_card_data[cmd.seat]
- u.card_list[#u.card_list + 1] = cmd.data.card
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.current_out_seat = cmd.seat
+ data.left_card = cmd.data.left_count
+ local u = data.player_card_data[cmd.seat]
+ u.card_list[#u.card_list + 1] = cmd.data.card
end
function M:CmdOutCard(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.last_out_seat = cmd.seat
- local u = data.player_card_data[cmd.seat]
- list_remove(u.card_list, cmd.data.card)
- table.sort(u.card_list, self.HandCardSortAndJing)
- u.outcard_list[#u.outcard_list + 1] = cmd.data.card
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.last_out_seat = cmd.seat
+ local u = data.player_card_data[cmd.seat]
+ list_remove(u.card_list, cmd.data.card)
+ table.sort(u.card_list, self.HandCardSortAndJing)
+ u.outcard_list[#u.outcard_list + 1] = cmd.data.card
end
function M:CmdAction(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.last_out_seat = 0
- data.current_out_seat = cmd.seat
- local u = data.player_card_data[cmd.seat]
- for i = 1, #cmd.data.opcard do
- list_remove(u.card_list, cmd.data.opcard[i])
- end
- local fz = {}
- fz.type = cmd.data.type
- fz.card = cmd.data.card
- fz.opcard = cmd.data.opcard
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.last_out_seat = 0
+ data.current_out_seat = cmd.seat
+ local u = data.player_card_data[cmd.seat]
+ for i = 1, #cmd.data.opcard do
+ list_remove(u.card_list, cmd.data.opcard[i])
+ end
+ local fz = {}
+ fz.type = cmd.data.type
+ fz.card = cmd.data.card
+ fz.opcard = cmd.data.opcard
fz.from_seat = cmd.data.from_seat
- local uf = data.player_card_data[cmd.data.from_seat]
- if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
- table.remove(uf.outcard_list, #uf.outcard_list)
- end
- if fz.type ~= FZType.Gang_Peng then
- u.fz_list[#u.fz_list + 1] = fz
- else
- for i = 1, #u.fz_list do
- if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then
- u.fz_list[i].type = FZType.Gang_Peng
- end
- end
- end
+ data.fz = fz
+ local uf = data.player_card_data[cmd.data.from_seat]
+ if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
+ table.remove(uf.outcard_list, #uf.outcard_list)
+ end
+ if fz.type ~= FZType.Gang_Peng then
+ u.fz_list[#u.fz_list + 1] = fz
+ else
+ for i = 1, #u.fz_list do
+ if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then
+ u.fz_list[i].type = FZType.Gang_Peng
+ end
+ end
+ end
end
function M:CmdWin(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.win = cmd.seat
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.win = cmd.seat
end
function M:CmdNiao(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.niao = cmd.data.niao
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.niao = cmd.data.niao
end
function M:CmdPiao(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.player_card_data[cmd.seat].piao_niao = cmd.data.num
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.player_card_data[cmd.seat].piao_niao = cmd.data.num
end
function M:CmdResult(cmd, index)
- local data = self:CopyLastStep(index)
- data.cmd = cmd.cmd
- data.result_data = cmd.data
+ local data = self:CopyLastStep(index)
+ data.cmd = cmd.cmd
+ data.result_data = cmd.data
end
function M:CopyLastStep(index)
- local step = {}
- local last_step = self._step[index]
- step = membe_deep_clone(last_step)
- self._step[#self._step + 1] = step
- step.result_data = nil
- return step
+ local step = {}
+ local last_step = self._step[index]
+ step = membe_deep_clone(last_step)
+ self._step[#self._step + 1] = step
+ step.result_data = nil
+ return step
end
function M:UpdateLeftCard(num)
- self._tex_LeftCard.text = "余" .. num .. "张"
+ self._tex_LeftCard.text = "余" .. num .. "张"
end
function M:UpdateCardBox(seat)
- local index = seat
- local people_num = self._room.room_config.people_num
- if people_num == 2 and seat == 2 then
- index = 3
- elseif people_num == 3 and seat == 3 then
- index = 4
- end
- self._ctr_cardbox.selectedIndex = index
+ local index = seat
+ local people_num = self._room.room_config.people_num
+ if people_num == 2 and seat == 2 then
+ index = 3
+ elseif people_num == 3 and seat == 3 then
+ index = 4
+ end
+ self._ctr_cardbox.selectedIndex = index
end
function M:UpdateRound()
- self._view:GetChild("text_round").text = string.format("局数:%d/%d", self._room.curren_round,
- self._room.room_config.round)
+ self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
+ self._room.room_config.round)
end
function M:UpdateStep(step)
- self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步"
+ self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步"
end
function M.HandCardSortAndJing(a, b)
- local jing = DataManager.CurrenRoom.jing
- if a == jing or b == jing then
- if a == b then
- return a < b
- end
- return a == jing
- else
- if a < 200 then
- a = a + 1000
- elseif a < 300 then
- a = a + 3000
- elseif a < 400 then
- a = a + 2000
- else
- a = a + 4000
- end
- if b < 200 then
- b = b + 1000
- elseif b < 300 then
- b = b + 3000
- elseif b < 400 then
- b = b + 2000
- else
- b = b + 4000
- end
- return a < b
- end
+ local jing = DataManager.CurrenRoom.jing
+ if a == jing or b == jing then
+ if a == b then
+ return a < b
+ end
+ return a == jing
+ else
+ if a < 200 then
+ a = a + 1000
+ elseif a < 300 then
+ a = a + 3000
+ elseif a < 400 then
+ a = a + 2000
+ else
+ a = a + 4000
+ end
+ if b < 200 then
+ b = b + 1000
+ elseif b < 300 then
+ b = b + 3000
+ elseif b < 400 then
+ b = b + 2000
+ else
+ b = b + 4000
+ end
+ return a < b
+ end
end
return M
diff --git a/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua
index f05dc1f4..5edd0cca 100644
--- a/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua
@@ -405,7 +405,7 @@ function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
if lastCard - card == -1 then
tempLong = tempLong + 1
else
- if tempLong >= longLength then
+ if tempLong >= longLength and not self._flag_mustMax then
for j = 1, tempLong do
table.insert(self.touchCardSet, tempCardSet[j])
self.touchCardMao[tempCardSet[j]] = 1
@@ -427,8 +427,10 @@ function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
end
if tempLong >= longLength then
for j = 1, tempLong do
- table.insert(self.touchCardSet, tempCardSet[j])
- self.touchCardMao[tempCardSet[j]] = 1
+ if j == tempLong or not self._flag_mustMax then
+ table.insert(self.touchCardSet, tempCardSet[j])
+ self.touchCardMao[tempCardSet[j]] = 1
+ end
end
end
table.insert(tipCardSet, tempCardSet)
@@ -448,26 +450,70 @@ function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
local tipCardSetLen = #tipCardSet[i]
if tipCardSetLen == longLength then
local tempList = {}
+ local tempSanDaiCard = {}
for j = 1, tipCardSetLen do
local card = tipCardSet[i][j]
+ tempSanDaiCard[card] = true
local minNum = Mathf.Min(cardMap[card].value, cardType)
for k = 1, minNum do
- table.insert(tempList, cardMap[card].cardList[k])
+ if not self._flag_mustMax or card == self.maxCard then
+ table.insert(tempList, cardMap[card].cardList[k])
+ end
+ end
+ end
+ if #tempList > 0 then
+ if cardType == 3 then
+ local removeSanDaiList = {}
+ for k, v in pairs(cardMap) do
+ if not tempSanDaiCard[k] then
+ for i, v1 in ipairs(v.cardList) do
+ table.insert(removeSanDaiList, v1)
+ end
+ end
+ end
+ if #removeSanDaiList <= longLength * 2 then
+ table.insert(self.tipCardList, tempList)
+ else
+ self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList)
+ end
+ else
+ table.insert(self.tipCardList, tempList)
end
end
- table.insert(self.tipCardList, tempList)
else
for j = 1, tipCardSetLen do
if j + longLength - 1 <= tipCardSetLen then
local tempList = {}
+ local tempSanDaiCard = {}
for k = j, j + longLength - 1 do
local card = tipCardSet[i][k]
+ tempSanDaiCard[card] = true
local minNum = Mathf.Min(cardMap[card].value, cardType)
for l = 1, minNum do
- table.insert(tempList, cardMap[card].cardList[l])
+ if not self._flag_mustMax or card == self.maxCard then
+ table.insert(tempList, cardMap[card].cardList[l])
+ end
+ end
+ end
+ if #tempList > 0 then
+ if cardType == 3 then
+ local removeSanDaiList = {}
+ for k, v in pairs(cardMap) do
+ if not tempSanDaiCard[k] then
+ for i, v1 in ipairs(v.cardList) do
+ table.insert(removeSanDaiList, v1)
+ end
+ end
+ end
+ if #removeSanDaiList <= longLength * 2 then
+ table.insert(self.tipCardList, tempList)
+ else
+ self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList)
+ end
+ else
+ table.insert(self.tipCardList, tempList)
end
end
- table.insert(self.tipCardList, tempList)
end
end
end
@@ -475,6 +521,36 @@ function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
end
end
+function M:GetSanDaiTips(tempList, childNum, cardList)
+ local childIndex = {}
+ local cardLen = #cardList
+ for i = 1, childNum do
+ childIndex[i] = i
+ end
+ while childIndex[1] <= cardLen - childNum do
+ if childIndex[childNum] == cardLen then
+ for i = childNum - 1, 1, -1 do
+ if childIndex[i] ~= cardLen + i - childNum then
+ childIndex[i] = childIndex[i] + 1
+ for j = i + 1, childNum do
+ childIndex[j] = childIndex[j - 1] + 1
+ end
+ end
+ end
+ else
+ childIndex[childNum] = childIndex[childNum] + 1
+ end
+ local tempList_copy = {}
+ for i, v in ipairs(tempList) do
+ tempList_copy[i] = v
+ end
+ for i = 1, childNum do
+ table.insert(tempList_copy, cardList[childIndex[i]])
+ end
+ table.insert(self.tipCardList, tempList_copy)
+ end
+end
+
function M:CheckAloneOrLong()
if self.cardNum == 1 and M:CheckType(CardType.one) then
return CardType.one
diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua
index decd59c8..ee113dec 100644
--- a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua
@@ -382,7 +382,7 @@ function M:OnResult(evt_data)
info[i]["self_user"] = p.self_user
end
-- ControllerManager.ChangeController(LoddyController)
- DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, over, info, winseat, dissolve)
+ DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, result_type, info, winseat, dissolve)
end
end
diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua
index f6e04f7c..05c215d9 100644
--- a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua
@@ -233,6 +233,7 @@ function M:InitView(url)
self.result_view = nil
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
+ self:ClearOk()
end
end)
----------------------------------------------------
@@ -557,7 +558,6 @@ function M:EventInit()
-- if index == 1 then
local card_info = self._player_card_info[index]
- card_info:SetOutCardInfo(nil, false)
-- if self.MypokerList ~= nil then
-- -- body
-- card_info:Clear()
@@ -566,7 +566,7 @@ function M:EventInit()
-- end
-- end
self._leftClock_continue = coroutine.start(function()
- coroutine.wait(1)
+ coroutine.wait(0.2)
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
if i == index then
@@ -636,6 +636,7 @@ function M:EventInit()
head_info:SetBaoDan(card_number == 1)
local card_info = self._player_card_info[index]
card_info:SetOutCardInfo(p.out_card_list, false, true)
+ card_info._ctr_time_clock.selectedIndex = 0
for i = 1, #otherList do
local other_seat = otherList[i]
@@ -708,6 +709,7 @@ function M:EventInit()
end)
_gamectr:AddEventListener(RunFast_GameEvent.OnPassSucc, function(...)
+ self._popEvent = false
local arg = { ... }
local p = arg[1]
@@ -725,6 +727,10 @@ function M:EventInit()
card_info._ctr_time_clock.selectedIndex = 0
card_info:SetOutCardInfo(nil, true)
self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4))
+ coroutine.start(function()
+ coroutine.wait(1)
+ self._popEvent = true
+ end)
end)
_gamectr:AddEventListener(RunFast_GameEvent.OnErrorTip, function(...)
@@ -812,6 +818,7 @@ function M:EventInit()
end
local zdts = self._view:GetController("zidongtishi").selectedIndex
-- self._player_card_info[1]._cardCheck:InitLastCard(lastCardList)
+ card_info:SetOutCardInfo(nil, false)
-- self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts)
card_info:ShowOutCardOption2(lastCardList, ctr_number, m)
end)
@@ -929,12 +936,26 @@ function M:EventInit()
-- -- end
-- end
+ for i = 1, #info do
+ local player = info[i]
+ local p = self._room:GetPlayerBySeat(player.seat)
+ local head_info = self._player_info[self:GetPos(player.seat)]
+ head_info:SetBaoDan(false)
+
+ head_info._view:GetChild('text_jifen').text = player.score
+ -- head_info:PlayScore(player.winscore, win_seat == player.seat)
+ head_info:PlayScore(player.card_score, win_seat == player.seat)
+ end
+
for i = 1, #info do
local player = info[i]
local p = self._room:GetPlayerBySeat(player.seat)
local head_info = self._player_info[self:GetPos(player.seat)]
local card_info = self._player_card_info[self:GetPos(player.seat)]
+ if player.seat ~= win_seat then
+ card_info.ctr_outpoker.selectedIndex = 0
+ end
if player.seat ~= self._room.self_player.seat then
local oneTime = 7 / 60
@@ -942,7 +963,6 @@ function M:EventInit()
card_info._view_resultOut:RemoveChildrenToPool()
card_info._ctr_resultOut.selectedIndex = 1
- card_info.ctr_outpoker.selectedIndex = 0
for i = 1, #player.handCards do
local child_card = card_info._view_resultOut:AddItemFromPool()
card_info:FillPoker(child_card, "", nil, player.handCards[i])
@@ -952,16 +972,6 @@ function M:EventInit()
end
end
end
- for i = 1, #info do
- local player = info[i]
- local p = self._room:GetPlayerBySeat(player.seat)
- local head_info = self._player_info[self:GetPos(player.seat)]
- head_info:SetBaoDan(false)
-
- head_info._view:GetChild('text_jifen').text = player.score
- -- head_info:PlayScore(player.winscore, win_seat == player.seat)
- head_info:PlayScore(player.card_score, win_seat == player.seat)
- end
self:ChangeBgmMusic(1)
-- if over == 0 then
-- if #self:GetSpringSeats(info) > 0 then
@@ -1027,7 +1037,9 @@ function M:EventInit()
local info = arg[2]
local winseat = arg[3]
local dissolve = arg[4]
- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3")
+ if _room.curren_round > 0 then
+ ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3")
+ end
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
@@ -1143,7 +1155,7 @@ function M:ReConnectForStart()
else
-- player_card_info:SetRemainCardNumber(player.hand_count == 1)
if player.hand_count == 1 then
- self.bgm_index = 2
+ -- self.bgm_index = 2
end
end
if self._room.curren_turn_seat ~= player.seat then
@@ -1524,6 +1536,13 @@ function M:ResetPoker()
self._player_card_info[1]:ResetPoker()
end
+----结算准备时清理桌面
+function M:ClearOk()
+ for i = 1, #self._player_card_info do
+ self._player_card_info[i]:Clear()
+ end
+end
+
function M:PlaySound(sex, path)
local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女
local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path)
diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua
index 2b4d78f7..b32a6212 100644
--- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua
@@ -8,6 +8,8 @@ local RunFast_PlayerSelfCardInfoView = import('.RunFast_PlayerSelfPokerInfoView'
local PlayerInfoView = import('.EXPlayerInfoView')
local RunFast_RightPanelView = import(".RunFast_RightPanelView")
local RunFast_ResultView = import(".RunFast_ResultView")
+local RunFast_CardCheck = import(".CardCheck")
+
local M = {}
local RunFast_Record_Event = {
@@ -79,6 +81,10 @@ function M:InitView(url)
else
self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = ''
end
+
+ self._cardCheck = RunFast_CardCheck:InitFlag()
+ self._gamectr._cardCheck = self._cardCheck
+
self._eventmap = {}
self._cmdmap = {}
self._cmdmap[RunFast_Record_Event.Evt_OutCard] = self.CmdOutCard
@@ -158,7 +164,6 @@ function M:ShowStep(index)
end
info:SetOutCardInfo(nil, false)
end
-
if step.cmd == RunFast_Record_Event.Evt_OutCard then
local seat = step.current_out_seat
local p = self._room:GetPlayerBySeat(seat)
@@ -167,6 +172,13 @@ function M:ShowStep(index)
local card_list = self._gamectr:ChangeCodeByFrom(card, true)
info:SetOutCardInfo(card_list, false)
self:ClearNextSeatOutCard(seat)
+
+ self._cardCheck:InitLastCard(card_list)
+ self:_Effect(self._cardCheck.type, p)
+
+ self:PlaySound(p.self_user.sex,
+ self:GetSoundFileName(self._cardCheck.type, num, self:GetIsNewBout(seat)
+ ))
end
if step.cmd == RunFast_Record_Event.Evt_Pass then
@@ -351,6 +363,78 @@ function M:LastRecordPlay()
end
end
+function M:_Effect(type1, player)
+ if type1 == 1 or type1 == 3 or type1 == 7 then
+ self._popEvent = true
+ return
+ end
+ local info = self._player_card_info[self:GetPos(player.seat)]
+ info:PlayEffect(type1, function()
+ self._popEvent = true
+ end)
+end
+
+function M:GetSoundFileName(type, num, isNewBout)
+ local fileName
+ if type == 1 or type == 3 or type == 7 then
+ local num = self._cardCheck.lastMinCard
+ if type == 1 then
+ fileName = string.format("1_%d", num)
+ elseif type == 3 then
+ fileName = string.format("2_%d", num)
+ elseif type == 7 then
+ fileName = string.format("3_%d", num)
+ end
+ else
+ if not isNewBout and type ~= 6 then
+ local r = math.random(1, 3)
+ fileName = "dani_" .. r
+ else
+ if type == 8 or type == 12 then
+ fileName = 5
+ else
+ fileName = type
+ end
+ end
+ end
+
+ return fileName
+end
+
+function M:PlaySound(sex, path)
+ local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女
+ local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path)
+ ViewUtil.PlaySound("RunFastNew_PK", sound_path)
+end
+
+function M:GetIsNewBout(seat)
+ local passCount = 0
+ for i = 1, #self._room.player_list do
+ local player = self._room.player_list[i]
+ if seat ~= player.seat then
+ local isPass = self:GetIsPass(player.out_card_list)
+ if isPass then
+ passCount = passCount + 1
+ end
+ end
+ end
+ if passCount == self._room.room_config.people_num - 1 then
+ return true
+ else
+ return false
+ end
+end
+
+function M:GetIsPass(cardlist)
+ if #cardlist == 0 then
+ return true
+ end
+ if cardlist[1] ~= nil and cardlist[1] == 0 then
+ return true
+ end
+ return false
+end
+
function M:OnUpdate()
if self._play then
if (self._currentStep == #self.cmdList + 1 and self._playFoward) then
diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua
index 71e8a98e..9df6436f 100644
--- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua
@@ -420,6 +420,11 @@ function M:PlayEffect(type, callback)
obj:GetChild('n14'):TweenFade(0, 0.4)
end)
end)
+ elseif type == 6 then
+ obj:GetTransition('t0'):Play(1, 0, function()
+ obj:Dispose()
+ end)
+ callback()
else
obj:GetTransition('t0'):Play(1, 0, function()
obj:Dispose()
diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua
index c7dd2a28..6ee7d445 100644
--- a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua
+++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua
@@ -28,6 +28,10 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
local room = DataManager.CurrenRoom
self._view:GetController('over').selectedIndex = 0
+ if over == 2 and room.curren_round <= 0 then
+ ViewManager.ChangeView(ViewManager.View_Family)
+ end
+
--按钮功能全部未开放
self._view:GetChild('btn_shareRecord').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
@@ -55,6 +59,8 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
self:Destroy()
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
+ self._root_runFast:ClearOk()
+ self._root_runFast._ctr_inClear.selectedIndex = 0
else
self._view:GetController('over').selectedIndex = 1
end
@@ -65,6 +71,7 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
self:Destroy()
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
+ self._root_runFast:ClearOk()
else
self._view:GetController('over').selectedIndex = 1
end
@@ -90,7 +97,7 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
over0List.numItems = #data
self._root_runFast._ctr_inClear.selectedIndex = 1
- if over == 1 or (not over and #data == 2) then
+ if over == 1 or (over == 2 and room.curren_round > 0) then
local bigSeat = 0
local bigScore = 0
for i = 1, #data do
diff --git a/lua_probject/main_project/main/majiang/MJMainView.lua b/lua_probject/main_project/main/majiang/MJMainView.lua
index a118848a..bff8c4b5 100644
--- a/lua_probject/main_project/main/majiang/MJMainView.lua
+++ b/lua_probject/main_project/main/majiang/MJMainView.lua
@@ -623,31 +623,31 @@ function M:PlayerChangeLineState()
self._player_card_info[1]._area_handcard_list.touchable = isOutCard
end
-function M:NewMJPlayerCardInfoView(view, index)
+function M:NewMJPlayerCardInfoView(view, index, record)
local infoView = {}
if self._room.room_config.people_num == 2 then
if index == 1 then
- infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
+ infoView = MJPlayerSelfCardInfoView.new(view, self, record, "S")
elseif index == 2 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "N")
end
elseif self._room.room_config.people_num == 3 then
if index == 1 then
- infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
+ infoView = MJPlayerSelfCardInfoView.new(view, self, record, "S")
elseif index == 2 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "E")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "E")
elseif index == 3 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "N")
end
elseif self._room.room_config.people_num == 4 then
if index == 1 then
- infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
+ infoView = MJPlayerSelfCardInfoView.new(view, self, record, "S")
elseif index == 2 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "E")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "E")
elseif index == 3 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "N")
elseif index == 4 then
- infoView = MJPlayerCardInfoView.new(view, self, nil, "W")
+ infoView = MJPlayerCardInfoView.new(view, self, record, "W")
end
end
return infoView
@@ -730,6 +730,11 @@ function M:OnResult1(...)
else
self:PlayMJSound("end_music.mp3")
end
+
+ for _, pScore in pairs(result.info_list) do
+ local infoView = self._player_info[self:GetPos(pScore.seat)]
+ infoView:UpdateScore(pScore.total_score, true)
+ end
coroutine.wait(0.5)
self._clearingView:Show()
self._popEvent = true
@@ -897,12 +902,6 @@ function M:OnHuCard(...)
--根据字段动态调整间距
- -- 扣分动画
- for _, pScore in pairs(scoreData) do
- local infoView = self._player_info[self:GetPos(pScore.seat)]
- infoView:UpdateScore(pScore.total_score, true)
- end
-
coroutine.wait(0.3)
self._popEvent = true
list_HuCardEffect:RemoveChildrenToPool()
diff --git a/lua_probject/main_project/main/majiang/MJPlayBackView.lua b/lua_probject/main_project/main/majiang/MJPlayBackView.lua
index 31ec5a72..0e31ede4 100644
--- a/lua_probject/main_project/main/majiang/MJPlayBackView.lua
+++ b/lua_probject/main_project/main/majiang/MJPlayBackView.lua
@@ -2,12 +2,17 @@ local MJPlayerCardInfoView = import(".MJPlayerCardInfoView")
local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView")
local TableBG = import('Game.Data.TableBG')
local MJMainView = import(".MJMainView")
+local HuCardImg = import(".HuCardImg")
+
---
local M = {}
setmetatable(M, { __index = PlayBackView })
+M.HuCardImg = HuCardImg
+
+
local bg_config = {
{ id = 1, url = "base/main_majiang/bg/bg1", thumb = "ui://Main_Majiang/b01" }
}
@@ -68,7 +73,7 @@ function M:SetCardBoxPosition()
end
function M:NewMJPlayerCardInfoView(view, index)
- return MJMainView.NewMJPlayerCardInfoView(self, view, index)
+ return MJMainView.NewMJPlayerCardInfoView(self, view, index, 1)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
index 00b2a280..91eb06b5 100644
--- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
+++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua
@@ -65,7 +65,7 @@ function M:init()
self._ctr_record = self._view:GetController('record')
if self._flag_record and self._flag_record == 1 and self._ctr_record then
- self._ctr_record.selectedIndex = self._flag_record or 0
+ -- self._ctr_record.selectedIndex = self._flag_record or 0
self._view_handCardList = self._view:GetChild('List_HandCard2')
self._view_getCard = self._view:GetChild('Btn_HandCard2')
end
diff --git a/lua_probject/main_project/main/poker/PKMainView.lua b/lua_probject/main_project/main/poker/PKMainView.lua
index e0f3aa8a..191ab464 100644
--- a/lua_probject/main_project/main/poker/PKMainView.lua
+++ b/lua_probject/main_project/main/poker/PKMainView.lua
@@ -148,7 +148,7 @@ end
function M:Show()
getmetatable(M).__index.Show(self)
- ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/game_backmusic.mp3")
+ -- ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/game_backmusic.mp3")
self:DoNoticeAnimation()
end
diff --git a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml
index 663cb78c..44f8c045 100644
--- a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml
+++ b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml
@@ -1,6 +1,6 @@
-
+
@@ -215,7 +215,7 @@
-
+
diff --git a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_3.xml b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_3.xml
index 1f4c1ca9..86ad34ae 100644
--- a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_3.xml
+++ b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_3.xml
@@ -226,7 +226,7 @@
-
+
diff --git a/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml b/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml
index b0f2dd61..76756651 100644
--- a/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml
+++ b/wb_new_ui/assets/Family/ChatRoom/com_chatRoom.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordByGameTypeChild.xml b/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordByGameTypeChild.xml
index 2243678d..655ff01d 100644
--- a/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordByGameTypeChild.xml
+++ b/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordByGameTypeChild.xml
@@ -1,6 +1,6 @@
-
+
@@ -11,11 +11,11 @@
-
+
+
-
diff --git a/wb_new_ui/assets/Family/Record/Component/combBox_time_item.xml b/wb_new_ui/assets/Family/Record/Component/combBox_time_item.xml
index 9cc0e882..515be25a 100644
--- a/wb_new_ui/assets/Family/Record/Component/combBox_time_item.xml
+++ b/wb_new_ui/assets/Family/Record/Component/combBox_time_item.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Clearing/Component/Comp_PlayInfo.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Clearing/Component/Comp_PlayInfo.xml
index e1caf555..10c47e04 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Clearing/Component/Comp_PlayInfo.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Clearing/Component/Comp_PlayInfo.xml
@@ -1,7 +1,7 @@
-
+
@@ -43,11 +43,13 @@
-
+
+
-
+
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml
index 7d921ca1..8cb373cb 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml
@@ -4,6 +4,7 @@
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_W.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_W.xml
index dea646f9..5f064164 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_W.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Component/NewHandCard/Player_card_info_W.xml
@@ -4,6 +4,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 4770334a..0f283924 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 @@
-
+
@@ -49,14 +49,14 @@
-
+
-
+
-
+
@@ -147,7 +147,7 @@
-
+
@@ -156,7 +156,7 @@
-
+
@@ -189,6 +189,7 @@
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml
index 8bd47b90..378c1a65 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml
@@ -1,6 +1,6 @@
-
+
@@ -40,14 +40,14 @@
-
+
-
+
-
+
@@ -92,13 +92,6 @@
-
-
-
-
-
-
-
@@ -141,7 +134,7 @@
-
+
@@ -149,7 +142,7 @@
-
+
@@ -170,6 +163,7 @@
+
@@ -272,13 +266,6 @@
-
-
-
-
-
-
-
@@ -302,6 +289,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml
index c167b9ea..949bf8af 100644
--- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml
+++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml
@@ -80,13 +80,6 @@
-
-
-
-
-
-
-
@@ -263,18 +256,12 @@
+
-
-
-
-
-
-
-
@@ -315,6 +302,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes
index 16cbe40e..ade9b4e8 100644
Binary files a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes differ
diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_14.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_14.png.meta
index 8d65c61b..b71fcc9b 100644
--- a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_14.png.meta
+++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_14.png.meta
@@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
- assetBundleName:
+ assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleVariant:
diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes
index 9b2ccf65..5e7559ad 100644
Binary files a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes differ
diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes
index abc66abe..4de55495 100644
Binary files a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes differ
diff --git a/wb_unity_pro/Assets/Plugins/Android/AndroidManifest.xml b/wb_unity_pro/Assets/Plugins/Android/AndroidManifest.xml
index 26c3e69a..a31ec753 100644
--- a/wb_unity_pro/Assets/Plugins/Android/AndroidManifest.xml
+++ b/wb_unity_pro/Assets/Plugins/Android/AndroidManifest.xml
@@ -53,6 +53,8 @@
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale"
android:label="@string/app_name"
android:launchMode="singleTask"
+ android:resizeableActivity="false"
+ android:supportsPictureInPicture="false"
android:screenOrientation="sensorLandscape" />
diff --git a/wb_unity_pro/Assets/StreamingAssets/init1_1.json b/wb_unity_pro/Assets/StreamingAssets/init1_1.json
index cb0910d7..a43c98e0 100644
--- a/wb_unity_pro/Assets/StreamingAssets/init1_1.json
+++ b/wb_unity_pro/Assets/StreamingAssets/init1_1.json
@@ -1,41 +1,41 @@
[
{
- "ver": "1.0.34",
+ "ver": "1.0.36",
"name": "跑得快",
"check": true,
- "version": "1.0.34",
+ "version": "1.0.36",
"game_id": "66",
"bundle": "extend/poker/runfast"
},
{
- "ver": "1.0.54",
+ "ver": "1.0.56",
"name": "南城麻将",
"check": true,
- "version": "1.0.54",
+ "version": "1.0.56",
"game_id": "86",
"bundle": "extend/majiang/nancheng"
},
{
- "ver": "1.0.57",
+ "ver": "1.0.59",
"name": "黎川麻将",
"check": true,
- "version": "1.0.57",
+ "version": "1.0.59",
"game_id": "87",
"bundle": "extend/majiang/lichuan"
},
{
- "ver": "1.0.41",
+ "ver": "1.0.43",
"name": "金溪麻将",
"check": true,
- "version": "1.0.41",
+ "version": "1.0.43",
"game_id": "88",
"bundle": "extend/majiang/jinxi"
},
{
- "ver": "1.0.40",
+ "ver": "1.0.42",
"name": "抚州麻将",
"check": true,
- "version": "1.0.40",
+ "version": "1.0.42",
"game_id": "89",
"bundle": "extend/majiang/fuzhou"
}
diff --git a/wb_unity_pro/Assets/StreamingAssets/init2_1.json b/wb_unity_pro/Assets/StreamingAssets/init2_1.json
index dbe4feae..af385fff 100644
--- a/wb_unity_pro/Assets/StreamingAssets/init2_1.json
+++ b/wb_unity_pro/Assets/StreamingAssets/init2_1.json
@@ -1,109 +1,109 @@
[
{
"lua_path": "/tolua_project,/base_project,/main_project",
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "base_script",
"check": true,
"bundle": "base/base_script",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "common",
"check": true,
"bundle": "base/common",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "login",
"check": true,
"bundle": "base/login",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "lobby",
"check": true,
"bundle": "base/lobby",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "Family",
"check": true,
"bundle": "base/Family",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "chat",
"check": true,
"bundle": "base/chat",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "newgroup",
"check": true,
"bundle": "base/newgroup",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "rank",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/rank"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "main_majiang",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/main_majiang"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "main_poker",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/main_poker"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "main_zipai",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/main_zipai"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "static",
"check": true,
"bundle": "base/static",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"is_res": true,
"name": "embed",
"check": true,
"bundle": "base/embed",
- "version": "1.0.6"
+ "version": "1.0.8"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "main_pokemajiang",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/main_pokemajiang"
},
{
- "ver": "1.0.6",
+ "ver": "1.0.8",
"name": "main_zipaimajiang",
"check": true,
- "version": "1.0.6",
+ "version": "1.0.8",
"bundle": "base/main_zipaimajiang"
}
]
diff --git a/wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.8.bytes
similarity index 95%
rename from wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.8.bytes
index 68bf552c..e3b21984 100644
Binary files a/wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.6.bytes and b/wb_unity_pro/Pack/Android32/base/Family/asset_pack1.0.8.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.8.bytes
similarity index 97%
rename from wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.8.bytes
index 453ec161..4b533766 100644
Binary files a/wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.6.bytes and b/wb_unity_pro/Pack/Android32/base/base_script/asset_pack1.0.8.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/base/chat/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/chat/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/chat/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/chat/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/common/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/common/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/common/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/common/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/embed/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/embed/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/embed/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/embed/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.8.bytes
similarity index 62%
rename from wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.8.bytes
index 074323ba..92f2056a 100644
Binary files a/wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.6.bytes and b/wb_unity_pro/Pack/Android32/base/lobby/asset_pack1.0.8.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/base/login/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/login/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/login/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/login/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.8.bytes
similarity index 95%
rename from wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.8.bytes
index 957c66c8..5f7621d5 100644
Binary files a/wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.6.bytes and b/wb_unity_pro/Pack/Android32/base/main_majiang/asset_pack1.0.8.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/base/main_pokemajiang/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/main_pokemajiang/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/main_pokemajiang/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/main_pokemajiang/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/main_poker/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/main_poker/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/main_poker/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/main_poker/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/main_zipai/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/main_zipai/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/main_zipai/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/main_zipai/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/main_zipaimajiang/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/main_zipaimajiang/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/main_zipaimajiang/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/main_zipaimajiang/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/newgroup/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/newgroup/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/newgroup/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/newgroup/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/rank/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/rank/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/rank/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/rank/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/base/static/asset_pack1.0.6.bytes b/wb_unity_pro/Pack/Android32/base/static/asset_pack1.0.8.bytes
similarity index 100%
rename from wb_unity_pro/Pack/Android32/base/static/asset_pack1.0.6.bytes
rename to wb_unity_pro/Pack/Android32/base/static/asset_pack1.0.8.bytes
diff --git a/wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.40.bytes b/wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.42.bytes
similarity index 99%
rename from wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.40.bytes
rename to wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.42.bytes
index ca78e3e2..91eaed63 100644
Binary files a/wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.40.bytes and b/wb_unity_pro/Pack/Android32/extend/majiang/fuzhou/asset_pack1.0.42.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.41.bytes b/wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.43.bytes
similarity index 99%
rename from wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.41.bytes
rename to wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.43.bytes
index a057243f..e616e741 100644
Binary files a/wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.41.bytes and b/wb_unity_pro/Pack/Android32/extend/majiang/jinxi/asset_pack1.0.43.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.57.bytes b/wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.59.bytes
similarity index 99%
rename from wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.57.bytes
rename to wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.59.bytes
index 624f764b..22c70343 100644
Binary files a/wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.57.bytes and b/wb_unity_pro/Pack/Android32/extend/majiang/lichuan/asset_pack1.0.59.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.54.bytes b/wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.56.bytes
similarity index 99%
rename from wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.54.bytes
rename to wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.56.bytes
index 1f962d86..5002bf3e 100644
Binary files a/wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.54.bytes and b/wb_unity_pro/Pack/Android32/extend/majiang/nancheng/asset_pack1.0.56.bytes differ
diff --git a/wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.34.bytes b/wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.36.bytes
similarity index 72%
rename from wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.34.bytes
rename to wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.36.bytes
index 28648fea..5e8ea3f9 100644
Binary files a/wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.34.bytes and b/wb_unity_pro/Pack/Android32/extend/poker/runfast/asset_pack1.0.36.bytes differ