修改字牌
parent
623618f78e
commit
ec8e4f9cd5
|
|
@ -341,8 +341,11 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
list_room:SetVirtual()
|
||||
local list_gamePlay = self._view:GetChild('list_gamePlay')
|
||||
list_gamePlay:SetVirtual()
|
||||
local playList = DataManager.groups:get(id).playList
|
||||
local roomList = DataManager.groups:get(id).rooms
|
||||
local playList = self._group.playList
|
||||
local roomList = self._group.rooms
|
||||
print("=========================playList,rooms")
|
||||
pt(playList)
|
||||
pt(roomList)
|
||||
list_room.itemRenderer = function(index, obj)
|
||||
if index < #roomList then
|
||||
-- local config = ExtendManager.GetExtendConfig(roomList[index + 1].pid)
|
||||
|
|
@ -351,13 +354,13 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
-- obj:GetChild('Label_gameRule').title = gamePlay
|
||||
obj:GetChild('game_type').text = string.format("房间-%s", roomList[index + 1].id)
|
||||
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1
|
||||
obj:GetChild('btn_joinGame').onClick:Add(function()
|
||||
obj:GetChild('btn_joinGame').onClick:Set(function()
|
||||
ViewUtil.ShowModalWait(self._root_view, "匹配房间中", 'join_room')
|
||||
local roomCtr = ControllerManager.GetController(RoomController)
|
||||
roomCtr:PublicJoinRoom(
|
||||
Protocol.WEB_FG_MATCH_ROOM,
|
||||
Protocol.WEB_FG_JOIN_ROOM,
|
||||
roomList[index + 1].id,
|
||||
true,
|
||||
false,
|
||||
function(response)
|
||||
ViewUtil.CloseModalWait('join_room')
|
||||
if (response.ReturnCode == -1) then
|
||||
|
|
@ -374,7 +377,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
end
|
||||
end,
|
||||
id,
|
||||
playList[index + 1].id
|
||||
roomList[index + 1].pid
|
||||
)
|
||||
end)
|
||||
else
|
||||
|
|
@ -384,7 +387,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
-- obj:GetChild('Label_gameRule').title = gamePlay
|
||||
obj:GetChild('game_type').text = playList[index - #roomList + 1].name
|
||||
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 0
|
||||
obj:GetChild('btn_joinGame').onClick:Add(function()
|
||||
obj:GetChild('btn_joinGame').onClick:Set(function()
|
||||
ViewUtil.ShowModalWait(self._root_view, "匹配房间中", 'join_room')
|
||||
local roomCtr = ControllerManager.GetController(RoomController)
|
||||
fgCtr:FG_ChangeFag(id, DataManager.SelfUser.acc, 777777, function()
|
||||
|
|
@ -436,6 +439,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
|||
end)
|
||||
end)
|
||||
end
|
||||
print("=======================why", list_room.numItems, #playList, #roomList)
|
||||
list_room.numItems = #playList + #roomList
|
||||
list_gamePlay.numItems = #playList + 1
|
||||
end
|
||||
|
|
@ -535,7 +539,6 @@ function M:OnUpdate()
|
|||
ViewUtil.ErrorTip(res.ReturnCode, string.format('删除房间-%s失败!', self._group.rooms[i].id))
|
||||
else
|
||||
self._roomNum = #self._group.rooms
|
||||
self._group.update_room = false
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ end
|
|||
|
||||
function M:Show()
|
||||
BaseView.Show(self)
|
||||
-- self:QuickLogin()
|
||||
self:QuickLogin()
|
||||
end
|
||||
|
||||
local function __goto_lobby(response)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ end
|
|||
|
||||
function M:ShowHuTip(card_list)
|
||||
printlog("ShowHuTip")
|
||||
local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi)
|
||||
local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui,
|
||||
DataManager.CurrenRoom.room_config.Laizi)
|
||||
if #tingList > 0 then
|
||||
if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo > 0 then
|
||||
for i = 1, #DataManager.CurrenRoom.laiziInfo do
|
||||
|
|
@ -26,7 +27,6 @@ function M:ShowHuTip(card_list)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
self._mainView._hu_tip:FillData(tingList)
|
||||
end
|
||||
|
|
@ -44,7 +44,6 @@ function M:UpdateHandCard(getcard, mp)
|
|||
if obj.card:GetController("laizi") then
|
||||
obj.card:GetController("laizi").selectedIndex = 1
|
||||
end
|
||||
|
||||
end
|
||||
else
|
||||
if obj.card.GetController then
|
||||
|
|
@ -53,11 +52,8 @@ function M:UpdateHandCard(getcard, mp)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -73,7 +69,8 @@ function M:UpdateHandCard(getcard, mp)
|
|||
local btn = _carViewList[i].card
|
||||
local card = self:GetCard(btn)
|
||||
list_remove(card_list, card)
|
||||
local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi)
|
||||
local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true,
|
||||
DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi)
|
||||
if #tingList > 0 then
|
||||
local count = 0
|
||||
for j = 1, #tingList do
|
||||
|
|
@ -109,7 +106,6 @@ function M:UpdateHandCard(getcard, mp)
|
|||
end
|
||||
self._out_card = false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function M:__OnClickHandCard(context)
|
||||
|
|
@ -190,6 +186,7 @@ function M:CheckPlayerOnlineState()
|
|||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function M:Clear(bskip)
|
||||
--self._ctr_state.selectedIndex = 0
|
||||
self._area_fz_list.x = self._src_fz_list.x
|
||||
|
|
@ -208,6 +205,6 @@ function M:Clear(bskip)
|
|||
self._carViewList[i].card:Dispose()
|
||||
end
|
||||
self._carViewList = {}
|
||||
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -56,8 +56,6 @@ function M:init()
|
|||
if _gamectr then
|
||||
_gamectr:AddEventListener(GameEvent.MJModifySzie, handler(self, self.SetMJSize))
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
function M:SetMJSize(zS)
|
||||
|
|
@ -119,12 +117,12 @@ function M:GetPrefix()
|
|||
end
|
||||
|
||||
function M:fillCard(obj, pos_str, card, use3d)
|
||||
|
||||
if self._current_card_type == 2 and (use3d == nil or use3d == true) then
|
||||
obj.icon = 'ui://MajiangCard3d/' .. 'b' .. pos_str .. card
|
||||
else
|
||||
obj.icon = 'ui://Main_Majiang/' .. self:GetPrefix() .. pos_str .. card
|
||||
end
|
||||
print("================================fillCard", obj, pos_str, card, use3d, obj.icon)
|
||||
end
|
||||
|
||||
function M:getBackCard(card)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ function M:init()
|
|||
elseif _data.size == 1 then
|
||||
self._area_handcard_list:SetScale(1, 1)
|
||||
self._area_fz_list:SetScale(1, 1)
|
||||
|
||||
elseif _data.size == 2 then
|
||||
self._area_handcard_list:SetScale(0.8, 0.8)
|
||||
self._area_fz_list:SetScale(0.8, 0.8)
|
||||
|
|
@ -60,6 +59,7 @@ function M:setHandCardPos(btn_card, i, getcard)
|
|||
end
|
||||
|
||||
function M:UpdateHandCard(getcard, mp)
|
||||
print("======================main", getcard, mp)
|
||||
if self.outcard_button then
|
||||
self.outcard_button:Dispose()
|
||||
self.outcard_button = nil
|
||||
|
|
@ -130,7 +130,6 @@ function M:UpdateHandCard(getcard,mp)
|
|||
end
|
||||
else
|
||||
for i = 0, (#cards) - 1 do
|
||||
|
||||
local mp_card = UIPackage.CreateObject("Main_Majiang", "Mp_self_card" .. b3d)
|
||||
-- mp_card.icon = UIPackage.GetItemURL("Main_Majiang", "202_" .. cards[i+1])
|
||||
self:fillCard(mp_card, "202_", cards[i + 1])
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue