跟新最新
parent
13a5868e84
commit
a23c13d366
|
|
@ -84,10 +84,11 @@ function M:InitView(url)
|
||||||
for i = 1, #room.player_list do
|
for i = 1, #room.player_list do
|
||||||
local p = room.player_list[i]
|
local p = room.player_list[i]
|
||||||
local index = self:GetPos(p.seat)
|
local index = self:GetPos(p.seat)
|
||||||
|
print("lingmeng index", index)
|
||||||
local info = self._player_info[index]
|
local info = self._player_info[index]
|
||||||
local tem = self._view:GetChild("player_card_info" .. index)
|
local tem = self._view:GetChild("player_card_info" .. index)
|
||||||
|
_player_card_info[index] = self:NewMJPlayerCardInfoView(tem, index)
|
||||||
local cardInfo = _player_card_info[index]
|
local cardInfo = _player_card_info[index]
|
||||||
cardInfo = self:NewMJPlayerCardInfoView(tem, index)
|
|
||||||
cardInfo:SetPlayer(p)
|
cardInfo:SetPlayer(p)
|
||||||
cardInfo:UpdateHandCardWitness(false)
|
cardInfo:UpdateHandCardWitness(false)
|
||||||
cardInfo:UpdateOutCardList(nil, nil, self._cursor)
|
cardInfo:UpdateOutCardList(nil, nil, self._cursor)
|
||||||
|
|
@ -166,14 +167,21 @@ function M:EventInit()
|
||||||
|
|
||||||
local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard"
|
local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard"
|
||||||
_gamectr:AddEventListener(TX_GameEvent.OutCard, function(...)
|
_gamectr:AddEventListener(TX_GameEvent.OutCard, function(...)
|
||||||
|
print("lingmeng witness OutCard")
|
||||||
self._left_time = 0
|
self._left_time = 0
|
||||||
local arg = { ... }
|
local arg = { ... }
|
||||||
local p = arg[1]
|
local p = arg[1]
|
||||||
local card = arg[2]
|
local card = arg[2]
|
||||||
local seat = p.seat
|
local seat = p.seat
|
||||||
local info = self._player_card_info[self:GetPos(seat)]
|
local info = self._player_card_info[self:GetPos(seat)]
|
||||||
|
print("lingmeng witness OutCard1", self:GetPos(seat), info)
|
||||||
|
|
||||||
self:RemoveCursor()
|
self:RemoveCursor()
|
||||||
|
print("lingmeng witness OutCard1-2")
|
||||||
|
|
||||||
info:UpdateHandCardWitness(false)
|
info:UpdateHandCardWitness(false)
|
||||||
|
print("lingmeng witness OutCard2")
|
||||||
|
|
||||||
info:UpdateOutCardList(nil, nil, self._cursor)
|
info:UpdateOutCardList(nil, nil, self._cursor)
|
||||||
print("ling 2zhihouq")
|
print("ling 2zhihouq")
|
||||||
self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card))
|
self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card))
|
||||||
|
|
|
||||||
|
|
@ -509,9 +509,9 @@ function M:NewMJPlayerCardInfoView(view, index)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:RemoveCursor()
|
function M:RemoveCursor()
|
||||||
if self._cursor.parent then
|
-- if self._cursor.parent then
|
||||||
self._cursor.parent:GetController("color").selectedIndex = 0
|
-- self._cursor.parent:GetController("color").selectedIndex = 0
|
||||||
end
|
-- end
|
||||||
self._cursor:RemoveFromParent()
|
self._cursor:RemoveFromParent()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,11 +135,13 @@ function M:UpdateHandCard(getcard, mp)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:UpdateHandCardWitness(getcard, isSelf)
|
function M:UpdateHandCardWitness(getcard, isSelf)
|
||||||
|
print("lingmeng UpdateHandCardWitness")
|
||||||
getcard = getcard or false
|
getcard = getcard or false
|
||||||
isSelf = isSelf or false
|
isSelf = isSelf or false
|
||||||
|
|
||||||
self._view_handCardList:RemoveChildren()
|
self._view_handCardList:RemoveChildren()
|
||||||
self._view_getCard:RemoveChildren()
|
self._view_getCard:RemoveChildren()
|
||||||
|
print("lingmeng UpdateHandCardWitness1")
|
||||||
|
|
||||||
for i = 0, self._player.hand_left_count - 1 do
|
for i = 0, self._player.hand_left_count - 1 do
|
||||||
local btn_card
|
local btn_card
|
||||||
|
|
@ -152,8 +154,12 @@ function M:UpdateHandCardWitness(getcard, isSelf)
|
||||||
self:FillWitnessCard(btn_card)
|
self:FillWitnessCard(btn_card)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
print("lingmeng UpdateHandCardWitness2")
|
||||||
|
|
||||||
self._view_handCardList.touchable = false
|
self._view_handCardList.touchable = false
|
||||||
self._view_getCard.touchable = false
|
self._view_getCard.touchable = false
|
||||||
|
print("lingmeng UpdateHandCardWitness3")
|
||||||
|
|
||||||
self._ctr_getCard.selectedIndex = getcard and 1 or 0
|
self._ctr_getCard.selectedIndex = getcard and 1 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue