提交6.20

master
罗家炜 2025-06-20 14:55:27 +08:00
parent f976b9db20
commit d7daa0c666
2 changed files with 194 additions and 200 deletions

View File

@ -31,13 +31,13 @@ function M.new()
end
function M:getCardItem(card_1, card_2)
if self._room.change_card_display ~= nil then
return card_1 .. self._room.change_card_display .. card_2
else
return card_1 .. '6_' .. card_2
end
end
function M:InitView(url)
local _room = self._room
self.Fix_Msg_Chat = Fix_Msg_Chat
@ -153,12 +153,14 @@ function M:NewPlayerCardInfoView(view, index)
end
return PlayerCardInfoView.new(view, self)
end
function M:closeTipOnTuoguan()
if self._clearingView ~= nil then
self._clearingView:Close()
end
self:__CloseTip()
end
function M:EventInit()
MainView.EventInit(self)
local _room = self._room
@ -172,12 +174,10 @@ function M:EventInit()
self._popEvent = false
self._player_card_info[1]:HideDaNiao(0)
if (currentPlayer1) then
local xipaiCB = function()
self._popEvent = true
end
self:PlayXiPai(xipaiCB)
end
if (currentPlayer2) then
local xipaiCB2 = function()
@ -216,7 +216,6 @@ function M:EventInit()
info:Ready(false)
--info:UpdatePiao(-1)
end
end
self._player_card_info[1]:ShwoDaNiao(niao)
end)
@ -231,7 +230,6 @@ function M:EventInit()
end
local head_info = self._player_info[self:GetPos(seat)]
head_info:UpdateNiao(niao)
end)
@ -405,7 +403,6 @@ function M:EventInit()
end
)
fangwei_msg:Show()
end
)
@ -428,7 +425,6 @@ function M:EventInit()
info:UpdateIsOnClick(true)
info:SendChangeCard()
info:ChuPaiTiShi()
end
local list = _room.player_list
for i = 1, #list do
@ -632,7 +628,6 @@ function M:EventInit()
--禁牌 把手上的牌都禁掉
-- local card_info = self._player_card_info[self:GetPos(seat)]
-- card_info:banHandCards(self._room.self_player.card_list)
end
)
end
@ -683,7 +678,6 @@ function M:__FangziTip(tip, _uid,fptype)
if td.type == 6 and td.weight == 8 then
fpao = false
end
end
if fpao and zdhu then
@ -738,6 +732,7 @@ function M:__FangziTip(tip, _uid,fptype)
_chipeng_tip.y = _chipeng_tip.y - 50
end
end
function M:__TipAction(context)
local data = context.sender.data
local _gamectr = self._gamectr
@ -1054,7 +1049,6 @@ function M:OnFangziAction(...)
effect:Dispose()
end
)
end
if (player == self._room.self_player) then
coroutine.start(
@ -1127,7 +1121,6 @@ function M:ReloadRoom()
info._view:GetController('zhanji').selectedIndex = 1
info._view:GetChild('tex_jifen').text = p.total_score -- d2ad(p.total_hp)
info._view:GetChild('tex_jifen_text').text = "总胡息"
end
local card_info = self._player_card_info[self:GetPos(p.seat)]

View File

@ -146,8 +146,6 @@ function M:FillRoomData(data)
self:UpdateStep(1)
end
function M:ShowStep(index)
local step = self._step[index + 1]
self:UpdateStep(index + 1)
@ -165,7 +163,8 @@ function M:ShowStep(index)
self._lit_fanzi = _chipeng_tip:GetChild('lit_fanzi')
self._lit_fanzi:RemoveChildrenToPool()
printlog("lingmeng ShowStep", self._step[index + 1].cmd)
pt(self._step[index + 1])
for i = 1, #step.player_card_data do
local p = self._room:GetPlayerBySeat(i)
local info = self._player_card_info[self:GetPos(i)]
@ -208,7 +207,6 @@ function M:ShowStep(index)
if tonumber(index + 1) > tonumber(k) then
list_remove(p.card_list, v)
end
end
end
@ -221,22 +219,23 @@ function M:ShowStep(index)
info:InitHandCard(false)
end
if step.cmd == Record_Event.Evt_ChangePaiXing then
local _card_list = {}
for i = 1, #step.card_list do
local data = {}
data.card_item = step.card_list[i].card
data.index_X = step.card_list[i].X
data.index_Y = step.card_list[i].Y
_card_list[#_card_list + 1] = data
end
local info = self._player_card_info[self:GetPos(step.seat)]
if step.card_list[1].card ~= nil then
info:UpdateHandCards(_card_list)
else
info:UpdateHandCards(step.card_list)
end
end
-- if step.cmd == Record_Event.Evt_ChangePaiXing then
-- local _card_list = {}
-- for i = 1, #step.card_list do
-- local data = {}
-- data.card_item = step.card_list[i].card
-- data.index_X = step.card_list[i].X
-- data.index_Y = step.card_list[i].Y
-- _card_list[#_card_list + 1] = data
-- end
-- local info = self._player_card_info[self:GetPos(step.seat)]
-- if step.card_list[1].card ~= nil then
-- info:UpdateHandCards(_card_list)
-- -- info:InitHandCard(_card_list)
-- else
-- info:UpdateHandCards(step.card_list)
-- end
-- end
--end
if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then
@ -274,15 +273,8 @@ function M:ShowStep(index)
_chipeng_tip:Center()
self._chipeng_tip.x = self._chipeng_tip.x + 200
self._chipeng_tip.y = self._chipeng_tip.y - 50
end
end
end
@ -327,10 +319,16 @@ function M:ShowStep(index)
if data[i]['hp_info'] then
p.total_score = d2ad(data[i].hp_info.cur_hp)
local stotal_hp = data[i].hp_info.total_hp
local total_score = data[i].total_score
info._view:GetController('zhanji').selectedIndex = 0
if _room.hpOnOff == 1 or _room:checkHpNonnegative() then
info._view:GetController('huxi').selectedIndex = 1
info._view:GetChild('huxi').text = d2ad(stotal_hp)
info._view:GetController('zhanji').selectedIndex = 1
info._view:GetChild('tex_jifen').text = d2ad(stotal_hp)
info._view:GetChild('tex_jifen').text = total_score
end
end
info:UpdateScore(p.total_score)
@ -368,6 +366,7 @@ function M:GenerateAllStepData(data)
u.fz_list = {}
u.outcard_list = {}
u.hu_xi = 0
u.total_score = p.total_score
step.player_card_data[u.seat] = u
end
self._step[#self._step + 1] = step
@ -396,6 +395,7 @@ function M:CmdGetCard(cmd, index)
data.seat = cmd.seat
data.DiceCard = cmd.data.card
end
function M:CmdThrowCard(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
@ -405,6 +405,7 @@ function M:CmdThrowCard(cmd, index)
data.out_card_list = cmd.data.card
u.outcard_list[#u.outcard_list + 1] = cmd.data.card
end
function M:CmdAddCard(cmd, index)
----printlog("CmdAddCard======>>>",index,cmd.data.card)
local data = self:CopyLastStep(index)
@ -422,6 +423,7 @@ function M:onResult(cmd, index)
end
function M:CmdChangePaiXing(cmd, index)
printlog("lingmeng CmdChangePaiXing", index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.seat = cmd.seat
@ -713,7 +715,6 @@ function M:OnUpdate()
end
end
function M:Destroy()
UpdateBeat:Remove(self.OnUpdate, self)
PlayBackView.Destroy(self)