放炮发手感调整,以及设置修正
|
|
@ -664,7 +664,7 @@ function M:__FangziTip(tip, _uid, fptype)
|
|||
local count = #_tlist
|
||||
local zdhu = false
|
||||
local fpao = true
|
||||
|
||||
|
||||
for k = 1, #_tlist do
|
||||
local td = tip.tip_map_type[_tlist[k]][1]
|
||||
if td.type == 8 then
|
||||
|
|
@ -687,7 +687,7 @@ function M:__FangziTip(tip, _uid, fptype)
|
|||
self._chipeng_tip = nil
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
for k = 1, #_tlist do
|
||||
local td = tip.tip_map_type[_tlist[k]][1]
|
||||
local url = 'ui://Main_RunBeard/Btn_fztip'
|
||||
|
|
@ -741,7 +741,7 @@ function M:__TipAction(context)
|
|||
local td = data[2]
|
||||
local tip_hu = data[3]
|
||||
local list = tip.tip_map_type[td.weight]
|
||||
|
||||
|
||||
if (#list > 1) or td.type == 1 then
|
||||
local chiflag = true
|
||||
for key, value in pairs(list) do
|
||||
|
|
@ -752,7 +752,7 @@ function M:__TipAction(context)
|
|||
if #list > 1 then
|
||||
chiflag = false
|
||||
end
|
||||
if tip_hu==false and chiflag then
|
||||
if tip_hu == false and chiflag then
|
||||
_gamectr:SendAction(list[1]["id"])
|
||||
self:__CloseTip()
|
||||
local info = self._player_card_info[1]
|
||||
|
|
@ -785,7 +785,7 @@ function M:__TipAction(context)
|
|||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- self._chipeng_tip.visible = false
|
||||
return
|
||||
end
|
||||
|
|
@ -944,7 +944,7 @@ end
|
|||
function M:OnFangziAction(...)
|
||||
local arg = { ... }
|
||||
local _player_card_info = self._player_card_info
|
||||
|
||||
|
||||
local fz = arg[1]
|
||||
local player = arg[2]
|
||||
local num = arg[3]
|
||||
|
|
@ -958,16 +958,16 @@ function M:OnFangziAction(...)
|
|||
self._popEvent = false
|
||||
|
||||
local info = _player_card_info[self:GetPos(player.seat)]
|
||||
if fz.type == RB_FZType.Wei or fz.type==RB_FZType.ChouWei then
|
||||
if fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
info:UpdateFzList(player.fz_list, true, player.seat)
|
||||
end)
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
info:UpdateFzList(player.fz_list, true, player.seat)
|
||||
end)
|
||||
else
|
||||
info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组
|
||||
end
|
||||
|
||||
|
||||
|
||||
if (player == self._room.self_player) then
|
||||
if fz.type == RB_FZType.Chi then
|
||||
|
|
@ -991,25 +991,24 @@ function M:OnFangziAction(...)
|
|||
elseif fz.type == RB_FZType.Wei then
|
||||
--显示wei 的牌
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
for i = 1, #fz.opcard do
|
||||
info:DeleteHandCard(fz.opcard[i])
|
||||
end
|
||||
end)
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
for i = 1, #fz.opcard do
|
||||
info:DeleteHandCard(fz.opcard[i])
|
||||
end
|
||||
end)
|
||||
elseif fz.type == RB_FZType.ChouWei then
|
||||
--[[ for i = 1, #fz.opcard do
|
||||
--[[ for i = 1, #fz.opcard do
|
||||
info:DeleteHandCard(fz.opcard[i])
|
||||
end]]
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
for i = 1, #fz.opcard do
|
||||
info:DeleteHandCard(fz.opcard[i])
|
||||
end
|
||||
end)
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.4)
|
||||
for i = 1, #fz.opcard do
|
||||
info:DeleteHandCard(fz.opcard[i])
|
||||
end
|
||||
end)
|
||||
elseif fz.type == RB_FZType.Pao then
|
||||
if num > 0 then
|
||||
for i = 1, #fz.opcard do
|
||||
|
|
@ -1027,7 +1026,7 @@ function M:OnFangziAction(...)
|
|||
function()
|
||||
coroutine.wait(0.3)
|
||||
if fz.type ~= RB_FZType.Kan then
|
||||
info:SendChangeCard()
|
||||
info:SendChangeCard()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
@ -1038,7 +1037,7 @@ function M:OnFangziAction(...)
|
|||
local info = _player_card_info[self:GetPos(player.seat)]
|
||||
local pNode = info._mask_liangpai
|
||||
local effect = UIPackage.CreateObject('Main_RunBeard', 'FzEffect')
|
||||
|
||||
|
||||
if fz.type == RB_FZType.Peng then
|
||||
-- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng")
|
||||
self:PlaySound(player.self_user.sex, 'F_Peng')
|
||||
|
|
@ -1052,9 +1051,9 @@ function M:OnFangziAction(...)
|
|||
elseif fz.type == RB_FZType.Wei then
|
||||
-- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei")
|
||||
self:PlaySound(player.self_user.sex, 'F_' .. fz.card)
|
||||
|
||||
info:UpdateOutCardList(fz.card,true,true,fz.from_seat)
|
||||
|
||||
|
||||
info:UpdateOutCardList(fz.card, true, true, fz.from_seat)
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(0.8)
|
||||
|
|
@ -1065,19 +1064,18 @@ function M:OnFangziAction(...)
|
|||
effect.x, effect.y = -250, -200
|
||||
effect:GetTransition('t0'):Play()
|
||||
pNode:AddChild(effect)
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.8)
|
||||
effect:Dispose()
|
||||
end
|
||||
)
|
||||
|
||||
elseif fz.type == RB_FZType.ChouWei then
|
||||
self:PlaySound(player.self_user.sex, 'F_' .. fz.card)
|
||||
info:UpdateOutCardList(fz.card,true,true,fz.from_seat)
|
||||
|
||||
info:UpdateOutCardList(fz.card, true, true, fz.from_seat)
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.2)
|
||||
|
|
@ -1088,22 +1086,21 @@ function M:OnFangziAction(...)
|
|||
effect.x, effect.y = -250, -200
|
||||
effect:GetTransition('t0'):Play()
|
||||
pNode:AddChild(effect)
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.7)
|
||||
effect:Dispose()
|
||||
end
|
||||
)
|
||||
|
||||
elseif fz.type == RB_FZType.Pao then
|
||||
-- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao")
|
||||
self:PlaySound(player.self_user.sex, 'F_KaiDuo')
|
||||
effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao')
|
||||
elseif fz.type == RB_FZType.Ti then
|
||||
self:PlaySound(player.self_user.sex, 'F_' .. fz.card)
|
||||
info:UpdateOutCardList(fz.card,true,true,fz.from_seat)
|
||||
info:UpdateOutCardList(fz.card, true, true, fz.from_seat)
|
||||
effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti')
|
||||
effect.touchable = false
|
||||
effect.x, effect.y = -250, -200
|
||||
|
|
@ -1114,9 +1111,8 @@ function M:OnFangziAction(...)
|
|||
coroutine.wait(1.2)
|
||||
self:PlaySound(player.self_user.sex, 'F_SaoChuan')
|
||||
info:PlayingOutCardAnima()
|
||||
|
||||
end)
|
||||
|
||||
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(1.7)
|
||||
|
|
@ -1125,8 +1121,8 @@ function M:OnFangziAction(...)
|
|||
)
|
||||
-- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti")
|
||||
end
|
||||
|
||||
if fz.type~=RB_FZType.Wei and fz.type~=RB_FZType.ChouWei then
|
||||
|
||||
if fz.type ~= RB_FZType.Wei and fz.type ~= RB_FZType.ChouWei then
|
||||
effect.touchable = false
|
||||
effect.x, effect.y = -250, -200
|
||||
effect:GetTransition('t0'):Play()
|
||||
|
|
@ -1138,8 +1134,6 @@ function M:OnFangziAction(...)
|
|||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
if (player == self._room.self_player) then
|
||||
coroutine.start(
|
||||
|
|
@ -1155,14 +1149,14 @@ function M:OnFangziAction(...)
|
|||
local p = self._room:GetPlayerBySeat(fz.from_seat)
|
||||
|
||||
if p.DiceCard ~= nil and fz.active_card == p.DiceCard then
|
||||
if fz.type==RB_FZType.Wei or fz.type==RB_FZType.ChouWei or fz.type==RB_FZType.Ti or fz.type==RB_FZType.Pao then
|
||||
if fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Pao then
|
||||
coroutine.start(
|
||||
function()
|
||||
coroutine.wait(0.8)
|
||||
removeOutcard:ClearOutCard()
|
||||
end)
|
||||
function()
|
||||
coroutine.wait(0.8)
|
||||
removeOutcard:ClearOutCard()
|
||||
end)
|
||||
else
|
||||
removeOutcard:ClearOutCard()
|
||||
removeOutcard:ClearOutCard()
|
||||
end
|
||||
p.DiceCard = nil
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
local PlayerSelfCardInfoView = import(".main.ZPPlayerSelfCardInfoView")
|
||||
local CardCheck = import(".main.CardCheck")
|
||||
local M = {}
|
||||
--
|
||||
function M.new(view,mainView)
|
||||
setmetatable(M, {__index = PlayerSelfCardInfoView})
|
||||
local self = setmetatable({},{__index = M})
|
||||
--
|
||||
function M.new(view, mainView)
|
||||
setmetatable(M, { __index = PlayerSelfCardInfoView })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = "PlayerSelfCardInfoView"
|
||||
self._view = view
|
||||
self._mainView = mainView
|
||||
|
|
@ -13,36 +13,34 @@ function M.new(view,mainView)
|
|||
return self
|
||||
end
|
||||
|
||||
|
||||
function M:onTouchBegin(context)
|
||||
if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then
|
||||
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||
return
|
||||
end
|
||||
local button = context.sender
|
||||
local card = button.data
|
||||
if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then
|
||||
if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then
|
||||
self:ShowHuTip(card.card_item)
|
||||
end
|
||||
card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item)
|
||||
card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/204_", card.card_item)
|
||||
-- card.btn_card:GetController('touch').selectedIndex = 1
|
||||
card.btn_card.sortingOrder = 100
|
||||
local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y))
|
||||
card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50)
|
||||
local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50)
|
||||
card.touch_pos = xy - button.xy
|
||||
|
||||
end
|
||||
|
||||
|
||||
function M:__OnDragEnd(context)
|
||||
if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then
|
||||
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||
return
|
||||
end
|
||||
if self.outcard_button then
|
||||
self.outcard_button = nil
|
||||
end
|
||||
local button = context.sender
|
||||
|
||||
|
||||
local card = button.data
|
||||
|
||||
|
||||
local _room = DataManager.CurrenRoom
|
||||
card.btn_card.sortingOrder = 0
|
||||
if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) then
|
||||
|
|
@ -53,7 +51,7 @@ function M:__OnDragEnd(context)
|
|||
else
|
||||
local isChangeCard = false
|
||||
self.outcard_button = nil
|
||||
card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item)
|
||||
card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_", card.card_item)
|
||||
self._area_handcard_list:AddChild(button)
|
||||
if #self.card_list == 1 then
|
||||
isChangeCard = false
|
||||
|
|
@ -61,188 +59,188 @@ function M:__OnDragEnd(context)
|
|||
return
|
||||
end
|
||||
local CountCards = {}
|
||||
for i=1,#self.card_list do
|
||||
for i = 1, #self.card_list do
|
||||
local lists = {}
|
||||
if CountCards[self.card_list[i].index_X] == nil then
|
||||
lists[#lists+1] = self.card_list[i]
|
||||
CountCards[self.card_list[i].index_X]= lists
|
||||
lists[#lists + 1] = self.card_list[i]
|
||||
CountCards[self.card_list[i].index_X] = lists
|
||||
else
|
||||
CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i]
|
||||
CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i]
|
||||
end
|
||||
end
|
||||
local minmark = 1
|
||||
local maxmark = #self.card_list
|
||||
if card == self.card_list[1] or card == self.card_list[#self.card_list] then
|
||||
if card == self.card_list[1] or card == self.card_list[#self.card_list] then
|
||||
if self.card_list[1].index_X == self.card_list[2].index_X then
|
||||
minmark =2
|
||||
minmark = 2
|
||||
end
|
||||
if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then
|
||||
maxmark =#self.card_list-1
|
||||
if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then
|
||||
maxmark = #self.card_list - 1
|
||||
end
|
||||
end
|
||||
if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<10 then
|
||||
list_remove(self.card_list,card)
|
||||
if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 and button.y > -380 then
|
||||
list_remove(self.card_list, card)
|
||||
local num = 0
|
||||
for i=1,#self.card_list do
|
||||
for i = 1, #self.card_list do
|
||||
if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
end
|
||||
if card.index_X == self.card_list[i].index_X then
|
||||
num = num+1
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
if num ==0 then
|
||||
for i=1,#self.card_list do
|
||||
if self.card_list[i].index_X < card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X + 1
|
||||
end
|
||||
if num == 0 then
|
||||
for i = 1, #self.card_list do
|
||||
if self.card_list[i].index_X < card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X + 1
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1,#self.card_list do
|
||||
self.card_list[i].index_X = self.card_list[i].index_X + 1
|
||||
for i = 1, #self.card_list do
|
||||
self.card_list[i].index_X = self.card_list[i].index_X + 1
|
||||
end
|
||||
end
|
||||
card.index_X =1
|
||||
card.index_Y =1
|
||||
table.insert(self.card_list,1,card)
|
||||
card.index_X = 1
|
||||
card.index_Y = 1
|
||||
table.insert(self.card_list, 1, card)
|
||||
isChangeCard = true
|
||||
elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<10 then
|
||||
list_remove(self.card_list,card)
|
||||
elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 and button.y > -380 then
|
||||
list_remove(self.card_list, card)
|
||||
local num = 0
|
||||
for i=1,#self.card_list do
|
||||
for i = 1, #self.card_list do
|
||||
if card.index_X == self.card_list[i].index_X then
|
||||
num = num+1
|
||||
num = num + 1
|
||||
end
|
||||
if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
end
|
||||
end
|
||||
if num ==0 then
|
||||
for i=1,#self.card_list do
|
||||
if self.card_list[i].index_X > card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X - 1
|
||||
end
|
||||
if num == 0 then
|
||||
for i = 1, #self.card_list do
|
||||
if self.card_list[i].index_X > card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
card.index_X =self.card_list[#self.card_list].index_X+1
|
||||
card.index_Y =1
|
||||
self.card_list[#self.card_list+1] =card
|
||||
card.index_X = self.card_list[#self.card_list].index_X + 1
|
||||
card.index_Y = 1
|
||||
self.card_list[#self.card_list + 1] = card
|
||||
isChangeCard = true
|
||||
else
|
||||
else
|
||||
local MoveCard = false
|
||||
local MoveCardPos = 0
|
||||
local MoveCardY = 0
|
||||
for i=1,#CountCards do
|
||||
for i = 1, #CountCards do
|
||||
local card_view = CountCards[i][1]
|
||||
if card_view~=nil then
|
||||
if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then
|
||||
if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then
|
||||
|
||||
if card_view ~= nil then
|
||||
if button.x + button.width / 2 > card_view.old_postion.x and button.x + button.width / 2 < (card_view.old_postion.x + button.width) and button.y > -380 then
|
||||
if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then
|
||||
MoveCardPos = i
|
||||
MoveCardY = #CountCards[i]+1
|
||||
MoveCardY = #CountCards[i] + 1
|
||||
MoveCard = true
|
||||
list_remove(self.card_list,card)
|
||||
list_remove(self.card_list, card)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local MoveCardindex = 0
|
||||
-- local MoveCardY = 0
|
||||
if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then
|
||||
if #CountCards[card.index_X]>1 then
|
||||
for i=1,#CountCards[card.index_X] do
|
||||
-- local MoveCardY = 0
|
||||
print("lingmeng end", button.y, MoveCard, button.y > -380,
|
||||
button.x + button.width / 2 > card.old_postion.x and
|
||||
button.x + button.width / 2 < (card.old_postion.x + button.width) and button.y > -380)
|
||||
if button.x + button.width / 2 > card.old_postion.x and button.x + button.width / 2 < (card.old_postion.x + button.width) and button.y > -380 then
|
||||
if #CountCards[card.index_X] > 1 then
|
||||
for i = 1, #CountCards[card.index_X] do
|
||||
local _cv = CountCards[card.index_X][i]
|
||||
if _cv ~= card then
|
||||
if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then
|
||||
if button.y + button.height / 2 > _cv.btn_card.y and button.y + button.height / 2 < (_cv.btn_card.y + button.height) then
|
||||
--向下移動
|
||||
if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then
|
||||
MoveCardindex = -1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list,card)
|
||||
--向上移動
|
||||
elseif ((button.y+button.height/2) -20) < card.old_postion.y then
|
||||
MoveCardindex = 1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list,card)
|
||||
end
|
||||
elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then
|
||||
MoveCardindex = 1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list,card)
|
||||
elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then
|
||||
MoveCardindex = -1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list,card)
|
||||
if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then
|
||||
MoveCardindex = -1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list, card)
|
||||
--向上移動
|
||||
elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then
|
||||
MoveCardindex = 1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list, card)
|
||||
end
|
||||
elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then
|
||||
MoveCardindex = 1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list, card)
|
||||
elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then
|
||||
MoveCardindex = -1
|
||||
MoveCardPos = card.index_X
|
||||
MoveCardY = _cv.index_Y
|
||||
MoveCard = true
|
||||
list_remove(self.card_list, card)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
if MoveCard ==true and MoveCardindex ==0 then
|
||||
print("lingmeng end", MoveCard, MoveCardindex)
|
||||
if MoveCard == true and MoveCardindex == 0 then
|
||||
local num = 0
|
||||
for i=1,#self.card_list do
|
||||
for i = 1, #self.card_list do
|
||||
if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
end
|
||||
if card.index_X == self.card_list[i].index_X then
|
||||
num = num+1
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
if num ==0 then
|
||||
for i=1,#self.card_list do
|
||||
if self.card_list[i].index_X > card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X - 1
|
||||
end
|
||||
if num == 0 then
|
||||
for i = 1, #self.card_list do
|
||||
if self.card_list[i].index_X > card.index_X then
|
||||
self.card_list[i].index_X = self.card_list[i].index_X - 1
|
||||
end
|
||||
end
|
||||
if MoveCardPos > card.index_X then
|
||||
MoveCardPos = MoveCardPos-1
|
||||
MoveCardPos = MoveCardPos - 1
|
||||
end
|
||||
end
|
||||
card.index_X =MoveCardPos
|
||||
card.index_Y =MoveCardY
|
||||
for i=#self.card_list,1,-1 do
|
||||
card.index_X = MoveCardPos
|
||||
card.index_Y = MoveCardY
|
||||
for i = #self.card_list, 1, -1 do
|
||||
if MoveCardPos == self.card_list[i].index_X then
|
||||
table.insert(self.card_list,(i+1),card)
|
||||
table.insert(self.card_list, (i + 1), card)
|
||||
break
|
||||
end
|
||||
end
|
||||
isChangeCard = true
|
||||
--上下移动
|
||||
elseif MoveCard ==true and MoveCardindex ~= 0 then
|
||||
for i=1,#self.card_list do
|
||||
if card.index_X == self.card_list[i].index_X then
|
||||
--上下移动
|
||||
elseif MoveCard == true and MoveCardindex ~= 0 then
|
||||
for i = 1, #self.card_list do
|
||||
if card.index_X == self.card_list[i].index_X then
|
||||
--向下移动
|
||||
if MoveCardindex == -1 then
|
||||
if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then
|
||||
if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y + 1
|
||||
|
||||
end
|
||||
--向上移动
|
||||
--向上移动
|
||||
else
|
||||
if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
|
||||
if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then
|
||||
self.card_list[i].index_Y = self.card_list[i].index_Y - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
card.index_X =MoveCardPos
|
||||
card.index_Y =MoveCardY
|
||||
for i=#self.card_list,1,-1 do
|
||||
if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then
|
||||
table.insert(self.card_list,(i+1),card)
|
||||
card.index_X = MoveCardPos
|
||||
card.index_Y = MoveCardY
|
||||
for i = #self.card_list, 1, -1 do
|
||||
if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then
|
||||
table.insert(self.card_list, (i + 1), card)
|
||||
break
|
||||
elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then
|
||||
table.insert(self.card_list,i,card)
|
||||
elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then
|
||||
table.insert(self.card_list, i, card)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
|
@ -251,187 +249,170 @@ function M:__OnDragEnd(context)
|
|||
isChangeCard = false
|
||||
self._area_handcard_list:AddChild(button)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
self:UpdateHandCardsPos()
|
||||
if isChangeCard ==true then
|
||||
if isChangeCard == true then
|
||||
self:SendChangeCard()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M:UpdateOutCardList(outcard,isShow,isMopai,seat)
|
||||
if(isShow == nil) then
|
||||
isShow = false
|
||||
function M:UpdateOutCardList(outcard, isShow, isMopai, seat)
|
||||
if (isShow == nil) then
|
||||
isShow = false
|
||||
end
|
||||
if(isMopai == nil) then
|
||||
isMopai = false
|
||||
if (isMopai == nil) then
|
||||
isMopai = false
|
||||
end
|
||||
self._area_outcard_list:RemoveChildren(0,-1,true)
|
||||
local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard")
|
||||
|
||||
if outcard==0 then
|
||||
--outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300"
|
||||
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||
local outcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard")
|
||||
|
||||
if outcard == 0 then
|
||||
--outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300"
|
||||
else
|
||||
outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard)
|
||||
outcards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_", outcard)
|
||||
end
|
||||
outcards.x,outcards.y = 0,0
|
||||
local show_di_bg = outcards:GetChild("show_di_bg")
|
||||
outcards.x, outcards.y = 0, 0
|
||||
local show_di_bg = outcards:GetChild("show_di_bg")
|
||||
--show_di_bg.visible = true
|
||||
if(isShow)then
|
||||
if outcard == 0 then
|
||||
show_di_bg.visible = false
|
||||
end
|
||||
if(seat ~= nil and outcards~=nil)then
|
||||
if(isMopai)then
|
||||
if outcard ~= 0 then
|
||||
outcards:GetTransition("mopai"..seat):Play(function( )
|
||||
-- show_di_bg.visible = true
|
||||
|
||||
end)
|
||||
end
|
||||
if (isShow) then
|
||||
if outcard == 0 then
|
||||
show_di_bg.visible = false
|
||||
end
|
||||
if (seat ~= nil and outcards ~= nil) then
|
||||
if (isMopai) then
|
||||
if outcard ~= 0 then
|
||||
outcards:GetTransition("mopai" .. seat):Play(function()
|
||||
-- show_di_bg.visible = true
|
||||
end)
|
||||
end
|
||||
else
|
||||
show_di_bg.visible = false
|
||||
outcards:GetTransition("cpai"..seat):Play()
|
||||
show_di_bg.visible = false
|
||||
outcards:GetTransition("cpai" .. seat):Play()
|
||||
end
|
||||
else
|
||||
--show_di_bg.visible = true
|
||||
end
|
||||
else
|
||||
--show_di_bg.visible = true
|
||||
end
|
||||
else
|
||||
show_di_bg.visible = false
|
||||
show_di_bg.visible = false
|
||||
end
|
||||
self._area_outcard_list:AddChild(outcards)
|
||||
end
|
||||
|
||||
--弃牌
|
||||
function M:UpdateQiPai( qi_list,isplay)
|
||||
self._area_qipai_list:RemoveChildren(0,-1,true)
|
||||
for i=1,#qi_list do
|
||||
local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai")
|
||||
qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i])
|
||||
if(isplay)then
|
||||
if(i == #qi_list) then
|
||||
qicards:GetTransition("t0"):Play()
|
||||
function M:UpdateQiPai(qi_list, isplay)
|
||||
self._area_qipai_list:RemoveChildren(0, -1, true)
|
||||
for i = 1, #qi_list do
|
||||
local qicards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai")
|
||||
qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_", qi_list[i])
|
||||
if (isplay) then
|
||||
if (i == #qi_list) then
|
||||
qicards:GetTransition("t0"):Play()
|
||||
end
|
||||
end
|
||||
self._area_qipai_list:AddChild(qicards)
|
||||
end
|
||||
end
|
||||
self._area_qipai_list:AddChild(qicards)
|
||||
end
|
||||
end
|
||||
|
||||
--摸牌动画
|
||||
function M:PlayingOutCardAnima( card)
|
||||
function M:PlayingOutCardAnima(card)
|
||||
coroutine.start(function()
|
||||
coroutine.wait(0.1)
|
||||
-- self._bgview.selectedIndex = 1
|
||||
coroutine.wait(0.1)
|
||||
-- self._bgview.selectedIndex = 1
|
||||
self:ClearOutCard()
|
||||
end)
|
||||
end
|
||||
|
||||
function M:UpdateFzList( fz_list ,ispaly)
|
||||
|
||||
function M:UpdateFzList(fz_list, ispaly)
|
||||
--printlog("UpdateFzList area_fz_list2")
|
||||
self._area_fz_list:RemoveChildren(0,-1,true)
|
||||
for i = 1,#fz_list do
|
||||
local fzitem=nil
|
||||
self._area_fz_list:RemoveChildren(0, -1, true)
|
||||
for i = 1, #fz_list do
|
||||
local fzitem = nil
|
||||
if fz_list[i].type ~= RB_FZType.Kan then
|
||||
fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew")
|
||||
if(ispaly == false)then
|
||||
fzitem:RemoveChildren(0,-1,true)
|
||||
fzitem = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew")
|
||||
if (ispaly == false) then
|
||||
fzitem:RemoveChildren(0, -1, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then
|
||||
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card)
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
fzcards:GetChild("card_" .. 1).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].active_card)
|
||||
fzcards:GetController("c2").selectedIndex = 1
|
||||
fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1])
|
||||
fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2])
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
fzcards:GetChild("card_" .. 2).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].opcard[1])
|
||||
fzcards:GetChild("card_" .. 3).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].opcard[2])
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
elseif fz_list[i].type == RB_FZType.Peng then
|
||||
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
for j=1,3 do
|
||||
fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
for j = 1, 3 do
|
||||
fzcards:GetChild("card_" .. j).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].card)
|
||||
end
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
elseif fz_list[i].type == RB_FZType.Wei then
|
||||
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
fzcards:GetController("c1").selectedIndex=1
|
||||
for j=1,3 do
|
||||
if j==1 then
|
||||
fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
fzcards:GetController("c1").selectedIndex = 1
|
||||
for j = 1, 3 do
|
||||
if j == 1 then
|
||||
fzcards:GetChild("card_" .. j).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].card)
|
||||
else
|
||||
fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300"
|
||||
fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300"
|
||||
end
|
||||
end
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
elseif fz_list[i].type == RB_FZType.ChouWei then
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
for j=1,2 do
|
||||
fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300"
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3")
|
||||
for j = 1, 2 do
|
||||
fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300"
|
||||
end
|
||||
fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
|
||||
fzcards:GetChild("card_" .. 3).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].card)
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
elseif fz_list[i].type == RB_FZType.Pao then
|
||||
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4")
|
||||
for j=1,4 do
|
||||
fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4")
|
||||
for j = 1, 4 do
|
||||
fzcards:GetChild("card_" .. j).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].card)
|
||||
end
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
elseif fz_list[i].type == RB_FZType.Ti then
|
||||
|
||||
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4")
|
||||
for j=1,4 do
|
||||
if j==1 then
|
||||
fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||
local fzcards = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4")
|
||||
for j = 1, 4 do
|
||||
if j == 1 then
|
||||
fzcards:GetChild("card_" .. j).icon = self:getCardItem("ui://Main_RunBeard/202_", fz_list[i].card)
|
||||
else
|
||||
fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300"
|
||||
fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300"
|
||||
end
|
||||
end
|
||||
fzcards.x,fzcards.y = 0,0
|
||||
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)
|
||||
|
||||
fzcards.x, fzcards.y = 0, 0
|
||||
self:playAnim(fzitem, fzcards, #fz_list, i, ispaly)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
function M:playAnim( fzitem,fzcards, size,i,ispaly )
|
||||
if(ispaly == nil)then
|
||||
ispaly =false
|
||||
end
|
||||
if(ispaly and i == size)then
|
||||
local faArray= fzitem:GetChild("chiwei")
|
||||
if(faArray~=nil)then
|
||||
faArray:AddChild(fzcards)
|
||||
else
|
||||
fzitem:AddChild(fzcards)
|
||||
end
|
||||
else
|
||||
fzitem:AddChild(fzcards)
|
||||
end
|
||||
self._area_fz_list:AddChild(fzitem)
|
||||
function M:playAnim(fzitem, fzcards, size, i, ispaly)
|
||||
if (ispaly == nil) then
|
||||
ispaly = false
|
||||
end
|
||||
if (ispaly and i == size) then
|
||||
local faArray = fzitem:GetChild("chiwei")
|
||||
if (faArray ~= nil) then
|
||||
faArray:AddChild(fzcards)
|
||||
else
|
||||
fzitem:AddChild(fzcards)
|
||||
end
|
||||
else
|
||||
fzitem:AddChild(fzcards)
|
||||
end
|
||||
self._area_fz_list:AddChild(fzitem)
|
||||
end
|
||||
|
||||
|
||||
--出牌提示动画
|
||||
function M:ChuPaiTiShi()
|
||||
if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then
|
||||
--出牌提示动画
|
||||
function M:ChuPaiTiShi()
|
||||
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||
return
|
||||
end
|
||||
local chu_player = DataManager.CurrenRoom.self_player
|
||||
|
|
@ -442,31 +423,30 @@ end
|
|||
selfplayeTable.paoCount = chu_player.paoCount
|
||||
selfplayeTable.hu_xi = chu_player.hu_xi
|
||||
local player = membe_deep_clone(selfplayeTable)
|
||||
local mark_ting= {}
|
||||
for i=1,#DataManager.CurrenRoom.self_player.handcard_list do
|
||||
local card = DataManager.CurrenRoom.self_player.handcard_list[i]
|
||||
local mark_ting = {}
|
||||
for i = 1, #DataManager.CurrenRoom.self_player.handcard_list do
|
||||
local card = DataManager.CurrenRoom.self_player.handcard_list[i]
|
||||
list_remove(player.handcard_list, card)
|
||||
local _player = membe_deep_clone(player)
|
||||
local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom)
|
||||
local tingList = CardCheck.tingPai(_player, DataManager.CurrenRoom)
|
||||
local isKan = false
|
||||
for j=1,#player.fz_list do
|
||||
for j = 1, #player.fz_list do
|
||||
if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then
|
||||
isKan =true
|
||||
isKan = true
|
||||
end
|
||||
end
|
||||
if #tingList > 0 and isKan == false then
|
||||
|
||||
mark_ting[#mark_ting+1] = card
|
||||
mark_ting[#mark_ting + 1] = card
|
||||
end
|
||||
table.insert(player.handcard_list, card)
|
||||
table.sort( player.handcard_list, ViewUtil.HandCardSort)
|
||||
table.sort(player.handcard_list, ViewUtil.HandCardSort)
|
||||
end
|
||||
if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then
|
||||
self._view :GetController("chupai").selectedIndex =1
|
||||
if #mark_ting>0 then
|
||||
for i=1,#mark_ting do
|
||||
for k=1,#self.card_list do
|
||||
local card_view= self.card_list[k]
|
||||
if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then
|
||||
self._view:GetController("chupai").selectedIndex = 1
|
||||
if #mark_ting > 0 then
|
||||
for i = 1, #mark_ting do
|
||||
for k = 1, #self.card_list do
|
||||
local card_view = self.card_list[k]
|
||||
if card_view.card_item == mark_ting[i] then
|
||||
card_view.btn_card:GetController("mark_ting").selectedIndex = 1
|
||||
end
|
||||
|
|
@ -474,13 +454,12 @@ end
|
|||
end
|
||||
end
|
||||
else
|
||||
self._view :GetController("chupai").selectedIndex =0
|
||||
for k=1,#self.card_list do
|
||||
local card_view= self.card_list[k]
|
||||
self._view:GetController("chupai").selectedIndex = 0
|
||||
for k = 1, #self.card_list do
|
||||
local card_view = self.card_list[k]
|
||||
card_view.btn_card:GetController("mark_ting").selectedIndex = 0
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
local M = {
|
||||
btn_card = nil,
|
||||
card_item = 0,
|
||||
|
|
@ -13,7 +11,7 @@ local M = {
|
|||
|
||||
function M.InitCardView(card_code, index_X, index_Y, type)
|
||||
-- setmetatable(M, {__index = CardView})
|
||||
local self = setmetatable({}, {__index = M})
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self._room = DataManager.CurrenRoom
|
||||
self.btn_card = self:InitUI(card_code, type)
|
||||
self.card_item = card_code
|
||||
|
|
@ -64,7 +62,7 @@ function M:getCardSize()
|
|||
if self._room.change_card_size ~= nil then
|
||||
return self._room.change_card_size
|
||||
else
|
||||
return 1
|
||||
return 1.2
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -111,10 +109,10 @@ end
|
|||
|
||||
function M:UpdateScale()
|
||||
local size = self._room.change_card_size
|
||||
-- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item)
|
||||
self.icon:SetScale(size, size)
|
||||
self.btn_card:GetChild("n6"):SetScale(size, size)
|
||||
-- self:getCardWidth()
|
||||
-- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item)
|
||||
self.icon:SetScale(size, size)
|
||||
self.btn_card:GetChild("n6"):SetScale(size, size)
|
||||
-- self:getCardWidth()
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ local M = {
|
|||
default_btn = false
|
||||
}
|
||||
|
||||
setmetatable(M, {__index = MainView})
|
||||
setmetatable(M, { __index = MainView })
|
||||
|
||||
local default_bg = 1
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
else
|
||||
self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息1起'
|
||||
end
|
||||
|
||||
|
||||
self._view:GetController('bg_state').selectedIndex = id - 1
|
||||
end
|
||||
self.cd_time = 0
|
||||
|
|
@ -90,11 +90,11 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
local typeface = _data['game_cardsize']
|
||||
local _gamectr = self._gamectr
|
||||
if typeface == 0 then
|
||||
self._room.change_card_size = 1.2
|
||||
self._room.change_card_size = 1.4
|
||||
elseif typeface == 1 then
|
||||
self._room.change_card_size = 1
|
||||
self._room.change_card_size = 1.2
|
||||
elseif typeface == 2 then
|
||||
self._room.change_card_size = 0.8
|
||||
self._room.change_card_size = 1.2
|
||||
end
|
||||
else
|
||||
self._room.change_card_size = change_card_size
|
||||
|
|
@ -126,7 +126,7 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
self._room.fangyan_typeface = typeface
|
||||
end
|
||||
end
|
||||
--printlog("OneventResultinit3")
|
||||
--printlog("OneventResultinit3")
|
||||
local _player_card_info = self._player_card_info
|
||||
for i = 1, _room.room_config.people_num do
|
||||
local tem = self._view:GetChild('player_card_info' .. i)
|
||||
|
|
@ -160,9 +160,9 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
self._ctr_action = self._view:GetController('action')
|
||||
if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then
|
||||
elseif not _room.self_player.ready then
|
||||
local round=DataManager.CurrenRoom.room_config.config.times or 1
|
||||
local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai
|
||||
--[[if xpconfig then
|
||||
local round = DataManager.CurrenRoom.room_config.config.times or 1
|
||||
local xpconfig = DataManager.CurrenRoom.room_config.config.xi_pai
|
||||
--[[if xpconfig then
|
||||
if round>1 then
|
||||
self._ctr_action.selectedIndex = 1
|
||||
else
|
||||
|
|
@ -173,7 +173,6 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
self._ctr_action.selectedIndex = 1
|
||||
end]]
|
||||
self._ctr_action.selectedIndex = 2
|
||||
|
||||
else
|
||||
self._ctr_action.selectedIndex = 0
|
||||
end
|
||||
|
|
@ -182,75 +181,70 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
|||
--printlog("OneventResultinit6")
|
||||
self:showBackBtnView()
|
||||
--printlog("OneventResultinit7")
|
||||
self:InitXiPai()
|
||||
self:InitXiPai()
|
||||
--printlog("OneventResultinit8")
|
||||
self:InitXiPai1()
|
||||
self:InitXiPai1()
|
||||
--printlog("OneventResultinit9")
|
||||
end
|
||||
|
||||
function M:InitXiPai()
|
||||
self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02")
|
||||
self._root_view:AddChild(self._xipaiPanel)
|
||||
|
||||
local offset = get_offset(self._full_offset)
|
||||
self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02")
|
||||
self._root_view:AddChild(self._xipaiPanel)
|
||||
|
||||
local offset = get_offset(self._full_offset)
|
||||
|
||||
self._xipaiPanel.width = GRoot.inst.width - (offset * 2)
|
||||
self._xipaiPanel.height = GRoot.inst.height
|
||||
self._xipaiPanel.x = offset
|
||||
|
||||
self._xipaiPanel.visible=false
|
||||
--self:PlayXiPai()
|
||||
|
||||
self._xipaiPanel.visible = false
|
||||
--self:PlayXiPai()
|
||||
end
|
||||
|
||||
function M:PlayXiPai(xipaiCallBack)
|
||||
if self._xipaiPanel then
|
||||
coroutine.start(function()
|
||||
self._xipaiPanel.visible=true
|
||||
self._xipaiPanel:GetTransition("XiPai"):Play()
|
||||
coroutine.wait(3.5)
|
||||
self._xipaiPanel.visible=false
|
||||
if xipaiCallBack then
|
||||
xipaiCallBack()
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
end
|
||||
if self._xipaiPanel then
|
||||
coroutine.start(function()
|
||||
self._xipaiPanel.visible = true
|
||||
self._xipaiPanel:GetTransition("XiPai"):Play()
|
||||
coroutine.wait(3.5)
|
||||
self._xipaiPanel.visible = false
|
||||
if xipaiCallBack then
|
||||
xipaiCallBack()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function M:InitXiPai1()
|
||||
self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03")
|
||||
self._root_view:AddChild(self._xipaiPanel1)
|
||||
|
||||
local offset = get_offset(self._full_offset)
|
||||
self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03")
|
||||
self._root_view:AddChild(self._xipaiPanel1)
|
||||
|
||||
local offset = get_offset(self._full_offset)
|
||||
|
||||
self._xipaiPanel1.width = GRoot.inst.width - (offset * 2)
|
||||
self._xipaiPanel1.height = GRoot.inst.height
|
||||
self._xipaiPanel1.x = offset
|
||||
|
||||
self._xipaiPanel1.visible=false
|
||||
--self:PlayXiPai()
|
||||
|
||||
self._xipaiPanel1.visible = false
|
||||
--self:PlayXiPai()
|
||||
end
|
||||
|
||||
function M:PlayXiPai1(xipaiCallBack)
|
||||
if self._xipaiPanel1 then
|
||||
coroutine.start(function()
|
||||
self._xipaiPanel1.visible=true
|
||||
self._xipaiPanel1:GetTransition("XiPai"):Play()
|
||||
coroutine.wait(3.5)
|
||||
self._xipaiPanel1.visible=false
|
||||
if xipaiCallBack then
|
||||
xipaiCallBack()
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
end
|
||||
if self._xipaiPanel1 then
|
||||
coroutine.start(function()
|
||||
self._xipaiPanel1.visible = true
|
||||
self._xipaiPanel1:GetTransition("XiPai"):Play()
|
||||
coroutine.wait(3.5)
|
||||
self._xipaiPanel1.visible = false
|
||||
if xipaiCallBack then
|
||||
xipaiCallBack()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function M:NewSettingView(cardIndex)
|
||||
local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex)
|
||||
local settingView = ZPSettingView.new(self._view, 2, self.default_btn, cardIndex)
|
||||
settingView:FillBgSection(
|
||||
function(url)
|
||||
LoadGameBg(url, self._root_view)
|
||||
|
|
@ -307,12 +301,13 @@ end
|
|||
|
||||
-- 设置 更新 手牌大小
|
||||
function M:UpdateCardSize(index)
|
||||
print("lingmeng UpdateCardSize")
|
||||
if index == 0 then
|
||||
self._room.change_card_size = 1.2
|
||||
self._room.change_card_size = 1.4
|
||||
elseif index == 1 then
|
||||
self._room.change_card_size = 1
|
||||
self._room.change_card_size = 1.2
|
||||
elseif index == 2 then
|
||||
self._room.change_card_size = 0.8
|
||||
self._room.change_card_size = 1.2
|
||||
end
|
||||
local info = self._player_card_info[1]
|
||||
info:UpdateCardSize()
|
||||
|
|
@ -322,10 +317,11 @@ end
|
|||
function M:UpdateFangyan(index)
|
||||
self._room.fangyan_typeface = index
|
||||
end
|
||||
|
||||
--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里
|
||||
function M:ResetHandCard(...)
|
||||
local btn_reset = self._view:GetChild('btn_reset')
|
||||
--btn_reset.visible=false
|
||||
--btn_reset.visible=false
|
||||
btn_reset.onClick:Set(
|
||||
function(...)
|
||||
if self._popEvent == false then
|
||||
|
|
@ -354,7 +350,7 @@ function M:ResetHandCard(...)
|
|||
Utils.SaveLocalFile(key, json.encode(_data))
|
||||
local x = _data['index']
|
||||
local card_info = self._player_card_info[1]
|
||||
----printlog("1111111111111111111111111",x)
|
||||
----printlog("1111111111111111111111111",x)
|
||||
card_info:InitHandCard(false, x)
|
||||
end
|
||||
)
|
||||
|
|
@ -363,7 +359,7 @@ end
|
|||
function M:showBackBtnView()
|
||||
local btn_back_lobby = self._view:GetChild('btn_back_lobby')
|
||||
local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby')
|
||||
--btn_jiesan_lobby1.displayObject.gameObject:SetActive(false)
|
||||
--btn_jiesan_lobby1.displayObject.gameObject:SetActive(false)
|
||||
--btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false)
|
||||
if (btn_jiesan_lobby1 ~= nil) then
|
||||
btn_jiesan_lobby1.onClick:Set(
|
||||
|
|
@ -391,20 +387,21 @@ function M:onDisBandTimer()
|
|||
end
|
||||
self.cd_coroutine =
|
||||
coroutine.start(
|
||||
function()
|
||||
while (self.cd_time > 0) do
|
||||
self.cd_time = self.cd_time - 1
|
||||
self.cd_time = math.max(0, self.cd_time)
|
||||
if self.cd_time > 0 then
|
||||
coroutine.wait(1)
|
||||
function()
|
||||
while (self.cd_time > 0) do
|
||||
self.cd_time = self.cd_time - 1
|
||||
self.cd_time = math.max(0, self.cd_time)
|
||||
if self.cd_time > 0 then
|
||||
coroutine.wait(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
function M:Destroy()
|
||||
UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard')
|
||||
MainView.Destroy(self)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -211,11 +211,13 @@ function M:InitHandCard(isPlayAni, index)
|
|||
for j = 1, #pokerList[i] do
|
||||
local card_code = pokerList[i][j]
|
||||
local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card')
|
||||
print("lingmeng", self._room.change_card_display, card_code)
|
||||
btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code)
|
||||
btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = 95 * self:getCardSize()
|
||||
self.card_hight = 123 * self:getCardSize()
|
||||
btn_card:GetChild('n9'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = btn_card.width * self:getCardSize()
|
||||
self.card_hight = btn_card.height * self:getCardSize()
|
||||
local x, y = 500, (j * 85) - 500
|
||||
btn_card:SetXY(x, y)
|
||||
self._area_handcard_list:AddChild(btn_card)
|
||||
|
|
@ -259,11 +261,14 @@ function M:InitHandCard(isPlayAni, index)
|
|||
for j = 1, #pokerList[i] do
|
||||
local card_code = pokerList[i][j]
|
||||
local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card')
|
||||
print("lingmeng", self._room.change_card_display, card_code)
|
||||
|
||||
btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code)
|
||||
btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = 95 * self:getCardSize()
|
||||
self.card_hight = 123 * self:getCardSize()
|
||||
btn_card:GetChild('n9'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = btn_card.width * self:getCardSize()
|
||||
self.card_hight = btn_card.height * self:getCardSize()
|
||||
self._area_handcard_list:AddChild(btn_card)
|
||||
self._area_handcard_list:SetChildIndex(btn_card, 5 - j)
|
||||
local card_view = NewCardView(btn_card, card_code, i, j)
|
||||
|
|
@ -310,8 +315,8 @@ function M:UpdateHandCards(list)
|
|||
btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code)
|
||||
btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = 87 * self:getCardSize()
|
||||
self.card_hight = 110 * self:getCardSize()
|
||||
self.card_width = btn_card.width * self:getCardSize()
|
||||
self.card_hight = btn_card.height * self:getCardSize()
|
||||
local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y)
|
||||
--存牌堆
|
||||
self.card_list[#self.card_list + 1] = card_view
|
||||
|
|
@ -368,8 +373,7 @@ function M:onTouchBegin(context)
|
|||
self:ShowHuTip(card.card_item)
|
||||
end
|
||||
card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item)
|
||||
-- card.btn_card.sortingOrder = 100
|
||||
|
||||
-- card.btn_card.sortingOrder = 100
|
||||
local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50)
|
||||
card.touch_pos = xy - button.xy
|
||||
|
|
@ -380,6 +384,7 @@ function M:onTouchMove(context)
|
|||
local card = button.data
|
||||
local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
button.xy = xy - card.touch_pos
|
||||
print("lingmeng", xy.x, xy.y)
|
||||
end
|
||||
|
||||
--出牌提示动画
|
||||
|
|
@ -461,7 +466,7 @@ function M:UpdateHandCardsPos()
|
|||
card_view.btn_card:RemoveFromParent()
|
||||
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||
card_view.old_postion = self:GetHandCardPos(card_view, #CountCards)
|
||||
card_view.btn_card:TweenMove(card_view.old_postion, 0.3)
|
||||
card_view.btn_card:TweenMove(card_view.old_postion, 0.2)
|
||||
end
|
||||
self:ShowHuTip()
|
||||
end
|
||||
|
|
@ -477,13 +482,17 @@ function M:UpdateCardDisplay()
|
|||
local card_view = self.card_list[i]
|
||||
card_view.btn_card:RemoveFromParent()
|
||||
card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item)
|
||||
self.card_width = card_view.btn_card.width * self:getCardSize()
|
||||
self.card_hight = card_view.btn_card.height * self:getCardSize()
|
||||
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||
card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||
-- card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||
end
|
||||
self:UpdateHandCardsPos()
|
||||
end
|
||||
|
||||
--更新手牌大小
|
||||
function M:UpdateCardSize()
|
||||
print("lingmeng UpdateCardSize")
|
||||
local CountCards = {}
|
||||
for i = 1, #self.card_list do
|
||||
CountCards[self.card_list[i].index_X] =
|
||||
|
|
@ -495,11 +504,12 @@ function M:UpdateCardSize()
|
|||
card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item)
|
||||
card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize())
|
||||
self.card_width = 87 * self:getCardSize()
|
||||
self.card_hight = 110 * self:getCardSize()
|
||||
self.card_width = card_view.btn_card.width * self:getCardSize()
|
||||
self.card_hight = card_view.btn_card.height * self:getCardSize()
|
||||
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||
card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||
-- card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||
end
|
||||
self:UpdateHandCardsPos()
|
||||
end
|
||||
|
||||
function M:UpdateIsOnClick(isOut)
|
||||
|
|
@ -509,6 +519,7 @@ end
|
|||
-- 结束 拖拽事件
|
||||
-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较
|
||||
function M:__OnDragEnd(context)
|
||||
print("lingmeng buyaojina __OnDragEnd")
|
||||
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||
return
|
||||
end
|
||||
|
|
@ -764,13 +775,15 @@ function M:GetHandCardPos(cards_view, cards)
|
|||
local start_x = middle_x - (cards / 2 * (card_width))
|
||||
x = start_x + (card_width) * (cards_view.index_X - 1)
|
||||
|
||||
if self:getCardSize() == 1 then
|
||||
y = 90 - (85 * cards_view.index_Y)
|
||||
elseif self:getCardSize() == 1.2 then
|
||||
y = 90 - (110 * cards_view.index_Y)
|
||||
elseif self:getCardSize() == 0.8 then
|
||||
y = 100 - (65 * cards_view.index_Y)
|
||||
end
|
||||
local card_height = self.card_hight
|
||||
y = 90 - card_height * 0.66 * cards_view.index_Y
|
||||
-- if self:getCardSize() == 1.4 then
|
||||
-- y = 90 - (85 * cards_view.index_Y)
|
||||
-- elseif self:getCardSize() == 1.2 then
|
||||
-- y = 90 - (110 * cards_view.index_Y)
|
||||
-- elseif self:getCardSize() == 0.8 then
|
||||
-- y = 100 - (65 * cards_view.index_Y)
|
||||
-- end
|
||||
return Vector2.New(x, y)
|
||||
end
|
||||
|
||||
|
|
@ -858,7 +871,7 @@ end
|
|||
|
||||
--出牌
|
||||
function M:UpdateOutCardList(outcard)
|
||||
printlog("UpdateOutCardListss"..outcard)
|
||||
printlog("UpdateOutCardListss" .. outcard)
|
||||
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||
local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard')
|
||||
if outcard == 0 then
|
||||
|
|
@ -910,7 +923,7 @@ function M:getCardSize()
|
|||
if self._room.change_card_size ~= nil then
|
||||
return self._room.change_card_size
|
||||
else
|
||||
return 1
|
||||
return 1.2
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ local ZPSettingView = {
|
|||
}
|
||||
local M = ZPSettingView
|
||||
|
||||
function ZPSettingView.new(blur_view, index, open_social,cardIndex)
|
||||
setmetatable(SettingView, {__index = BaseWindow})
|
||||
setmetatable(M, {__index = SettingView})
|
||||
local self = setmetatable({}, {__index = M})
|
||||
function ZPSettingView.new(blur_view, index, open_social, cardIndex)
|
||||
setmetatable(SettingView, { __index = BaseWindow })
|
||||
setmetatable(M, { __index = SettingView })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'ZPSettingView'
|
||||
self._currenIndex = 0
|
||||
self._blur_view = blur_view
|
||||
|
|
@ -27,13 +27,13 @@ function ZPSettingView.new(blur_view, index, open_social,cardIndex)
|
|||
self.cd_time = 0
|
||||
self._btn_dismiss_room_enable = false
|
||||
self._close_destroy = true
|
||||
self.bigSize = 1.2
|
||||
self.mediumSize = 1
|
||||
self.smallSize = 0.8
|
||||
self.bigSize = 1.4
|
||||
self.mediumSize = 1.2
|
||||
self.smallSize = 1.2
|
||||
self._full = true
|
||||
self._anim_pop = 2
|
||||
self._open_social = open_social
|
||||
self._cardType=cardIndex
|
||||
self._cardType = cardIndex
|
||||
self:init('ui://Main_RunBeard/New_SettingWindow')
|
||||
return self
|
||||
end
|
||||
|
|
@ -72,13 +72,12 @@ function M:init(url)
|
|||
|
||||
local room = DataManager.CurrenRoom
|
||||
local c1 = self._view:GetController('cards')
|
||||
if self._cardType then
|
||||
c1.selectedIndex = self._cardType
|
||||
end
|
||||
|
||||
if self._cardType then
|
||||
c1.selectedIndex = self._cardType
|
||||
end
|
||||
|
||||
local size = self._view:GetController('size')
|
||||
if room.change_card_size ~= nil then
|
||||
|
||||
if room.change_card_size == self.bigSize then
|
||||
size.selectedIndex = 0
|
||||
elseif room.change_card_size == self.mediumSize then
|
||||
|
|
@ -235,6 +234,7 @@ function M:Show()
|
|||
self:UpdateIndex()
|
||||
self:UpdateCardSizeIndex()
|
||||
end
|
||||
|
||||
--根据存的数据改变设置里面的控制器
|
||||
|
||||
function M:UpdateIndex()
|
||||
|
|
@ -257,6 +257,7 @@ function M:UpdateIndex()
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M:UpdateCardSizeIndex()
|
||||
local room = DataManager.CurrenRoom
|
||||
local size = self._view:GetController('size')
|
||||
|
|
@ -321,6 +322,7 @@ function M:FillBgSection(cb, game_id, default_bg, room, qihu)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M:Destroy()
|
||||
local bg_id = self._view:GetController('bg').selectedIndex + 1
|
||||
if self._bg ~= bg_id then
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"objectStatus": {
|
||||
"n50_mk2u": {
|
||||
"collapsed": true
|
||||
},
|
||||
"n46_mk2u": {
|
||||
"hidden": true
|
||||
},
|
||||
"n60_mk2u": {
|
||||
"hidden": true
|
||||
},
|
||||
"n45_mk2u": {
|
||||
"hidden": true
|
||||
},
|
||||
"n65_mk2u": {
|
||||
"hidden": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"libview.firstColumnWidth": 297,
|
||||
"libview.firstColumnWidth": 522,
|
||||
"expanded_nodes": [
|
||||
"27vd145b",
|
||||
"/",
|
||||
|
|
@ -8,42 +8,36 @@
|
|||
],
|
||||
"libview.iconScale": 0,
|
||||
"doc.openedDocs": [
|
||||
"ui://2d9xdj6zfn7fao",
|
||||
"ui://m7iejg4610snh5j",
|
||||
"ui://m7iejg46kwi0hk0",
|
||||
"ui://v0j9abjygq7m8f",
|
||||
"ui://m7iejg46giw8hf7",
|
||||
"ui://m7iejg46jiu8hef",
|
||||
"ui://m7iejg46kwi0hma",
|
||||
"ui://v6yvqp7wf55qwa",
|
||||
"ui://v6yvqp7wf55qw5",
|
||||
"ui://v6yvqp7wf55qvx",
|
||||
"ui://m7iejg46kwi0hm5",
|
||||
"ui://v6yvqp7wf55qw4",
|
||||
"ui://2d9xdj6zm16m7dqt",
|
||||
"ui://ppu1wv76j4mf9j",
|
||||
"ui://ppu1wv76j4mf9k",
|
||||
"ui://ppu1wv7699wej",
|
||||
"ui://ppu1wv76j4mf9d",
|
||||
"ui://ppu1wv76j4mf9e",
|
||||
"ui://2d9xdj6zoviicm0"
|
||||
"ui://v6yvqp7wyfzf1h4",
|
||||
"ui://v6yvqp7wcyprwq",
|
||||
"ui://v6yvqp7wlvh412c"
|
||||
],
|
||||
"test.device": "720p Phone",
|
||||
"canvasColor": 10066329,
|
||||
"auxline2": true,
|
||||
"doc.activeDoc": "ui://v0j9abjygq7m8f",
|
||||
"doc.activeDoc": "ui://v6yvqp7wcyprwq",
|
||||
"libview.twoColumn": false,
|
||||
"libview.expandedNodes": [
|
||||
"v0j9abjy",
|
||||
"/",
|
||||
"v0j9abjy",
|
||||
"/Main_style_2/",
|
||||
"v6yvqp7w",
|
||||
"/",
|
||||
"v6yvqp7w",
|
||||
"/component/",
|
||||
"v6yvqp7w",
|
||||
"/image/"
|
||||
"/component/cards/",
|
||||
"v6yvqp7w",
|
||||
"/component/option/",
|
||||
"v6yvqp7w",
|
||||
"/component/option/component/",
|
||||
"v6yvqp7w",
|
||||
"/component/option/component/card/",
|
||||
"v6yvqp7w",
|
||||
"/image/",
|
||||
"v6yvqp7w",
|
||||
"/images/",
|
||||
"v6yvqp7w",
|
||||
"/images/cards6/",
|
||||
"v6yvqp7w",
|
||||
"/images/cards8/"
|
||||
],
|
||||
"auxline1": true,
|
||||
"snapToGrid": true,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="88,110" extention="Button">
|
||||
<component size="97,287" extention="Button">
|
||||
<controller name="button" pages="0,up,1,down" selected="0"/>
|
||||
<controller name="Kan" pages="0,,1," selected="0"/>
|
||||
<controller name="mark_ting" pages="0,,1," selected="0"/>
|
||||
<controller name="touch" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n4_lsou" name="icon" xy="0,0" size="88,110" autoSize="true"/>
|
||||
<image id="n6_g098" name="n6" src="cyprwr" xy="0,0" size="88,110">
|
||||
<loader id="n4_lsou" name="icon" xy="0,0" size="97,287" url="ui://v6yvqp7wlvh410b" autoSize="true" clearOnPublish="true"/>
|
||||
<image id="n6_g098" name="n6" src="cyprwr" fileName="component/cards/images/00(1).png" xy="0,0" size="97,287">
|
||||
<gearDisplay controller="Kan" pages="1"/>
|
||||
<relation target="n4_lsou" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<image id="n7_cypr" name="n7" src="cyprws" xy="60,0">
|
||||
<image id="n7_cypr" name="n7" src="cyprws" fileName="component/cards/images/tips.png" xy="59,0" size="37,79">
|
||||
<gearDisplay controller="mark_ting" pages="1"/>
|
||||
<relation target="" sidePair="width-width%,height-height%,right-right,top-top"/>
|
||||
</image>
|
||||
</displayList>
|
||||
<Button/>
|
||||
<relation target="n4_lsou" sidePair="rightext-right,bottomext-bottom"/>
|
||||
</component>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="83,106" extention="Button">
|
||||
<controller name="button" pages="0,up,1,down" selected="0"/>
|
||||
<controller name="Kan" pages="0,,1," selected="1"/>
|
||||
<controller name="Kan" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n3_hp0b" name="icon" xy="-3,2" size="86,104" url="ui://v6yvqp7wlr5dg" autoSize="true">
|
||||
<gearXY controller="button" pages="1" values="-3,-22" default="-3,2" tween="true"/>
|
||||
|
|
|
|||
|
|
@ -32,41 +32,41 @@
|
|||
<component id="n38_mk2u" name="slider_sound" src="mk2u138" fileName="component/Main/setting/component/Slider1.xml" xy="307,139" size="347,45" group="n41_mk2u">
|
||||
<Slider value="50" max="100"/>
|
||||
</component>
|
||||
<text id="n39_mk2u" name="n39" xy="140,212" size="149,47" group="n41_mk2u" fontSize="34" color="#5c3c16" text="背景音乐:"/>
|
||||
<text id="n40_mk2u" name="n40" xy="140,143" size="149,47" group="n41_mk2u" fontSize="34" color="#5c3c16" text="游戏音效:"/>
|
||||
<text id="n39_mk2u" name="n39" xy="140,212" size="149,46" group="n41_mk2u" fontSize="34" color="#5c3c16" text="背景音乐:"/>
|
||||
<text id="n40_mk2u" name="n40" xy="140,143" size="149,46" group="n41_mk2u" fontSize="34" color="#5c3c16" text="游戏音效:"/>
|
||||
<component id="n84_fgao" name="slider_music" src="mk2u138" fileName="component/Main/setting/component/Slider1.xml" xy="307,210" size="347,45" group="n41_mk2u">
|
||||
<Slider value="50" max="100"/>
|
||||
</component>
|
||||
<group id="n41_mk2u" name="n41" xy="140,139" size="514,116" group="n58_mk2u" advanced="true"/>
|
||||
<image id="n44_mk2u" name="n44" src="mk2u13b" fileName="component/Main/setting/images/setting/zipai_font_01.png" xy="136,467" size="72,90" group="n50_mk2u"/>
|
||||
<image id="n45_mk2u" name="n45" src="mk2u13c" fileName="component/Main/setting/images/setting/zipai_font_02.png" xy="338,466" size="72,91" group="n50_mk2u"/>
|
||||
<image id="n46_mk2u" name="n46" src="mk2u13d" fileName="component/Main/setting/images/setting/zipai_font_03.png" xy="140,586" size="71,89" group="n50_mk2u" visible="false"/>
|
||||
<image id="n47_mk2u" name="n47" src="mk2u13e" fileName="component/Main/setting/images/setting/zipai_font_04.png" xy="543,469" size="68,88" group="n50_mk2u"/>
|
||||
<component id="n59_mk2u" name="n59" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="214,490" size="123,47" group="n50_mk2u">
|
||||
<image id="n44_mk2u" name="n44" src="mk2u13b" fileName="component/Main/setting/images/setting/zipai_font_01.png" xy="184,468" size="72,90" group="n50_mk2u"/>
|
||||
<image id="n45_mk2u" name="n45" src="mk2u13c" fileName="component/Main/setting/images/setting/zipai_font_02.png" xy="432,467" size="72,91" group="n50_mk2u" visible="false"/>
|
||||
<image id="n46_mk2u" name="n46" src="mk2u13d" fileName="component/Main/setting/images/setting/zipai_font_03.png" xy="234,587" size="71,89" group="n50_mk2u" visible="false"/>
|
||||
<image id="n47_mk2u" name="n47" src="mk2u13e" fileName="component/Main/setting/images/setting/zipai_font_04.png" xy="417,470" size="68,88" group="n50_mk2u"/>
|
||||
<component id="n59_mk2u" name="n59" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="262,491" size="123,47" group="n50_mk2u">
|
||||
<Button checked="true" controller="cards" page="0"/>
|
||||
</component>
|
||||
<component id="n60_mk2u" name="n60" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="423,490" size="71,47" group="n50_mk2u">
|
||||
<component id="n60_mk2u" name="n60" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="517,491" size="71,47" group="n50_mk2u" visible="false">
|
||||
<Button controller="cards" page="1"/>
|
||||
</component>
|
||||
<component id="n61_mk2u" name="n61" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="218,609" size="69,47" group="n50_mk2u" visible="false">
|
||||
<component id="n61_mk2u" name="n61" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="312,610" size="69,47" group="n50_mk2u" visible="false">
|
||||
<Button controller="cards" page="2"/>
|
||||
</component>
|
||||
<component id="n62_mk2u" name="n62" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="613,489" size="123,47" group="n50_mk2u">
|
||||
<component id="n62_mk2u" name="n62" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="487,490" size="123,47" group="n50_mk2u">
|
||||
<Button controller="cards" page="3"/>
|
||||
</component>
|
||||
<group id="n50_mk2u" name="n50" xy="136,466" size="600,209" group="n58_mk2u" advanced="true">
|
||||
<group id="n50_mk2u" name="n50" xy="184,467" size="426,209" group="n58_mk2u" advanced="true">
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</group>
|
||||
<component id="n66_mk2u" name="n66" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="229,615" size="123,47" group="n54_mk2u">
|
||||
<component id="n66_mk2u" name="n66" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="262,615" size="123,47" group="n54_mk2u">
|
||||
<Button checked="true" title="大" titleColor="#5c3c16" titleFontSize="34" controller="size" page="0"/>
|
||||
</component>
|
||||
<component id="n64_mk2u" name="n64" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="365,615" size="123,47" group="n54_mk2u">
|
||||
<component id="n64_mk2u" name="n64" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="488,615" size="123,47" group="n54_mk2u">
|
||||
<Button title="中" titleColor="#5c3c16" titleFontSize="34" controller="size" page="1"/>
|
||||
</component>
|
||||
<component id="n65_mk2u" name="n65" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="500,615" size="123,47" group="n54_mk2u">
|
||||
<component id="n65_mk2u" name="n65" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="533,615" size="123,47" group="n54_mk2u" visible="false">
|
||||
<Button title="小" titleColor="#5c3c16" titleFontSize="35" controller="size" page="2"/>
|
||||
</component>
|
||||
<group id="n54_mk2u" name="n54" xy="229,615" size="394,47" group="n58_mk2u" advanced="true">
|
||||
<group id="n54_mk2u" name="n54" xy="262,615" size="394,47" group="n58_mk2u" advanced="true">
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</group>
|
||||
<component id="n67_mk2u" name="n67" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="234,1041" size="214,57" group="n57_mk2u">
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<component id="n74_ra9v" name="n74" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="554,1178" size="123,47" group="n76_ra9v">
|
||||
<Button title="是" titleColor="#624720" titleFontSize="34" controller="yuyin" page="1"/>
|
||||
</component>
|
||||
<text id="n75_ra9v" name="n75" xy="169,1178" size="208,47" group="n76_ra9v" fontSize="34" color="#5c3c16" text="禁止接收语音"/>
|
||||
<text id="n75_ra9v" name="n75" xy="169,1178" size="208,46" group="n76_ra9v" fontSize="34" color="#5c3c16" text="禁止接收语音"/>
|
||||
<group id="n76_ra9v" name="n76" xy="169,1178" size="508,47" group="n78_ra9v"/>
|
||||
<component id="n70_ra9v" name="n70" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="432,1112" size="123,47" group="n77_ra9v">
|
||||
<Button checked="true" title="否" titleColor="#5c3c16" titleFontSize="34" controller="chupai" page="0"/>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<component id="n71_ra9v" name="n71" src="mk2u148" fileName="component/setting/component/setting/Btn_cr_checkbox.xml" xy="554,1112" size="123,47" group="n77_ra9v">
|
||||
<Button title="是" titleColor="#5c3c16" titleFontSize="34" controller="chupai" page="1"/>
|
||||
</component>
|
||||
<text id="n72_ra9v" name="n72" xy="169,1116" size="208,47" group="n77_ra9v" fontSize="34" color="#5c3c16" text="开启快速吃牌"/>
|
||||
<text id="n72_ra9v" name="n72" xy="169,1116" size="208,46" group="n77_ra9v" fontSize="34" color="#5c3c16" text="开启快速吃牌"/>
|
||||
<group id="n77_ra9v" name="n77" xy="169,1112" size="508,47" group="n78_ra9v"/>
|
||||
<group id="n78_ra9v" name="n78" xy="169,1112" size="508,113" group="n58_mk2u" advanced="true">
|
||||
<relation target="" sidePair="center-center"/>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -878,6 +878,46 @@
|
|||
<image id="hwlt1hr" name="1_05.png" path="/component/Main/images/"/>
|
||||
<component id="hwlt1hs" name="btn_backdetail.xml" path="/component/option/" exported="true"/>
|
||||
<component id="hwlt1ht" name="hideback.xml" path="/component/option/"/>
|
||||
<image id="daaw1hu" name="204_6_101.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1hv" name="204_6_208.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1hw" name="204_6_207.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1hx" name="204_6_206.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1hy" name="204_6_205.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1hz" name="204_6_204.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i0" name="204_6_203.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i1" name="204_6_202.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i2" name="204_6_201.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i3" name="204_6_110.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i4" name="204_6_109.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i5" name="204_6_108.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i6" name="204_6_107.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i7" name="204_6_106.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i8" name="204_6_105.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1i9" name="204_6_104.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1ia" name="204_6_103.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1ib" name="204_6_102.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1ic" name="204_6_209.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1id" name="204_6_210.png" path="/images/cards6/" exported="true"/>
|
||||
<image id="daaw1ie" name="203_8_201(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1if" name="204_8_208.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ig" name="204_8_207.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ih" name="204_8_206.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ii" name="204_8_205.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ij" name="204_8_204.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ik" name="204_8_203.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1il" name="204_8_202.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1im" name="204_8_201.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1in" name="204_8_110.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1io" name="203_8_209(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1ip" name="203_8_208(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1iq" name="203_8_207(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1ir" name="203_8_206(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1is" name="203_8_205(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1it" name="203_8_204(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1iu" name="203_8_203(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1iv" name="203_8_202(1).png" path="/images/cards8/"/>
|
||||
<image id="daaw1iw" name="204_8_209.png" path="/images/cards8/" exported="true"/>
|
||||
<image id="daaw1ix" name="204_8_210.png" path="/images/cards8/" exported="true"/>
|
||||
</resources>
|
||||
<publish name="Main_RunBeard" path="..\wb_unity_pro\Assets\ART\base\main_zipai\ui" packageCount="2"/>
|
||||
</packageDescription>
|
||||