Merge branch 'master' of http://121.41.95.54:3000/aga/yunque_client2
|
|
@ -467,7 +467,6 @@ function M:InitClip()
|
||||||
local hechengName = "ui://Lobby/hecheng 1_00"
|
local hechengName = "ui://Lobby/hecheng 1_00"
|
||||||
local hecheng = self._view:GetChild('btn_joinroom')
|
local hecheng = self._view:GetChild('btn_joinroom')
|
||||||
local hechengIndex = 0
|
local hechengIndex = 0
|
||||||
print("lingmengInitClip", taohua, renwu)
|
|
||||||
coroutine.start(
|
coroutine.start(
|
||||||
function()
|
function()
|
||||||
while true do
|
while true do
|
||||||
|
|
|
||||||
|
|
@ -808,18 +808,18 @@ function M:OnPlayerReady(...)
|
||||||
if p.isSendCardState~=nil and p.isSendCardState==true then
|
if p.isSendCardState~=nil and p.isSendCardState==true then
|
||||||
p.isSendCardState=false
|
p.isSendCardState=false
|
||||||
ControllerManager.IsSendCard=false
|
ControllerManager.IsSendCard=false
|
||||||
--print("进入设置计时器控制==========")
|
print("进入设置计时器控制==========")
|
||||||
coroutine.start(function()
|
coroutine.start(function()
|
||||||
--print("计时器倒计时5s=============")
|
print("计时器倒计时5s=============")
|
||||||
coroutine.wait(5)
|
coroutine.wait(5)
|
||||||
--print("当前状态==============")
|
print("当前状态==============")
|
||||||
--print(ControllerManager.IsSendCard)
|
print(ControllerManager.IsSendCard)
|
||||||
if ControllerManager.IsSendCard==true then
|
if ControllerManager.IsSendCard==true then
|
||||||
--print("以发送开牌======================")
|
print("以发送开牌======================")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
--print("开始断线重连")
|
print("开始断线重连")
|
||||||
--ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
|
ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
|
||||||
ViewManager.refreshGameView()
|
ViewManager.refreshGameView()
|
||||||
end
|
end
|
||||||
ControllerManager.IsSendCard=false
|
ControllerManager.IsSendCard=false
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,6 @@ function ViewManager.refreshGameView()
|
||||||
|
|
||||||
if DataManager.CurrenRoom then
|
if DataManager.CurrenRoom then
|
||||||
ControllerManager.reset_join_room = 0
|
ControllerManager.reset_join_room = 0
|
||||||
|
|
||||||
ControllerManager.ResetJionRoom()
|
ControllerManager.ResetJionRoom()
|
||||||
else
|
else
|
||||||
NetResetConnectWindow.CloseNetReset()
|
NetResetConnectWindow.CloseNetReset()
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ function M:init(name)
|
||||||
|
|
||||||
self._eventmap[RB_Protocol.GAME_EVT_DANIAO_TIP] = self.OnEventDaNiaoTip
|
self._eventmap[RB_Protocol.GAME_EVT_DANIAO_TIP] = self.OnEventDaNiaoTip
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_DANIAO] = self.OnEventDaNiao
|
||||||
|
|
||||||
self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
|
self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
|
||||||
self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
|
self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
|
||||||
|
|
||||||
|
|
@ -51,17 +53,43 @@ function M:SendXiPaiAction(callBack)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:OnEventDaNiaoTip(evt_data)
|
function M:OnEventDaNiaoTip(evt_data)
|
||||||
|
|
||||||
printlog("OnEventDaNiaoTip")
|
|
||||||
if ViewManager.GetCurrenView().dview_class == LobbyView then
|
if ViewManager.GetCurrenView().dview_class == LobbyView then
|
||||||
self:ReturnToRoom()
|
self:ReturnToRoom()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local piao = 1 -- evt_data["piao"]
|
local niao = evt_data["niao"]
|
||||||
|
local reload = evt_data["reload"]
|
||||||
|
|
||||||
self._cacheEvent:Enqueue(
|
self._cacheEvent:Enqueue(
|
||||||
function()
|
function()
|
||||||
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnDaNiaoTips, piao)
|
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnDaNiaoTips, niao,reload)
|
||||||
|
ControllerManager.IsSendCard=true
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:SendNiao(niao,callBack)
|
||||||
|
local _data = {}
|
||||||
|
_data["niaoflag"] = niao
|
||||||
|
printlog("niao flag" , niao)
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
_client:send(RB_Protocol.GAME_EVT_SEND_NIAO, _data)
|
||||||
|
self.NiaoTipsCallBack=callBack
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventDaNiao(evt_data)
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local niao = evt_data["niao"]
|
||||||
|
if seat==DataManager.CurrenRoom.self_player.seat then
|
||||||
|
if self.NiaoTipsCallBack then
|
||||||
|
self.NiaoTipsCallBack()
|
||||||
|
self.NiaoTipsCallBack=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._cacheEvent:Enqueue(
|
||||||
|
function()
|
||||||
|
DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnEventDaNiao, seat,niao)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ function M.new()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:getCardItem(card_1, card_2)
|
function M:getCardItem(card_1, card_2)
|
||||||
|
printlog("jefe getCardItem")
|
||||||
if self._room.change_card_display ~= nil then
|
if self._room.change_card_display ~= nil then
|
||||||
return card_1 .. self._room.change_card_display .. card_2
|
return card_1 .. self._room.change_card_display .. card_2
|
||||||
else
|
else
|
||||||
|
|
@ -177,40 +178,57 @@ function M:EventInit()
|
||||||
_gamectr:AddEventListener(GameEvent.OnDaNiaoTips, function(...)
|
_gamectr:AddEventListener(GameEvent.OnDaNiaoTips, function(...)
|
||||||
local arg = {...}
|
local arg = {...}
|
||||||
local niao = arg[1]
|
local niao = arg[1]
|
||||||
printlog("main daniao tips")
|
local reload = arg[2]
|
||||||
--[[
|
if reload==0 then
|
||||||
local otherpoker_list = self._view:GetChild("otherpoker_list")
|
self._leftcard = 1
|
||||||
|
self._leftcard = 1
|
||||||
|
local rightpanel = self._view:GetChild('right_panel')
|
||||||
|
local tex_round = rightpanel:GetChild('tex_round')
|
||||||
|
if tex_round ~= nil then
|
||||||
|
tex_round.text = '第 ' .. _room.curren_round .. ' 局'
|
||||||
|
end
|
||||||
|
self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局'
|
||||||
|
|
||||||
if otherpoker_list ~= nil then
|
self._state.selectedIndex = 1
|
||||||
-- body
|
self:closeTipOnTuoguan()
|
||||||
otherpoker_list.visible=false
|
local list = _room.player_list
|
||||||
otherpoker_list:RemoveChildrenToPool()
|
for i = 1, #list do
|
||||||
end
|
local p = list[i]
|
||||||
self.ctr_state.selectedIndex = 1
|
p.hu_xi = 0
|
||||||
self.ctr_card_eff.selectedIndex = 0
|
local _info = self._player_card_info[self:GetPos(p.seat)]
|
||||||
if self.rank_view ~= nil then
|
_info:SetPlayer(p)
|
||||||
self.rank_view:Dispose()
|
local info = self._player_info[self:GetPos(p.seat)]
|
||||||
self.rank_view = nil
|
info:FillData(p)
|
||||||
end
|
info:MarkBank(p.seat == _room.banker_seat)
|
||||||
self:UpdateRound(self._room.curren_round)
|
info:Ready(false)
|
||||||
|
--info:UpdatePiao(-1)
|
||||||
local list = _room.player_list
|
info._view:GetController('huxi').selectedIndex = 1
|
||||||
for i = 1, #list do
|
info._view:GetChild('huxi').text = p.hu_xi
|
||||||
local p = list[i]
|
info._view:GetController('zhanji').selectedIndex = 0
|
||||||
local head_info = self._player_info[self:GetPos(p.seat)]
|
|
||||||
|
|
||||||
p:Clear()
|
|
||||||
head_info:FillData(p)
|
|
||||||
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
|
||||||
card_info:Clear()
|
|
||||||
head_info:Ready(false)
|
|
||||||
head_info:UpdatePiao(-1)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
if _room.hpOnOff == 1 or _room:checkHpNonnegative() then
|
||||||
|
if p.total_hp == nil then
|
||||||
|
p.total_hp = 0
|
||||||
|
end
|
||||||
|
info._view:GetController('zhanji').selectedIndex = 1
|
||||||
|
info._view:GetChild('tex_jifen').text = d2ad(p.total_hp)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
self._player_card_info[1]:ShwoDaNiao(niao)
|
self._player_card_info[1]:ShwoDaNiao(niao)
|
||||||
]]
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
_gamectr:AddEventListener(GameEvent.OnEventDaNiao, function(...)
|
||||||
|
local arg = {...}
|
||||||
|
local seat = arg[1]
|
||||||
|
local niao = arg[2]
|
||||||
|
--local head_info = self._player_info[self:GetPos(seat)]
|
||||||
|
--head_info:UpdatePiao(piao)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
_gamectr:AddEventListener(
|
_gamectr:AddEventListener(
|
||||||
GameEvent.SendCards,
|
GameEvent.SendCards,
|
||||||
function(...)
|
function(...)
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ function M:Init()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ local FanPaoFa_GameEvent = {
|
||||||
FangWei = "FangWei",
|
FangWei = "FangWei",
|
||||||
|
|
||||||
OnDaNiaoTips = "OnDaNiaoTips",
|
OnDaNiaoTips = "OnDaNiaoTips",
|
||||||
|
OnEventDaNiao = "OnEventDaNiao",
|
||||||
|
|
||||||
}
|
}
|
||||||
return FanPaoFa_GameEvent
|
return FanPaoFa_GameEvent
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@ local Protocol = {
|
||||||
GAME_EVT_FANGPAO = "823",
|
GAME_EVT_FANGPAO = "823",
|
||||||
|
|
||||||
--鸟
|
--鸟
|
||||||
GAME_EVT_NIAO = "831",
|
GAME_EVT_SEND_NIAO = "831",
|
||||||
|
|
||||||
|
|
||||||
--打鸟提示
|
--打鸟提示
|
||||||
GAME_EVT_DANIAO_TIP = "832",
|
GAME_EVT_DANIAO_TIP = "832",
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ function M:InitUI(card_code, type)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:GetCardItem(card_1, card_2)
|
function M:GetCardItem(card_1, card_2)
|
||||||
|
printlog("jefe get card_item")
|
||||||
local room = DataManager.CurrenRoom
|
local room = DataManager.CurrenRoom
|
||||||
if room.change_card_display ~= nil then
|
if room.change_card_display ~= nil then
|
||||||
return card_1 .. room.change_card_display .. card_2
|
return card_1 .. room.change_card_display .. card_2
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,13 @@ function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
||||||
|
|
||||||
local _gamectr = self._gamectr
|
local _gamectr = self._gamectr
|
||||||
_gamectr:SendChangeTypeFace(typeface)
|
_gamectr:SendChangeTypeFace(typeface)
|
||||||
|
|
||||||
|
printlog("jefe InitView "..typeface)
|
||||||
if typeface == 1 then
|
if typeface == 1 then
|
||||||
if isdisplay then
|
if isdisplay then
|
||||||
self._room.change_card_display = '7_'
|
self._room.change_card_display = '6_'
|
||||||
else
|
else
|
||||||
self._room.change_card_display = '2_'
|
self._room.change_card_display = '6_'
|
||||||
end
|
end
|
||||||
elseif typeface == 2 then
|
elseif typeface == 2 then
|
||||||
self._room.change_card_display = '1_'
|
self._room.change_card_display = '1_'
|
||||||
|
|
@ -272,7 +274,7 @@ function M:UpdateCardDisplay(index)
|
||||||
local _gamectr = self._gamectr
|
local _gamectr = self._gamectr
|
||||||
_gamectr:SendChangeTypeFace(index)
|
_gamectr:SendChangeTypeFace(index)
|
||||||
if index == 1 then
|
if index == 1 then
|
||||||
self._room.change_card_display = '2_'
|
self._room.change_card_display = '6_'
|
||||||
elseif index == 2 then
|
elseif index == 2 then
|
||||||
self._room.change_card_display = '1_'
|
self._room.change_card_display = '1_'
|
||||||
elseif index == 3 then
|
elseif index == 3 then
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
function M:UpdateHandCards( list )
|
function M:UpdateHandCards( list )
|
||||||
|
|
||||||
self.card_lists = {}
|
self.card_lists = {}
|
||||||
self._area_handcard_list:RemoveChildren(0,-1,true)
|
self._area_handcard_list:RemoveChildren(0,-1,true)
|
||||||
local CountCards = {}
|
local CountCards = {}
|
||||||
|
|
|
||||||
|
|
@ -68,14 +68,14 @@ function M:init()
|
||||||
self.ctr_piao = self._view:GetController('piao')
|
self.ctr_piao = self._view:GetController('piao')
|
||||||
self.ctr_niao = self._view:GetController('niao')
|
self.ctr_niao = self._view:GetController('niao')
|
||||||
self.ctr_piao_value = self._view:GetController('piaovalue')
|
self.ctr_piao_value = self._view:GetController('piaovalue')
|
||||||
printlog("zp init32")
|
|
||||||
self:BtnEvent()
|
self:BtnEvent()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M:ShwoDaNiao(niao)
|
function M:ShwoDaNiao(niao)
|
||||||
printlog("main daniao ShwoDaNiao")
|
printlog("main daniao ShwoDaNiao",self.ctr_niao)
|
||||||
self.ctr_niao.selectedIndex = niao
|
self.ctr_niao.selectedIndex = 1
|
||||||
|
printlog("main daniao ShwoDaNiao1")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:HideDaNiao()
|
function M:HideDaNiao()
|
||||||
|
|
@ -93,39 +93,30 @@ function M:HidePiao()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function M:BtnEvent()
|
function M:BtnEvent()
|
||||||
self.btn_tips = self._view:GetChild('btn_tips')
|
self.btn_tips = self._view:GetChild('btn_tips')
|
||||||
|
|
||||||
local function click_piao()
|
local function click_niao1(vaule)
|
||||||
local closePiaoTipsFunc=function ()
|
local closeNiaoTipsFunc=function ()
|
||||||
self.ctr_piao.selectedIndex = 0
|
self.ctr_niao.selectedIndex = 0
|
||||||
end
|
end
|
||||||
ControllerManager.GetController(GameController):SendPiao(tonumber(self.ctr_piao_value.selectedPage),closePiaoTipsFunc)
|
ControllerManager.GetController(GameController):SendNiao(1,closeNiaoTipsFunc)
|
||||||
end
|
end
|
||||||
self.PiaoList={}
|
|
||||||
local btn_piao0 = self._view:GetChild('piao0')
|
|
||||||
btn_piao0.onClick:Set(click_piao)
|
|
||||||
table.insert(self.PiaoList,btn_piao0)
|
|
||||||
|
|
||||||
local btn_piao1 = self._view:GetChild('piao1')
|
|
||||||
btn_piao1.onClick:Set(click_piao)
|
|
||||||
table.insert(self.PiaoList,btn_piao1)
|
|
||||||
|
|
||||||
local btn_piao2 = self._view:GetChild('piao2')
|
|
||||||
btn_piao2.onClick:Set(click_piao)
|
|
||||||
table.insert(self.PiaoList,btn_piao2)
|
|
||||||
|
|
||||||
local btn_piao3 = self._view:GetChild('piao3')
|
local function click_niao0(vaule)
|
||||||
btn_piao3.onClick:Set(click_piao)
|
local closeNiaoTipsFunc=function ()
|
||||||
table.insert(self.PiaoList,btn_piao3)
|
self.ctr_niao.selectedIndex = 0
|
||||||
|
end
|
||||||
|
ControllerManager.GetController(GameController):SendNiao(0,closeNiaoTipsFunc)
|
||||||
|
end
|
||||||
|
|
||||||
|
local btn_budaniao = self._view:GetChild("budaniao")
|
||||||
|
btn_budaniao.onClick:Set(click_niao0)
|
||||||
|
|
||||||
local btn_piao5 = self._view:GetChild('piao5')
|
local btn_daniao = self._view:GetChild("daniao")
|
||||||
btn_piao5.onClick:Set(click_piao)
|
btn_daniao.onClick:Set(click_niao1)
|
||||||
table.insert(self.PiaoList,btn_piao5)
|
|
||||||
|
|
||||||
local btn_piao8 = self._view:GetChild('piao8')
|
|
||||||
btn_piao8.onClick:Set(click_piao)
|
|
||||||
table.insert(self.PiaoList,btn_piao8)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -357,6 +348,7 @@ function M:onTouchBegin(context)
|
||||||
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)
|
self:ShowHuTip(card.card_item)
|
||||||
end
|
end
|
||||||
|
printlog("jefe onTouchBegin")
|
||||||
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/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))
|
local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||||
|
|
@ -873,10 +865,10 @@ end
|
||||||
--得到设置的牌字体
|
--得到设置的牌字体
|
||||||
function M:getCardItem(card_1, card_2)
|
function M:getCardItem(card_1, card_2)
|
||||||
if self._room.change_card_display ~= nil then
|
if self._room.change_card_display ~= nil then
|
||||||
--printlog("===========",self._room.change_card_display)
|
printlog("===========",self._room.change_card_display)
|
||||||
return card_1 .. self._room.change_card_display .. card_2
|
return card_1 .. self._room.change_card_display .. card_2
|
||||||
else
|
else
|
||||||
return card_1 .. '2_' .. card_2
|
return card_1 .. '6_' .. card_2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--得到设置的牌大小
|
--得到设置的牌大小
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ function M:UpdateIndex()
|
||||||
local _str = string.sub(room.change_card_display, 1, 1)
|
local _str = string.sub(room.change_card_display, 1, 1)
|
||||||
local n = tonumber(_str)
|
local n = tonumber(_str)
|
||||||
if n == 7 then
|
if n == 7 then
|
||||||
n = 2
|
n = 6
|
||||||
end
|
end
|
||||||
if n == 1 then
|
if n == 1 then
|
||||||
c1.selectedIndex = 1
|
c1.selectedIndex = 1
|
||||||
|
|
@ -254,7 +254,7 @@ function M:UpdateIndex()
|
||||||
elseif n == 8 then
|
elseif n == 8 then
|
||||||
c1.selectedIndex = 3
|
c1.selectedIndex = 3
|
||||||
else
|
else
|
||||||
c1.selectedIndex = 2
|
c1.selectedIndex = 6
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,565 @@
|
||||||
|
local RB_Protocol = import(".Protocol")
|
||||||
|
local FZTipList = import(".main.FZData")
|
||||||
|
local RB_GameEvent = import(".RunBeard_GameEvent")
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
--- Create a new HZ_GameController
|
||||||
|
function M.new()
|
||||||
|
setmetatable(M,{__index = GameController})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self:init("娄底放炮罚")
|
||||||
|
self.class = "RB_GameController"
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init(name)
|
||||||
|
GameController.init(self,name)
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard
|
||||||
|
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_Piao_Tip] = self.OnPiaoTip
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVT_Piao_Action] = self.OnPiaoAction
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
|
||||||
|
self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SendXiPaiAction(callBack)
|
||||||
|
local _data = {}
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
_client:send(RB_Protocol.GAME_XIPAI, _data)
|
||||||
|
self.XiPaiCallBack=callBack
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventXiPai(evt_data)
|
||||||
|
if evt_data["result"]==0 then
|
||||||
|
if self.XiPaiCallBack then
|
||||||
|
self.XiPaiCallBack()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(1000000,"申请洗牌失败")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:OnEventXiPaiAnim(evt_data)
|
||||||
|
printlog("洗牌动画===》》》》")
|
||||||
|
pt(evt_data)
|
||||||
|
local playeridList = evt_data["list"]
|
||||||
|
local my_isXiPai=false
|
||||||
|
local other_isXiPai=false
|
||||||
|
if playeridList and #playeridList>0 then
|
||||||
|
for i=1,#playeridList do
|
||||||
|
local p = self._room:GetPlayerById(playeridList[i])
|
||||||
|
if p== self._room.self_player then
|
||||||
|
my_isXiPai=true
|
||||||
|
else
|
||||||
|
other_isXiPai=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,my_isXiPai,other_isXiPai)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- 发送出牌指令到服务器
|
||||||
|
function M:SendOutCard(card)
|
||||||
|
local _data = {}
|
||||||
|
_data["card"] = card
|
||||||
|
local _room = self._room
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
if _client ~= nil then
|
||||||
|
_client:send(RB_Protocol.GAME_DIS_CARD, _data)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
--GAME_CHANGE_CARD GAME_DIS_CARD
|
||||||
|
function M:SendChangeCards( card_list )
|
||||||
|
local _data = {}
|
||||||
|
if card_list then
|
||||||
|
_data["card_list"] = card_list
|
||||||
|
else
|
||||||
|
_data["card_list"]={}
|
||||||
|
end
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
if _client ~= nil then
|
||||||
|
_client:send(RB_Protocol.GAME_CHANGE_CARD, _data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:SendChangeTypeFace(TypeFace)
|
||||||
|
-- body
|
||||||
|
local _data = {}
|
||||||
|
_data["typeface"] = TypeFace
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
if _client ~= nil then
|
||||||
|
_client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:ConformToNextGame( )
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
if _client ~= nil then
|
||||||
|
_client:send(RB_Protocol.GAME_EVT_CHUI)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 发送放子选择到服务器
|
||||||
|
function M:SendAction(id,num)
|
||||||
|
local _data = {}
|
||||||
|
_data["id"] = id
|
||||||
|
if num ~=nil then
|
||||||
|
_data["biid"] = num
|
||||||
|
end
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
if _client ~= nil then
|
||||||
|
_client:send(RB_Protocol.GAME_ACTION, _data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SendPiao(piao,callBack)
|
||||||
|
local _data = {}
|
||||||
|
_data["id"] = piao
|
||||||
|
local _client = ControllerManager.GameNetClinet
|
||||||
|
_client:send(RB_Protocol.GAME_EVT_Send_Piao, _data)
|
||||||
|
self.PiaoTipsCallBack=callBack
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:OnPiaoTip(evt_data)
|
||||||
|
if ViewManager.GetCurrenView().dview_class == LobbyView then
|
||||||
|
self:ReturnToRoom()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local piao = evt_data["piao"]
|
||||||
|
local reload = evt_data["reload"]
|
||||||
|
self._cacheEvent:Enqueue(
|
||||||
|
function()
|
||||||
|
DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoTips, piao,reload)
|
||||||
|
ControllerManager.IsSendCard=true
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnPiaoAction(evt_data)
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local piao = evt_data["piao"]
|
||||||
|
if seat==DataManager.CurrenRoom.self_player.seat then
|
||||||
|
if self.PiaoTipsCallBack then
|
||||||
|
self.PiaoTipsCallBack()
|
||||||
|
self.PiaoTipsCallBack=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._cacheEvent:Enqueue(
|
||||||
|
function()
|
||||||
|
DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoAction, seat,piao)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:OnEventSendCards(evt_data)
|
||||||
|
printlog("发牌事件===》》》")
|
||||||
|
pt(evt_data)
|
||||||
|
if ViewManager.GetCurrenView().dview_class == LobbyView then
|
||||||
|
self:ReturnToRoom()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local _room = self._room
|
||||||
|
_room.self_player.currentNotPutCardList={}
|
||||||
|
_room.curren_round = _room.curren_round + 1
|
||||||
|
if _room.curren_round > 0 then _room.playing = true end
|
||||||
|
|
||||||
|
local handcards = {}
|
||||||
|
if evt_data.card_list and #evt_data.card_list>0 then
|
||||||
|
handcards = evt_data["card_list"]
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(100000,"发牌数据异常")
|
||||||
|
end
|
||||||
|
|
||||||
|
local p = _room.self_player
|
||||||
|
local seat =nil
|
||||||
|
if evt_data.bank_seat then
|
||||||
|
seat = evt_data["bank_seat"]
|
||||||
|
else
|
||||||
|
ViewUtil.ErrorTip(100001,"发牌座位异常")
|
||||||
|
end
|
||||||
|
|
||||||
|
_room.banker_seat = seat
|
||||||
|
for i=1,#_room.player_list do
|
||||||
|
_room.self_player.handcard_list ={}
|
||||||
|
_room.self_player.card_list = {}
|
||||||
|
_room.player_list[i].hand_left_count = 20
|
||||||
|
_room.player_list[i].fz_list = {}
|
||||||
|
_room.player_list[i].card_list = {}
|
||||||
|
_room.player_list[i].outcard_list = {}
|
||||||
|
_room.player_list[i].hu_xi = 0
|
||||||
|
end
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
_room.self_player.handcard_list=handcards
|
||||||
|
self._room.self_player.hand_left_count = #handcards
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p)
|
||||||
|
--print("发牌结束=====打开标志")
|
||||||
|
ControllerManager.IsSendCard=true
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventOutCard(evt_data)
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local card = evt_data["card"]
|
||||||
|
local p = self._room:GetPlayerBySeat(seat)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
local _room = self._room
|
||||||
|
if(seat == _room.self_player.seat) then
|
||||||
|
list_remove(_room.self_player.handcard_list,card)
|
||||||
|
end
|
||||||
|
p.DiceCard = card
|
||||||
|
p.hand_left_count = p.hand_left_count -1
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventQIPAI(evt_data)
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local card = evt_data["card"]
|
||||||
|
local p = self._room:GetPlayerBySeat(seat)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
local _room = self._room
|
||||||
|
if(not p.outcard_list) then p.outcard_list = {} end
|
||||||
|
p.outcard_list[#p.outcard_list+1] = card
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventTakeCard(evt_data)
|
||||||
|
local _room = self._room
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local card = evt_data["card"]
|
||||||
|
local left_count = evt_data["left_count"]
|
||||||
|
local p = _room:GetPlayerBySeat(seat)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
if card ~=0 then
|
||||||
|
p.DiceCard = card
|
||||||
|
end
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnAddCard(evt_data)
|
||||||
|
local _room = self._room
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
local card = evt_data["card"]
|
||||||
|
local p = _room:GetPlayerBySeat(seat)
|
||||||
|
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
p.DiceCard = 0
|
||||||
|
p.hand_left_count = p.hand_left_count +1
|
||||||
|
if (seat == _room.self_player.seat) then
|
||||||
|
_room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card
|
||||||
|
end
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventOutHint(evt_data)
|
||||||
|
printlog("出牌提示事件===》》》")
|
||||||
|
pt(evt_data)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.OutHint)
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventTurn(evt_data)
|
||||||
|
local seat = evt_data["seat"]
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventFzTips(evt_data)
|
||||||
|
printlog("放子提示事件===》》》")
|
||||||
|
pt(evt_data)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
local tiplist = FZTipList.new()
|
||||||
|
local list = evt_data["tip_list"]
|
||||||
|
local uid = evt_data["uid"]
|
||||||
|
for i=1,#list do
|
||||||
|
local dtip = list[i]
|
||||||
|
local tip = {}
|
||||||
|
tip.id = dtip["id"]
|
||||||
|
tip.weight = dtip["weight"]
|
||||||
|
tip.card = dtip["card"]
|
||||||
|
tip.type = dtip["type"]
|
||||||
|
tip.bi_list = dtip["bi_list"]
|
||||||
|
if (dtip["opcard"]) then
|
||||||
|
local opcard = dtip["opcard"]
|
||||||
|
tip.OpCard = opcard
|
||||||
|
table.sort(tip.OpCard)
|
||||||
|
tip.OpCard[3] = tip.Card
|
||||||
|
end
|
||||||
|
tiplist:AddTip(tip)
|
||||||
|
|
||||||
|
end
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventFzAction(evt_data)
|
||||||
|
printlog("放子行为提示事件===》》》")
|
||||||
|
pt(evt_data)
|
||||||
|
local _room = self._room
|
||||||
|
_room.self_player.currentNotPutCardList=evt_data["notput"]
|
||||||
|
local playerid = evt_data["playerid"]
|
||||||
|
local card = evt_data["card"]
|
||||||
|
local actice_card = evt_data["active_card"]
|
||||||
|
local ftype = evt_data["type"]
|
||||||
|
local from_seat = evt_data["from_seat"]
|
||||||
|
local opcard = evt_data["opcard"]
|
||||||
|
local huxi = evt_data["hu_xi"]
|
||||||
|
local p = _room:GetPlayerById(playerid)
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
local isNeedDelHandCard =0
|
||||||
|
p.hu_xi = huxi
|
||||||
|
local fz = {}
|
||||||
|
fz.card = card
|
||||||
|
fz.type = ftype
|
||||||
|
fz.active_card = actice_card
|
||||||
|
fz.from_seat = from_seat
|
||||||
|
fz.opcard =opcard
|
||||||
|
local remove_num = #opcard
|
||||||
|
if ftype == RB_FZType.Chi then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Bi then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
list_remove(_room.self_player.handcard_list,fz.card)
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Peng then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Kan then
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
if #opcard==2 then
|
||||||
|
_room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card
|
||||||
|
end
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.ChouWei then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,2 do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Wei then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Pao then
|
||||||
|
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
if p.fz_list[i].type == RB_FZType.Kan then
|
||||||
|
isNeedDelHandCard =3
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
remove_num= 0
|
||||||
|
p.fz_list[i].type= RB_FZType.Pao
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local num =0
|
||||||
|
for i=1,#_room.self_player.handcard_list do
|
||||||
|
if card == _room.self_player.handcard_list[i] then
|
||||||
|
num=num+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num>0 then
|
||||||
|
isNeedDelHandCard =num
|
||||||
|
|
||||||
|
for i=1,num do
|
||||||
|
list_remove(_room.self_player.handcard_list,card)
|
||||||
|
end
|
||||||
|
local isAddTi =false
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type= RB_FZType.Pao
|
||||||
|
isAddTi=true
|
||||||
|
remove_num= 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if isAddTi==false then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
local num =0
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type= RB_FZType.Pao
|
||||||
|
num=1
|
||||||
|
remove_num= 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num==0 then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif ftype == RB_FZType.Ti then
|
||||||
|
|
||||||
|
if (p == _room.self_player) then
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
if p.fz_list[i].type == RB_FZType.Kan then
|
||||||
|
isNeedDelHandCard =3
|
||||||
|
for i=1,remove_num do
|
||||||
|
list_remove(_room.self_player.handcard_list,opcard[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
remove_num= 0
|
||||||
|
p.fz_list[i].type= RB_FZType.Ti
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local num =0
|
||||||
|
for i=1,#_room.self_player.handcard_list do
|
||||||
|
if card == _room.self_player.handcard_list[i] then
|
||||||
|
num=num+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num>0 then
|
||||||
|
isNeedDelHandCard =num
|
||||||
|
|
||||||
|
for i=1,num do
|
||||||
|
list_remove(_room.self_player.handcard_list,card)
|
||||||
|
end
|
||||||
|
local isAddTi =false
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type= RB_FZType.Ti
|
||||||
|
remove_num= 0
|
||||||
|
isAddTi=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if isAddTi==false then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
local num =0
|
||||||
|
for i=1,#p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type= RB_FZType.Ti
|
||||||
|
remove_num= 0
|
||||||
|
num=1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num==0 then
|
||||||
|
p.fz_list[#p.fz_list+1] = fz
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
p.hand_left_count = p.hand_left_count - remove_num
|
||||||
|
--[[if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then
|
||||||
|
coroutine.start(function()
|
||||||
|
coroutine.wait(0.5)
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard)
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard)
|
||||||
|
end--]]
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard)
|
||||||
|
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnEventHu(evt_data)
|
||||||
|
local cards = evt_data["card"]
|
||||||
|
local win_p = self._room:GetPlayerBySeat(evt_data["seat"])
|
||||||
|
local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"])
|
||||||
|
-- print(win_p.hand_left_count)
|
||||||
|
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
win_p.card_list = cards
|
||||||
|
table.sort( win_p.card_list, ViewUtil.HandCardSort)
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OneventResult1(evt_data)
|
||||||
|
printlog("结算=============>>>")
|
||||||
|
pt(evt_data)
|
||||||
|
local over = evt_data.type
|
||||||
|
--0:小结算 1:小大结算 2:大结算
|
||||||
|
self._room.playing = false
|
||||||
|
if 0 == over then
|
||||||
|
local result = evt_data.result
|
||||||
|
for i = 1, #self._room.player_list do
|
||||||
|
local p = self._room.player_list[i]
|
||||||
|
p.hand_left_count = 0
|
||||||
|
p.outcard_list = {}
|
||||||
|
end
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result);
|
||||||
|
end)
|
||||||
|
elseif 1 == over or 2 == over then
|
||||||
|
DataManager.CurrenRoom.Over = true
|
||||||
|
ControllerManager.SetGameNetClient(nil,true)
|
||||||
|
local total_result = evt_data.total_result
|
||||||
|
local result = evt_data.result
|
||||||
|
self._cacheEvent:Enqueue(function()
|
||||||
|
DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over);
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,191 @@
|
||||||
|
local EXGameInfo = {}
|
||||||
|
|
||||||
|
local M = EXGameInfo
|
||||||
|
|
||||||
|
function EXGameInfo.new(blur_view)
|
||||||
|
setmetatable(M, {__index = IGameInfo})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.class = 'EXGameInfo'
|
||||||
|
UIPackage.AddPackage('extend/zipai/fanpaofa/ui/Extend_Poker_FanPaoFa')
|
||||||
|
UIPackage.AddPackage('extend/zipai/fanpaofa/ui/Info_Poker_FanPaoFa')
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillData()
|
||||||
|
self._maxPlayer = 3 -- 默认玩家人数
|
||||||
|
self._roundChoice = 3 -- 回合选项数
|
||||||
|
self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_FanPaoFa/Cgm_create_room')
|
||||||
|
|
||||||
|
if oldGameVersion ==1 then
|
||||||
|
--self._config:GetChild("xipai").visible=false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if oldGameVersion==2 then
|
||||||
|
self._config:GetController("xipai").selectedIndex=1
|
||||||
|
self.xipaiValueText=self._config:GetChild('xipaifen')
|
||||||
|
self.xipaiValueText.text=1
|
||||||
|
self.xipaiValue=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local btn_cr = self._config:GetChild('sdsrbtn')
|
||||||
|
btn_cr.onClick:Set(
|
||||||
|
function()
|
||||||
|
|
||||||
|
local gniv = GroupNumberInputView_Game.new(nil, function(num)
|
||||||
|
|
||||||
|
local value = limit
|
||||||
|
if otype == 1 then
|
||||||
|
value = value + ad2d(num)
|
||||||
|
elseif otype == - 1 then
|
||||||
|
value = value - ad2d(num)
|
||||||
|
else
|
||||||
|
value = ad2d(num)
|
||||||
|
end
|
||||||
|
|
||||||
|
if value < 0 then
|
||||||
|
ViewUtil.ErrorTip(1,"输入数据异常!")
|
||||||
|
end
|
||||||
|
|
||||||
|
self.xipaiValueText.text=value/1000
|
||||||
|
self.xipaiValue=value/1000
|
||||||
|
|
||||||
|
end, 3, nil)
|
||||||
|
gniv:Show()
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
local _help_url = 'ui://Info_Poker_FanPaoFa/Com_help'
|
||||||
|
function M:GetHelpUrl()
|
||||||
|
return _help_url
|
||||||
|
end
|
||||||
|
|
||||||
|
local _icon_url = "ui://Info_Poker_FanPaoFa/icon"
|
||||||
|
function M:GetIconUrl()
|
||||||
|
return _icon_url
|
||||||
|
end
|
||||||
|
|
||||||
|
local _icon_url1 = "ui://Info_Poker_FanPaoFa/icon1"
|
||||||
|
function M:GetIconUrl1()
|
||||||
|
return _icon_url1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SelectedConfigData()
|
||||||
|
local _config = self._config
|
||||||
|
local round = _config:GetController('round').selectedIndex+1 --局数
|
||||||
|
local Cost = _config:GetController('Cost').selectedIndex
|
||||||
|
local renshu = _config:GetController('renshu').selectedIndex+2 --人数
|
||||||
|
local shoupai = _config:GetController('shoupai').selectedIndex --手牌
|
||||||
|
local choupai = _config:GetController('choupai').selectedIndex --抽牌
|
||||||
|
local hunum = _config:GetController('hunum').selectedIndex --多少起胡 0:6,1:10,2:15
|
||||||
|
|
||||||
|
local daniao = _config:GetController('daniao').selectedIndex --多少起胡 0:6,1:10,2:15
|
||||||
|
|
||||||
|
--名堂--
|
||||||
|
local tiandihu = _config:GetChild('btn_tiandihu').selected
|
||||||
|
local honghu = _config:GetChild('btn_honghu').selected
|
||||||
|
local shisanhong = _config:GetChild('btn_shisanhong').selected
|
||||||
|
local wuhu = _config:GetChild('btn_wuhu').selected
|
||||||
|
local yidianhong = _config:GetChild('btn_yidianhong').selected
|
||||||
|
local yikuaibian = _config:GetChild('btn_yikuaibian').selected
|
||||||
|
local haidihu = _config:GetChild('btn_haidihu').selected
|
||||||
|
local kahu = _config:GetChild('btn_kahu').selected
|
||||||
|
local mingwei = _config:GetChild('btn_mingwei').selected
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if shoupai==1 then
|
||||||
|
hunum=0
|
||||||
|
end
|
||||||
|
if shoupai==0 and hunum==0 then
|
||||||
|
_config:GetController('hunum').selectedIndex = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local _data = {}
|
||||||
|
|
||||||
|
_data['opt'] = round -- 1 2 8局 16 局
|
||||||
|
_data['AA'] = Cost
|
||||||
|
_data['maxPlayers'] = renshu
|
||||||
|
_data['shoupai'] = shoupai --手牌
|
||||||
|
_data["choupai"] = choupai --抽牌
|
||||||
|
_data['hunum'] = hunum --胡息计算
|
||||||
|
_data['daniao'] = daniao --打鸟
|
||||||
|
_data['tiandihu'] = tiandihu --天地胡
|
||||||
|
_data['honghu'] = honghu --红胡
|
||||||
|
_data['shisanhong'] = shisanhong --十三红
|
||||||
|
_data['wuhu'] = wuhu --乌胡
|
||||||
|
_data['yidianhong'] = yidianhong --一点红
|
||||||
|
_data['yikuaibian'] = yikuaibian --一块扁
|
||||||
|
_data['haidiliao'] = haidihu --海底胡
|
||||||
|
_data['kahu'] = kahu --卡胡
|
||||||
|
_data['mingwei'] = mingwei --明偎
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local xi_pai=false
|
||||||
|
if oldGameVersion ==2 then
|
||||||
|
if _config:GetChild("xipai") then
|
||||||
|
--xi_pai = _config:GetChild("xipai").selected
|
||||||
|
xi_pai = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
_data['xi_pai'] = xi_pai
|
||||||
|
local xi_pai_score=0
|
||||||
|
|
||||||
|
if oldGameVersion==2 then
|
||||||
|
xi_pai_score=self.xipaiValue
|
||||||
|
end
|
||||||
|
_data['xi_pai_score'] = xi_pai_score*1000
|
||||||
|
|
||||||
|
return _data
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:LoadConfigData(data)
|
||||||
|
local _config = self._config
|
||||||
|
-- data.mode=3
|
||||||
|
_config:GetController('round').selectedIndex = data.opt - 1 --== 1 and 0 or 1
|
||||||
|
_config:GetController('Cost').selectedIndex = data.AA
|
||||||
|
_config:GetController('renshu').selectedIndex = data.maxPlayers == 2 and 0 or 1
|
||||||
|
|
||||||
|
_config:GetController('shoupai').selectedIndex = data.shoupai --手牌
|
||||||
|
_config:GetController('choupai').selectedIndex = data.choupai --抽牌
|
||||||
|
_config:GetController('hunum').selectedIndex = data.hunum --起胡息
|
||||||
|
_config:GetController('daniao').selectedIndex = data.daniao --打鸟 0不打,1:10,2:20,3:50
|
||||||
|
|
||||||
|
_config:GetChild('btn_tiandihu').selected = data.tiandihu --天地胡
|
||||||
|
_config:GetChild('btn_honghu').selected = data.honghu --红胡
|
||||||
|
_config:GetChild('btn_shisanhong').selected = data.shisanhong --十三红
|
||||||
|
_config:GetChild('btn_wuhu').selected = data.wuhu --乌胡
|
||||||
|
_config:GetChild('btn_yidianhong').selected = data.yidianhong --一点红
|
||||||
|
_config:GetChild('btn_yikuaibian').selected = data.yikuaibian --一块扁
|
||||||
|
_config:GetChild('btn_haidihu').selected = data.haidihu --海底胡
|
||||||
|
_config:GetChild('btn_kahu').selected = data.kahu --卡胡
|
||||||
|
_config:GetChild('btn_mingwei').selected = data.mingwei --明偎
|
||||||
|
|
||||||
|
if oldGameVersion==2 then
|
||||||
|
self.xipaiValueText.text=data.xi_pai_score/1000
|
||||||
|
self.xipaiValue=data.xi_pai_score/1000
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
function M:OnChangeOption(ctype)
|
||||||
|
IGameInfo.OnChangeOption(self, ctype)
|
||||||
|
local people = self._config:GetController('renshu')
|
||||||
|
people.onChanged:Set(
|
||||||
|
function()
|
||||||
|
self._maxPlayer = people.selectedIndex == 0 and 2 or 3
|
||||||
|
self:ShowVariablePrice(ctype)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,627 @@
|
||||||
|
local ZPPlayBackView = import('.main.ZPPlayBackView')
|
||||||
|
local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView')
|
||||||
|
local PlayerCardInfoView = import('.PlayerCardInfoView')
|
||||||
|
local RunBeard_ResultView = import('.RunBeard_ResultView')
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local Record_Event = {
|
||||||
|
Evt_OutCard = 'OutCard',
|
||||||
|
Evt_GetCard = 'GetCard',
|
||||||
|
Evt_Action = 'Action',
|
||||||
|
Evt_ThrowCard = 'ThrowCard',
|
||||||
|
Evt_AddCard = 'AddCard',
|
||||||
|
Evt_ChangePaiXing = 'ChangePaiXing',
|
||||||
|
Evt_Win = 'Win',
|
||||||
|
Evt_result = 'result'
|
||||||
|
}
|
||||||
|
|
||||||
|
local function tableSortNumber(a, b)
|
||||||
|
return a.card_code_number > b.card_code_number
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Create a new
|
||||||
|
function M.new()
|
||||||
|
setmetatable(M, {__index = PlayBackView})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.class = 'PlayBackView'
|
||||||
|
self:init()
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:InitView(url)
|
||||||
|
local room = self._room
|
||||||
|
self._gamectr = ControllerManager.GetController(GameController)
|
||||||
|
UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard')
|
||||||
|
UIPackage.AddPackage('extend/zipai/fanpaofa/ui/Extend_Poker_FanPaoFa')
|
||||||
|
ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num)
|
||||||
|
UpdateBeat:Add(self.OnUpdate, self)
|
||||||
|
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. room.game_id)
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
if typeface == 1 then
|
||||||
|
room.change_card_display = '2_'
|
||||||
|
else
|
||||||
|
room.change_card_display = '1_'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._player_card_info = {}
|
||||||
|
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)
|
||||||
|
self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i)
|
||||||
|
end
|
||||||
|
local rightpanel = self._view:GetChild('right_panel')
|
||||||
|
self.btn_setting = rightpanel:GetChild('btn_setting')
|
||||||
|
self.btn_setting.visible = false
|
||||||
|
|
||||||
|
self.tex_time = rightpanel:GetChild('tex_time')
|
||||||
|
self.tex_time.visible = false
|
||||||
|
|
||||||
|
self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao')
|
||||||
|
self.gcm_xinhao.visible = false
|
||||||
|
|
||||||
|
self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel')
|
||||||
|
self.pb_batteryLevel.visible = false
|
||||||
|
|
||||||
|
local tex_round_item = rightpanel:GetChild('tex_round')
|
||||||
|
if tex_round_item ~= nil then
|
||||||
|
tex_round_item.text = '第 ' .. room.curren_round .. ' 局'
|
||||||
|
end
|
||||||
|
local btn_rule = rightpanel:GetChild('btn_log')
|
||||||
|
if btn_rule ~= nil then
|
||||||
|
btn_rule.onClick:Set(
|
||||||
|
function()
|
||||||
|
if self.RuleView == nil or self.RuleView._is_destroy then
|
||||||
|
self.RuleView = RoomInfoView.new(self._room)
|
||||||
|
end
|
||||||
|
self.RuleView:Show()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
local tex_roomid = rightpanel:GetChild('tex_roomid')
|
||||||
|
tex_roomid.text = room.room_id
|
||||||
|
rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName()
|
||||||
|
|
||||||
|
self._tex_round = self._view:GetChild('tex_round')
|
||||||
|
self._tex_LeftCard = self._view:GetChild('remaining_card')
|
||||||
|
self._eventmap = {}
|
||||||
|
self._cmdmap = {}
|
||||||
|
self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard
|
||||||
|
self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard
|
||||||
|
self._cmdmap[Record_Event.Evt_Action] = self.CmdAction
|
||||||
|
self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard
|
||||||
|
self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard
|
||||||
|
self._cmdmap[Record_Event.Evt_Win] = self.CmdWin
|
||||||
|
self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing
|
||||||
|
self._cmdmap[Record_Event.Evt_result] = self.onResult
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:NewPlayerPokerInfoView(view, index)
|
||||||
|
if index == 1 then
|
||||||
|
return PlayerSelfCardInfoView.new(view, self)
|
||||||
|
end
|
||||||
|
return PlayerCardInfoView.new(view, self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillRoomData(data)
|
||||||
|
if self._win_pic then
|
||||||
|
self._win_pic:Dispose()
|
||||||
|
end
|
||||||
|
self._currentStep = 0
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local _player_card_info = self._player_card_info
|
||||||
|
local roominfo_panel = self._view:GetChild('roominfo_panel1')
|
||||||
|
roominfo_panel:GetChild('tex_roomid').text = room.room_id
|
||||||
|
roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName()
|
||||||
|
for i = 1, #room.player_list do
|
||||||
|
local p = room.player_list[i]
|
||||||
|
local card_info = _player_card_info[self:GetPos(p.seat)]
|
||||||
|
card_info:Clear()
|
||||||
|
card_info:SetPlayer(p)
|
||||||
|
if p.seat == room.self_player.seat then
|
||||||
|
card_info:UpdateIsOnClick(false)
|
||||||
|
end
|
||||||
|
local infoHand = self._player_info[self:GetPos(p.seat)]
|
||||||
|
infoHand._view:GetController('huxi').selectedIndex = 1
|
||||||
|
infoHand._view:GetChild('huxi').text = p.hu_xi
|
||||||
|
if p.total_hp then
|
||||||
|
infoHand._view:GetController('zhanji').selectedIndex = 0
|
||||||
|
if room.hpOnOff == 1 or room:checkHpNonnegative() then
|
||||||
|
infoHand._view:GetController('zhanji').selectedIndex = 1
|
||||||
|
infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp)
|
||||||
|
end
|
||||||
|
infoHand:UpdateScore()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:UpdateRound(self._room.curren_round)
|
||||||
|
self:GenerateAllStepData(data)
|
||||||
|
self:ShowStep(1)
|
||||||
|
self:UpdateStep(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:ShowStep(index)
|
||||||
|
local step = self._step[index + 1]
|
||||||
|
self:UpdateStep(index + 1)
|
||||||
|
self:UpdateLeftCard(step.left_card)
|
||||||
|
for i = 1, #step.player_card_data do
|
||||||
|
local p = self._room:GetPlayerBySeat(i)
|
||||||
|
local info = self._player_card_info[self:GetPos(i)]
|
||||||
|
p.card_list = step.player_card_data[i].card_list
|
||||||
|
p.outcard_list = step.player_card_data[i].outcard_list
|
||||||
|
p.fz_list = step.player_card_data[i].fz_list
|
||||||
|
p.hu_xi = step.player_card_data[i].hu_xi
|
||||||
|
p.hand_left_count = #p.card_list
|
||||||
|
|
||||||
|
if index == 1 then
|
||||||
|
info:Clear()
|
||||||
|
if p.total_hp then
|
||||||
|
local avHand = self._player_info[self:GetPos(p.seat)]
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
avHand._view:GetController('zhanji').selectedIndex = 0
|
||||||
|
if room.hpOnOff == 1 or room:checkHpNonnegative() then
|
||||||
|
avHand._view:GetController('zhanji').selectedIndex = 1
|
||||||
|
avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp)
|
||||||
|
end
|
||||||
|
avHand:UpdateScore()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if p.hu_xi ~= nil then
|
||||||
|
local infoHand = self._player_info[self:GetPos(p.seat)]
|
||||||
|
infoHand._view:GetChild('huxi').text = p.hu_xi
|
||||||
|
end
|
||||||
|
if step.cmd == Record_Event.Evt_Action then
|
||||||
|
if p.fz_list ~= nil and #p.fz_list > 0 then
|
||||||
|
info:UpdateFzList(p.fz_list)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if p.seat ~= self._room.self_player.seat then
|
||||||
|
info:InitHandCard(p.card_list)
|
||||||
|
else
|
||||||
|
self._room.self_player.handcard_list = p.card_list
|
||||||
|
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_OutCard or step.cmd == Record_Event.Evt_GetCard then
|
||||||
|
if step.DiceCard ~= nil and step.DiceCard ~= 0 then
|
||||||
|
if p.seat == step.seat then
|
||||||
|
info:UpdateOutCardList(step.DiceCard)
|
||||||
|
coroutine.start(
|
||||||
|
function()
|
||||||
|
coroutine.wait(1.5)
|
||||||
|
info:ClearOutCard()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if p.outcard_list ~= nil then
|
||||||
|
info:UpdateQiPai(p.outcard_list)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- print("step.cmd ",step.cmdm,Record_Event.Evt_Win)
|
||||||
|
if step.cmd == Record_Event.Evt_result then
|
||||||
|
--[[local _room = DataManager.CurrenRoom
|
||||||
|
local result = step.result
|
||||||
|
self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡')
|
||||||
|
local info = self._player_card_info[self:GetPos(step.win)]
|
||||||
|
info._mask_liangpai:AddChild(self._win_pic)
|
||||||
|
self._win_pic:Center()
|
||||||
|
|
||||||
|
if result ~= nil then
|
||||||
|
if self._clearingView == nil then
|
||||||
|
self._clearingView = RunBeard_ResultView.new(self._view)
|
||||||
|
coroutine.start(
|
||||||
|
function()
|
||||||
|
coroutine.wait(0.5)
|
||||||
|
self._clearingView:Show()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
local data = result.data.info_list
|
||||||
|
self._clearingView:InitData(
|
||||||
|
0,
|
||||||
|
_room,
|
||||||
|
result.data,
|
||||||
|
nil,
|
||||||
|
function(...)
|
||||||
|
for i = 1, #data do
|
||||||
|
local p = _room:GetPlayerBySeat(data[i].seat)
|
||||||
|
p.total_score = data[i].total_score
|
||||||
|
-- p.cur_hp = data[i]['cur_hp'] or 0
|
||||||
|
-- if data[i]['hp_info'] then
|
||||||
|
-- p.cur_hp = data[i].hp_info.cur_hp
|
||||||
|
-- end
|
||||||
|
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
||||||
|
local info = self._player_info[self:GetPos(p.seat)]
|
||||||
|
card_info:Clear()
|
||||||
|
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
|
||||||
|
info._view:GetController('zhanji').selectedIndex = 0
|
||||||
|
if _room.hpOnOff == 1 or _room:checkHpNonnegative() then
|
||||||
|
info._view:GetController('zhanji').selectedIndex = 1
|
||||||
|
info._view:GetChild('tex_jifen').text = d2ad(stotal_hp)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
info:UpdateScore(p.total_score)
|
||||||
|
end
|
||||||
|
self._clearingView = nil
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end--]]
|
||||||
|
else
|
||||||
|
if self._win_pic then
|
||||||
|
self._win_pic:Dispose()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:GenerateAllStepData(data)
|
||||||
|
local cmdList = self.cmdList
|
||||||
|
self._step = {}
|
||||||
|
local step = {}
|
||||||
|
local info = data.info
|
||||||
|
step.cmd = ''
|
||||||
|
step.left_card = info.left_card
|
||||||
|
step.win = 0
|
||||||
|
|
||||||
|
step.player_card_data = {}
|
||||||
|
for i = 1, #self._room.player_list do
|
||||||
|
local p = info.playerData[i]
|
||||||
|
local u = {}
|
||||||
|
u.seat = p.seat
|
||||||
|
u.card_list = p.hand_card
|
||||||
|
u.hand_left_count = #u.card_list
|
||||||
|
u.fz_list = {}
|
||||||
|
u.outcard_list = {}
|
||||||
|
u.hu_xi = 0
|
||||||
|
step.player_card_data[u.seat] = u
|
||||||
|
end
|
||||||
|
self._step[#self._step + 1] = step
|
||||||
|
|
||||||
|
for i = 1, #cmdList do
|
||||||
|
local tem = cmdList[i]
|
||||||
|
self._cmdmap[tem.cmd](self, tem, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdOutCard(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.current_out_seat = cmd.seat
|
||||||
|
local u = data.player_card_data[cmd.seat]
|
||||||
|
list_remove(u.card_list, cmd.data.card)
|
||||||
|
data.seat = cmd.seat
|
||||||
|
data.DiceCard = cmd.data.card
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdGetCard(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.left_card = cmd.data.left_count
|
||||||
|
local u = data.player_card_data[cmd.seat]
|
||||||
|
data.seat = cmd.seat
|
||||||
|
data.DiceCard = cmd.data.card
|
||||||
|
end
|
||||||
|
function M:CmdThrowCard(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.seat = cmd.seat
|
||||||
|
data.current_seat = cmd.seat
|
||||||
|
local u = data.player_card_data[cmd.seat]
|
||||||
|
data.out_card_list = cmd.data.card
|
||||||
|
u.outcard_list[#u.outcard_list + 1] = cmd.data.card
|
||||||
|
end
|
||||||
|
function M:CmdAddCard(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
local _room = self._room
|
||||||
|
local u = data.player_card_data[cmd.seat]
|
||||||
|
u.card_list[#u.card_list + 1] = cmd.data.card
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:onResult(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.result = cmd.result
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdChangePaiXing(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.seat = cmd.seat
|
||||||
|
data.card_list = cmd.data.card_list
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdAction(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.seat = cmd.seat
|
||||||
|
local p = data.player_card_data[cmd.seat]
|
||||||
|
local fz = {}
|
||||||
|
p.hu_xi = cmd.data.hu_xi
|
||||||
|
fz.type = cmd.data.type
|
||||||
|
fz.card = cmd.data.card
|
||||||
|
fz.active_card = cmd.data.card
|
||||||
|
fz.opcard = cmd.data.opcard
|
||||||
|
local opcard = fz.opcard
|
||||||
|
local ftype = fz.type
|
||||||
|
local card = fz.card
|
||||||
|
local remove_num = #opcard
|
||||||
|
if ftype == RB_FZType.Chi then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
for i = 1, remove_num do
|
||||||
|
list_remove(p.card_list, opcard[i])
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Bi then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
for i = 1, remove_num do
|
||||||
|
list_remove(p.card_list, opcard[i])
|
||||||
|
end
|
||||||
|
list_remove(p.card_list, fz.card)
|
||||||
|
elseif ftype == RB_FZType.Peng then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
for i = 1, remove_num do
|
||||||
|
list_remove(p.card_list, opcard[i])
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Kan then
|
||||||
|
local _room = self._room
|
||||||
|
if #opcard == 2 then
|
||||||
|
p.card_list[#p.card_list + 1] = card
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.ChouWei then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
for i = 1, 2 do
|
||||||
|
list_remove(p.card_list, opcard[i])
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Wei then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
for i = 1, remove_num do
|
||||||
|
list_remove(p.card_list, opcard[i])
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Pao then
|
||||||
|
local num = 0
|
||||||
|
for i = 1, #p.card_list do
|
||||||
|
if card == p.card_list[i] then
|
||||||
|
num = num + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local isAddTi = false
|
||||||
|
for i = 1, #p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type = RB_FZType.Pao
|
||||||
|
isAddTi = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num > 0 then
|
||||||
|
for i = 1, num do
|
||||||
|
list_remove(p.card_list, card)
|
||||||
|
end
|
||||||
|
|
||||||
|
if isAddTi == false then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif ftype == RB_FZType.Ti then
|
||||||
|
local num = 0
|
||||||
|
for i = 1, #p.card_list do
|
||||||
|
if card == p.card_list[i] then
|
||||||
|
num = num + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local isAddTi = false
|
||||||
|
for i = 1, #p.fz_list do
|
||||||
|
if p.fz_list[i].card == card then
|
||||||
|
p.fz_list[i].type = RB_FZType.Ti
|
||||||
|
isAddTi = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if num > 0 then
|
||||||
|
for i = 1, num do
|
||||||
|
list_remove(p.card_list, card)
|
||||||
|
end
|
||||||
|
|
||||||
|
if isAddTi == false then
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdWin(cmd, index)
|
||||||
|
local data = self:CopyLastStep(index)
|
||||||
|
data.cmd = cmd.cmd
|
||||||
|
data.win = cmd.seat
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateLeftCard(num)
|
||||||
|
self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌'
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateRound(round)
|
||||||
|
self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局'
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CopyLastStep(index)
|
||||||
|
local step = {}
|
||||||
|
local last_step = self._step[index]
|
||||||
|
step = self:deepcopy(last_step)
|
||||||
|
step.player_card_data = {}
|
||||||
|
local card_data = step.player_card_data
|
||||||
|
for i = 1, #last_step.player_card_data do
|
||||||
|
card_data[i] = {}
|
||||||
|
card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list)
|
||||||
|
card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list)
|
||||||
|
card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list)
|
||||||
|
card_data[i].hand_left_count = #card_data[i].card_list
|
||||||
|
card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi)
|
||||||
|
end
|
||||||
|
self._step[#self._step + 1] = step
|
||||||
|
return step
|
||||||
|
end
|
||||||
|
|
||||||
|
-- lua table 深拷贝
|
||||||
|
function M:deepcopy(object)
|
||||||
|
local lookup_table = {}
|
||||||
|
local function _copy(object)
|
||||||
|
if type(object) ~= 'table' then
|
||||||
|
return object
|
||||||
|
elseif lookup_table[object] then
|
||||||
|
return lookup_table[object]
|
||||||
|
end
|
||||||
|
local new_table = {}
|
||||||
|
lookup_table[object] = new_table
|
||||||
|
for index, value in pairs(object) do
|
||||||
|
new_table[_copy(index)] = _copy(value)
|
||||||
|
end
|
||||||
|
return setmetatable(new_table, getmetatable(object))
|
||||||
|
end
|
||||||
|
return _copy(object)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:NextRecordPlay()
|
||||||
|
local result = PlayBackView.NextRecordPlay(self)
|
||||||
|
if not result then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:ChangePlayState(false)
|
||||||
|
self._speed = 1
|
||||||
|
self._playFoward = true
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:LastRecordPlay()
|
||||||
|
local result = PlayBackView.LastRecordPlay(self)
|
||||||
|
if not result then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:ChangePlayState(false)
|
||||||
|
self._speed = 1
|
||||||
|
self._playFoward = true
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Play()
|
||||||
|
self:ChangeAlpha()
|
||||||
|
self:ChangePlayState(not self._play)
|
||||||
|
if not self._play then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then
|
||||||
|
self._currentStep = 0
|
||||||
|
self._speed = 1
|
||||||
|
self._playFoward = true
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:ChangePlayState(state)
|
||||||
|
self._play = state
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play')
|
||||||
|
if self._play then
|
||||||
|
btn_play:GetController('state').selectedIndex = 1
|
||||||
|
else
|
||||||
|
btn_play:GetController('state').selectedIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:ChangeTextSpeed()
|
||||||
|
local str1 = self._play and self._speed or ''
|
||||||
|
self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1
|
||||||
|
local str2 =
|
||||||
|
not self._play and (self._playFoward and '播放暂停' or '回退暂停') or
|
||||||
|
self._playFoward and (self._speed == 1 and '播放' or '快进') or
|
||||||
|
(self._speed == 1 and '回退' or '快退')
|
||||||
|
self._view:GetChild('panel_record'):GetChild('tex_2').text = str2
|
||||||
|
local str3 = self._play and '倍速度' or ''
|
||||||
|
self._view:GetChild('panel_record'):GetChild('tex_1').text = str3
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdLeftArrows()
|
||||||
|
self:ChangeAlpha()
|
||||||
|
self:ChangePlayState(true)
|
||||||
|
if not self._playFoward then
|
||||||
|
if self._speed < 16 then
|
||||||
|
self._speed = self._speed * 2
|
||||||
|
else
|
||||||
|
self._speed = 1
|
||||||
|
end
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
else
|
||||||
|
self._speed = 1
|
||||||
|
self._playFoward = false
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CmdRightArrows()
|
||||||
|
self:ChangeAlpha()
|
||||||
|
self:ChangePlayState(true)
|
||||||
|
if self._playFoward then
|
||||||
|
if self._speed < 16 then
|
||||||
|
self._speed = self._speed * 2
|
||||||
|
else
|
||||||
|
self._speed = 1
|
||||||
|
end
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
else
|
||||||
|
self._speed = 1
|
||||||
|
self._playFoward = true
|
||||||
|
self:ChangeTextSpeed()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:OnUpdate()
|
||||||
|
if self._play then
|
||||||
|
if (self._currentStep == #self.cmdList and self._playFoward) then
|
||||||
|
self:ChangePlayState(false)
|
||||||
|
ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放')
|
||||||
|
return
|
||||||
|
elseif (self._currentStep == 0 and not self._playFoward) then
|
||||||
|
self:ChangePlayState(false)
|
||||||
|
ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self._timer = self._timer + Time.deltaTime
|
||||||
|
if self._timer >= 1 / self._speed then
|
||||||
|
self._timer = 0
|
||||||
|
local step = self._playFoward and 1 or -1
|
||||||
|
self._currentStep = self._currentStep + step
|
||||||
|
self:ShowStep(self._currentStep)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Destroy()
|
||||||
|
UpdateBeat:Remove(self.OnUpdate, self)
|
||||||
|
PlayBackView.Destroy(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateStep(step)
|
||||||
|
self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步'
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
|
||||||
|
|
||||||
|
local EXPlayer ={
|
||||||
|
-- 手牌列表
|
||||||
|
card_list = nil,
|
||||||
|
-- 剩余牌数
|
||||||
|
hand_left_count = 0,
|
||||||
|
-- 出牌列表
|
||||||
|
outcard_list = nil,
|
||||||
|
-- 牌组列表
|
||||||
|
fz_list = nil,
|
||||||
|
hu_xi =0
|
||||||
|
}
|
||||||
|
|
||||||
|
local M = EXPlayer
|
||||||
|
|
||||||
|
--- Create a new EXPlayer
|
||||||
|
function M.new()
|
||||||
|
setmetatable(M,{__index = Player})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.card_list = {}
|
||||||
|
self.outcard_list = {}
|
||||||
|
self.fz_list = {}
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 清理玩家数据
|
||||||
|
function M:Clear()
|
||||||
|
Player.Clear(self)
|
||||||
|
self.card_list = {}
|
||||||
|
self.outcard_list = {}
|
||||||
|
self.fz_list = {}
|
||||||
|
self.hand_left_count = 0
|
||||||
|
self.hu_xi =0
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
local PlayerInfoView = require("Game.View.PlayerInfoView")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.new(view, mainView)
|
||||||
|
setmetatable(M, {__index = PlayerInfoView})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self._view = view
|
||||||
|
self._main_view = mainView
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[function M:FillData(player)
|
||||||
|
|
||||||
|
|
||||||
|
PlayerInfoView.FillData(self, player)
|
||||||
|
if player.cur_hp ~= nil then
|
||||||
|
self:UpdateScore(d2ad(player.cur_hp))
|
||||||
|
else
|
||||||
|
local rt = 1
|
||||||
|
if self._main_view._room.hpOnOff == 1 then
|
||||||
|
rt = self._main_view._room.score_times
|
||||||
|
end
|
||||||
|
self:UpdateScore(player.total_score * rt)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end--]]
|
||||||
|
|
||||||
|
function M:UpdatePiao(piao)
|
||||||
|
|
||||||
|
if piao == nil or piao == -1 then
|
||||||
|
self._view:GetChild("piao").text = ""
|
||||||
|
elseif piao == 0 then
|
||||||
|
self._view:GetChild("piao").text = "不飘"
|
||||||
|
elseif piao == 1 then
|
||||||
|
self._view:GetChild("piao").text = "飘1分"
|
||||||
|
elseif piao == 2 then
|
||||||
|
self._view:GetChild("piao").text = "飘2分"
|
||||||
|
elseif piao == 3 then
|
||||||
|
self._view:GetChild("piao").text = "飘3分"
|
||||||
|
elseif piao == 5 then
|
||||||
|
self._view:GetChild("piao").text = "飘5分"
|
||||||
|
elseif piao == 8 then
|
||||||
|
self._view:GetChild("piao").text = "飘8分"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,506 @@
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
--- Create a new RoomConfig
|
||||||
|
function M.new(config)
|
||||||
|
setmetatable(M,{__index = RoomConfig})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
RoomConfig.init(self,config)
|
||||||
|
self.config=config
|
||||||
|
self.class = "RoomConfig"
|
||||||
|
self.round = config["times"]
|
||||||
|
self.mode = config["mode"]
|
||||||
|
self.tun = config["tun"]
|
||||||
|
self.fengding = config["fengding"]
|
||||||
|
self.tuanyuan = config["tuanyuan"]
|
||||||
|
self.hanghangxi = config["hanghangxi"]
|
||||||
|
self.siqi = config["siqi"]
|
||||||
|
self.shuahou = config["shuahou"]
|
||||||
|
self.huangfan = config["huangfan"]
|
||||||
|
self.jiaxingxing = config["jiaxingxing"]
|
||||||
|
self.tinghu = config["tinghu"]
|
||||||
|
self.duizifu = config["duizifu"]
|
||||||
|
self.back = config["back"]
|
||||||
|
self.yuan = config["yuan"]
|
||||||
|
self.tianhu =config["tianhu"]
|
||||||
|
self.dihu =config["dihu"]
|
||||||
|
self.haihu =config["haihu"]
|
||||||
|
self.maxPlayers = config["maxPlayers"]
|
||||||
|
self.qupai = config["qupai"]
|
||||||
|
self.isHidden = config.isHidden
|
||||||
|
|
||||||
|
self.hh = config["hh"] or 0
|
||||||
|
self.dh = config["dh"] or 0
|
||||||
|
self.hw = config["hw"] or 0
|
||||||
|
self.wh = config["wh"] or 0
|
||||||
|
|
||||||
|
self.hd = config["hd"] or 0
|
||||||
|
self.wd = config["wd"] or 0
|
||||||
|
self.jhd = config["jhd"] or 0
|
||||||
|
|
||||||
|
self.dhdf = config["dhdf"] or 0
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[function M:GetDes(sp)
|
||||||
|
sp = sp or " "
|
||||||
|
local count=0
|
||||||
|
local str = self.round and self.round .. "局" .. " " or ""
|
||||||
|
str = str .. RoomConfig.GetDes(self, sp).."\n"
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["kawai"]==0 then
|
||||||
|
str = str .."卡歪"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tr = str .."不卡歪"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=3
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["first_rand_zhuang"] then
|
||||||
|
str = str .."首局随机庄"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=1
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["zhuang_di_hu"]==0 then
|
||||||
|
str = str .."庄家地胡"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=2
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tr = str .."庄家不地胡"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=1
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["hao_config"]==0 then
|
||||||
|
str = str .."豪123"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tr = str .."豪234"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["hao_jiabei"]==0 then
|
||||||
|
str = str .."-不加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=2
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["hao_jiabei"]==1 then
|
||||||
|
str = str .."低于10分加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["hao_jiabei"]==2 then
|
||||||
|
str = str .."低于20分加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["hao_jiabei"]==3 then
|
||||||
|
str = str .."低于30分加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["hao_jiabei"]==4 then
|
||||||
|
str = str .."低于40分加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["hao_jiabei"]==5 then
|
||||||
|
str = str .."低于50分加倍"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["ming_tang"]==0 then
|
||||||
|
str = str .."名堂60/80/100"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
else
|
||||||
|
str = str .."名堂80/100/120"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=0
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["piao"]==0 then
|
||||||
|
str = str .."不飘"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["piao"]==1 then
|
||||||
|
str = str .."飘123"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["piao"]==2 then
|
||||||
|
str = str .."飘235"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["piao"]==3 then
|
||||||
|
str = str .."飘258"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["qupai"]==0 then
|
||||||
|
str = str .."不抽"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["piao"]==1 then
|
||||||
|
str = str .."抽10"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
elseif self.config["piao"]==2 then
|
||||||
|
str = str .."抽19"
|
||||||
|
count=count+1
|
||||||
|
if count%2==0 then
|
||||||
|
str = str .."\n"
|
||||||
|
else
|
||||||
|
sp1=""
|
||||||
|
local strL=4
|
||||||
|
for i=1,strL do
|
||||||
|
sp1=sp1.." "
|
||||||
|
end
|
||||||
|
str = str .. sp1..sp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return str
|
||||||
|
end--]]
|
||||||
|
|
||||||
|
|
||||||
|
function M:GetDes(sp)
|
||||||
|
|
||||||
|
sp = sp or " "
|
||||||
|
local str = self.round and self.round .. "局" .. sp or ""
|
||||||
|
str = str .. RoomConfig.GetDes(self, sp)
|
||||||
|
|
||||||
|
if self.config["kawai"]==0 then
|
||||||
|
str = str .."卡歪"
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
else
|
||||||
|
str = str .."不卡歪"
|
||||||
|
str = str ..sp
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["first_rand_zhuang"] then
|
||||||
|
str = str .."首局随机庄"
|
||||||
|
str = str .. sp
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["zhuang_di_hu"]==0 then
|
||||||
|
str = str .."庄家地胡"
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
else
|
||||||
|
str = str .."庄家不地胡"
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--printlog("1111111111111111111111111",self.config["hao_config"])
|
||||||
|
if self.config["hao_config"]==0 then
|
||||||
|
str = str .."豪123"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
else
|
||||||
|
str = str .."豪234"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["hao_jiabei"]==0 then
|
||||||
|
str = str .."-不加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["hao_jiabei"]==1 then
|
||||||
|
str = str .."低于10分加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["hao_jiabei"]==2 then
|
||||||
|
str = str .."低于20分加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["hao_jiabei"]==3 then
|
||||||
|
str = str .."低于30分加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["hao_jiabei"]==4 then
|
||||||
|
str = str .."低于40分加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["hao_jiabei"]==5 then
|
||||||
|
str = str .."低于50分加倍"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.config["ming_tang"]==0 then
|
||||||
|
str = str .."名堂60/80/100"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
else
|
||||||
|
str = str .."名堂80/100/120"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["piao"]==0 then
|
||||||
|
str = str .."不飘"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["piao"]==1 then
|
||||||
|
str = str .."飘123"
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["piao"]==2 then
|
||||||
|
str = str .."飘235"
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["piao"]==3 then
|
||||||
|
str = str .."飘258"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.config["qupai"]==0 then
|
||||||
|
str = str .."不抽"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["piao"]==1 then
|
||||||
|
str = str .."抽10"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
elseif self.config["piao"]==2 then
|
||||||
|
str = str .."抽19"
|
||||||
|
|
||||||
|
str = str ..sp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:GetGameName()
|
||||||
|
return self.maxPlayers .. '人放炮罚'
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:GetGameJS()
|
||||||
|
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_FanPaoFa/gamerule")
|
||||||
|
return gamerulepanel
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:GetGameSMSize()
|
||||||
|
return 467,500
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,241 @@
|
||||||
|
local EXTEND_MODEL_NAME = ...
|
||||||
|
|
||||||
|
local EXGameInfo = import('.EXGameInfo')
|
||||||
|
local EXMainView = import('.EXMainView')
|
||||||
|
local EXGameController = import('.EXGameController')
|
||||||
|
local EXRoomConfig = import('.EXRoomConfig')
|
||||||
|
local EXPlayBackView = import('.EXPlayBackView')
|
||||||
|
local explayer = import('.EXPlayer')
|
||||||
|
local ExtendConfig = {}
|
||||||
|
|
||||||
|
local M = ExtendConfig
|
||||||
|
|
||||||
|
function ExtendConfig.new()
|
||||||
|
setmetatable(M, {__index = IExtendConfig})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.class = 'ExtendConfig'
|
||||||
|
self.extend_id = 13
|
||||||
|
self._viewMap = {}
|
||||||
|
self._viewMap[ViewManager.View_Main] = EXMainView
|
||||||
|
self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--卸载资源
|
||||||
|
function M:UnAllAssets()
|
||||||
|
UIPackage.RemovePackage('extend/zipai/fanpaofa/ui/Info_Poker_FanPaoFa')
|
||||||
|
self:UnAssets()
|
||||||
|
end
|
||||||
|
|
||||||
|
--卸载资源
|
||||||
|
function M:UnAssets()
|
||||||
|
UIPackage.RemovePackage('extend/zipai/fanpaofa/ui/Extend_Poker_FanPaoFa')
|
||||||
|
ResourcesManager.UnLoadGroup('FanPaoFa_ZP')
|
||||||
|
end
|
||||||
|
|
||||||
|
local _gameInfo = nil
|
||||||
|
function M:GetGameInfo()
|
||||||
|
if not _gameInfo then
|
||||||
|
_gameInfo = EXGameInfo.new()
|
||||||
|
end
|
||||||
|
return _gameInfo
|
||||||
|
end
|
||||||
|
|
||||||
|
local _ctr_game = nil
|
||||||
|
function M:GetGameController()
|
||||||
|
if _ctr_game == nil then
|
||||||
|
_ctr_game = EXGameController.new()
|
||||||
|
end
|
||||||
|
return _ctr_game
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillRoomConfig(room, _config)
|
||||||
|
room.room_config = EXRoomConfig.new(_config)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillRoomData(s2croom)
|
||||||
|
printlog("初始化数据===>>>")
|
||||||
|
pt(s2croom)
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local reload = s2croom['reload']
|
||||||
|
local _tableInfo = s2croom['tableInfo']
|
||||||
|
|
||||||
|
local _config = _tableInfo['config']
|
||||||
|
room.room_config = EXRoomConfig.new(_config)
|
||||||
|
|
||||||
|
local playerList = _tableInfo['playerData']
|
||||||
|
room.curren_round = _tableInfo['round']
|
||||||
|
for i = 1, #playerList do
|
||||||
|
local _jp = playerList[i]
|
||||||
|
|
||||||
|
local p = explayer.new()
|
||||||
|
p.seat = _jp['seat']
|
||||||
|
local online = _jp['online']
|
||||||
|
p.line_state = online
|
||||||
|
p.ready = _jp['ready'] == 1 and true or false
|
||||||
|
--p.piao=_jp['piao']
|
||||||
|
local pid = _jp['aid']
|
||||||
|
if (DataManager.SelfUser.account_id == pid) then
|
||||||
|
room.self_player = p
|
||||||
|
p.self_user = DataManager.SelfUser
|
||||||
|
else
|
||||||
|
local u = User.new()
|
||||||
|
u.account_id = pid
|
||||||
|
p.self_user = u
|
||||||
|
u.nick_name = _jp['nick']
|
||||||
|
u.head_url = _jp['portrait']
|
||||||
|
u.sex = _jp['sex']
|
||||||
|
end
|
||||||
|
p.entrust = _jp['entrust']
|
||||||
|
p.self_user.host_ip = _jp['ip']
|
||||||
|
p.self_user.location = Location.new(_jp['pos'] or '')
|
||||||
|
p.cur_hp = _jp['cur_hp'] or 0
|
||||||
|
p.total_hp = _jp['total_hp'] or 0
|
||||||
|
if _jp['hp_info'] then
|
||||||
|
p.cur_hp = _jp.hp_info.cur_hp
|
||||||
|
p.total_hp = _jp.hp_info.total_hp
|
||||||
|
end
|
||||||
|
room:AddPlayer(p)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 如果重写了player类,就需要传第二个参数
|
||||||
|
-- self:FillPlayerData(playerList, explayer)
|
||||||
|
|
||||||
|
if (reload) then
|
||||||
|
local _reloadInfo = s2croom['reloadInfo']
|
||||||
|
room.self_player.currentNotPutCardList=_reloadInfo['notput']
|
||||||
|
local _hand_card = _reloadInfo['hand_card']
|
||||||
|
local _card_list = _reloadInfo['card_list']
|
||||||
|
local _discard = _reloadInfo['discard']
|
||||||
|
room.discard = _discard
|
||||||
|
-- local _index = _reloadInfo["typeface"]
|
||||||
|
-- if _index ==1 then
|
||||||
|
-- room.change_card_display = "2_"
|
||||||
|
-- else
|
||||||
|
-- room.change_card_display = "1_"
|
||||||
|
-- end
|
||||||
|
room.self_player.handcard_list = _hand_card
|
||||||
|
room.self_player.card_list = {}
|
||||||
|
for i = 1, #_card_list do
|
||||||
|
local data = {}
|
||||||
|
data.card_item = _card_list[i].card
|
||||||
|
data.index_X = _card_list[i].X
|
||||||
|
data.index_Y = _card_list[i].Y
|
||||||
|
room.self_player.card_list[#room.self_player.card_list + 1] = data
|
||||||
|
end
|
||||||
|
local active_seat = _reloadInfo['active_seat']
|
||||||
|
local bank_seat = _reloadInfo['banker_seat']
|
||||||
|
local playing = _reloadInfo['playing']
|
||||||
|
local _info_list = _reloadInfo['info_list']
|
||||||
|
local last_outcard_seat = _reloadInfo['last_outcard_seat']
|
||||||
|
|
||||||
|
room.left_count = _reloadInfo['left_card']
|
||||||
|
room.banker_seat = bank_seat
|
||||||
|
room.curren_outcard_seat = _reloadInfo['curren_outcard_seat']
|
||||||
|
if active_seat ~= 0 then
|
||||||
|
local player = room:GetPlayerBySeat(active_seat)
|
||||||
|
player.DiceCard = _reloadInfo['acitve_card']
|
||||||
|
end
|
||||||
|
room.last_outcard_seat = last_outcard_seat
|
||||||
|
room.playing = playing
|
||||||
|
for i = 1, #_info_list do
|
||||||
|
local tem = _info_list[i]
|
||||||
|
local playerid = tem['playerid']
|
||||||
|
local p = room:GetPlayerById(playerid)
|
||||||
|
local outcard_list = tem['outcard_list']
|
||||||
|
p.outcard_list = outcard_list
|
||||||
|
p.total_score = tem['score']
|
||||||
|
p.hu_xi = tem['hu_xi']
|
||||||
|
p.hand_left_count = tem['card_count']
|
||||||
|
p.cur_hp = tem['cur_hp'] or 0
|
||||||
|
p.total_hp = tem['total_hp'] or 0
|
||||||
|
if tem['hp_info'] then
|
||||||
|
p.cur_hp = tem.hp_info.cur_hp
|
||||||
|
p.total_hp = tem.hp_info.total_hp
|
||||||
|
end
|
||||||
|
p.entrust = tem['entrust']
|
||||||
|
p.piao=tem['piao']
|
||||||
|
local opcard = tem['opcard']
|
||||||
|
for k = 1, #opcard do
|
||||||
|
local op = opcard[k]
|
||||||
|
local fz = {}
|
||||||
|
fz.type = op['type']
|
||||||
|
local data = {}
|
||||||
|
data[1] = op['card1']
|
||||||
|
data[2] = op['card3']
|
||||||
|
fz.opcard = data
|
||||||
|
fz.card = op['card2']
|
||||||
|
fz.active_card = op['card2']
|
||||||
|
|
||||||
|
p.fz_list[#p.fz_list + 1] = fz
|
||||||
|
if p.seat == room.self_player.seat then
|
||||||
|
if fz.type == RB_FZType.Kan then
|
||||||
|
for i = 1, 3 do
|
||||||
|
room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
pt(p)
|
||||||
|
if not playing and room.curren_round > 0 then
|
||||||
|
self.GetGameController():PlayerReady()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillPlayBackData(pd_data)
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local _tableInfo = pd_data['info']
|
||||||
|
|
||||||
|
local _config = _tableInfo['config']
|
||||||
|
room.room_id = _tableInfo.roomid
|
||||||
|
room.room_config = EXRoomConfig.new(_config)
|
||||||
|
room.owner_id = _config['ownerid']
|
||||||
|
local active_seat = _tableInfo['active_seat']
|
||||||
|
local bank_seat = _tableInfo['banker_seat']
|
||||||
|
room.left_count = _tableInfo['left_card']
|
||||||
|
room.banker_seat = bank_seat
|
||||||
|
room.curren_turn_seat = active_seat
|
||||||
|
room.curren_round = _tableInfo['round']
|
||||||
|
|
||||||
|
local _info_list = _tableInfo['playerData']
|
||||||
|
for i = 1, #_info_list do
|
||||||
|
local _jp = _info_list[i]
|
||||||
|
local p = room:NewPlayer()
|
||||||
|
p.seat = _jp['seat']
|
||||||
|
local online = _jp['online']
|
||||||
|
p.line_state = online
|
||||||
|
p.ready = _jp['ready'] == 1 and true or false
|
||||||
|
local pid = _jp['aid']
|
||||||
|
if pid == DataManager.SelfUser.account_id then
|
||||||
|
room.self_player = p
|
||||||
|
end
|
||||||
|
local u = User.new()
|
||||||
|
u.account_id = pid
|
||||||
|
p.self_user = u
|
||||||
|
u.nick_name = _jp['nick']
|
||||||
|
u.head_url = _jp['portrait']
|
||||||
|
u.sex = _jp['sex']
|
||||||
|
p.self_user.host_ip = p.self_user.host_ip
|
||||||
|
local _hand_card = _jp['hand_card']
|
||||||
|
p.hand_card = _hand_card
|
||||||
|
if room.self_player ~= nil and p.seat == room.self_player.seat then
|
||||||
|
room.self_player.handcard_list = _hand_card
|
||||||
|
end
|
||||||
|
p.total_score = _jp['score']
|
||||||
|
p.hand_left_count = #_hand_card
|
||||||
|
p.cur_hp = _jp['cur_hp'] or 0
|
||||||
|
p.total_hp = _jp['total_hp'] or 0
|
||||||
|
if _jp['hp_info'] then
|
||||||
|
p.cur_hp = _jp.hp_info.cur_hp
|
||||||
|
p.total_hp = _jp.hp_info.total_hp
|
||||||
|
end
|
||||||
|
|
||||||
|
room:AddPlayer(p)
|
||||||
|
end
|
||||||
|
room.cmdList = pd_data['cmdList']
|
||||||
|
room.result = pd_data['result']
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,268 @@
|
||||||
|
local PlayerCardInfoView = import(".main.ZPPlayerCardInfoView")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
function M.new(view,mainView)
|
||||||
|
|
||||||
|
setmetatable(M, {__index = PlayerCardInfoView})
|
||||||
|
local self = setmetatable({},{__index = M})
|
||||||
|
self.class = "PlayerCardInfoView"
|
||||||
|
self._view = view
|
||||||
|
self._mainView = mainView
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function M:UpdateFzList( fz_list ,ispaly,seat)
|
||||||
|
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)
|
||||||
|
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:GetController("c2").selectedIndex =1
|
||||||
|
fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card)
|
||||||
|
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,seat)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat)
|
||||||
|
|
||||||
|
elseif fz_list[i].type == RB_FZType.Wei 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"
|
||||||
|
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,seat)
|
||||||
|
|
||||||
|
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"
|
||||||
|
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,seat)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat)
|
||||||
|
|
||||||
|
elseif fz_list[i].type == RB_FZType.Ti then
|
||||||
|
|
||||||
|
local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4")
|
||||||
|
if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then
|
||||||
|
for j=1,4 do
|
||||||
|
fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for j=1,4 do
|
||||||
|
if j==4 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"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:playAnim(fzitem,fzcards, size,i,ispaly,seat)
|
||||||
|
if(ispaly == nil)then
|
||||||
|
ispaly =false
|
||||||
|
end
|
||||||
|
|
||||||
|
local isaddLast = false
|
||||||
|
if(ispaly and i == size)then --匹配最后一个牌
|
||||||
|
local faArray= fzitem:GetChild("chiwei1")
|
||||||
|
|
||||||
|
if(DataManager.CurrenRoom.room_config.people_num ==3)then
|
||||||
|
if(DataManager.CurrenRoom.self_player.seat == 1)then
|
||||||
|
if(seat == 2)then
|
||||||
|
faArray= fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray= fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 2) then
|
||||||
|
if(seat == 3)then
|
||||||
|
faArray= fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray= fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 3)then
|
||||||
|
if(seat == 1)then
|
||||||
|
faArray= fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray= fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if(faArray~=nil)then
|
||||||
|
faArray:AddChild(fzcards)
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
if(seat~=nil)then
|
||||||
|
isaddLast = self:isAddFirst(seat)
|
||||||
|
end
|
||||||
|
if(isaddLast)then
|
||||||
|
local index_postion = 0
|
||||||
|
self._area_fz_list:AddChildAt(fzitem,index_postion)
|
||||||
|
else
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:isAddFirst(seat)
|
||||||
|
local isaddLast = false
|
||||||
|
if(DataManager.CurrenRoom.room_config.people_num ==3)then
|
||||||
|
if(DataManager.CurrenRoom.self_player.seat == 1)then
|
||||||
|
if(seat == 2)then
|
||||||
|
isaddLast = true
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 2)then
|
||||||
|
if(seat == 3)then
|
||||||
|
isaddLast = true
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 3)then
|
||||||
|
if(seat == 1)then
|
||||||
|
isaddLast = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif DataManager.CurrenRoom.room_config.people_num ==2 then
|
||||||
|
isaddLast = true
|
||||||
|
end
|
||||||
|
return isaddLast
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:PlayingOutCardAnima(card)
|
||||||
|
coroutine.start(function()
|
||||||
|
coroutine.wait(0.1)
|
||||||
|
self:ClearOutCard()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateOutCardList(outcard,isShow,isMopai,seat)
|
||||||
|
if(isShow == nil) then
|
||||||
|
isShow = false
|
||||||
|
end
|
||||||
|
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"
|
||||||
|
else
|
||||||
|
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")
|
||||||
|
--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(DataManager.CurrenRoom.room_config.people_num ==3)then
|
||||||
|
if(seat ==2)then
|
||||||
|
seat = 3
|
||||||
|
elseif(seat == 3)then
|
||||||
|
seat =2
|
||||||
|
end
|
||||||
|
elseif DataManager.CurrenRoom.room_config.people_num ==2 then
|
||||||
|
seat = 3
|
||||||
|
end
|
||||||
|
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()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
--show_di_bg.visible = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
show_di_bg.visible = false
|
||||||
|
end
|
||||||
|
self._area_outcard_list:AddChild(outcards)
|
||||||
|
end
|
||||||
|
|
||||||
|
--弃牌
|
||||||
|
function M:UpdateQiPai( qi_list,ispaly,seat)
|
||||||
|
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(ispaly)then
|
||||||
|
if(i == #qi_list) then
|
||||||
|
if(DataManager.CurrenRoom.room_config.people_num ==2)then
|
||||||
|
qicards:GetTransition("t0"):Play()
|
||||||
|
else
|
||||||
|
if(DataManager.CurrenRoom.self_player.seat == 1)then
|
||||||
|
if(seat == 2)then
|
||||||
|
qicards:GetTransition("t0"):Play()
|
||||||
|
else
|
||||||
|
qicards:GetTransition("t1"):Play()
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 2)then
|
||||||
|
if(seat == 3)then
|
||||||
|
qicards:GetTransition("t0"):Play()
|
||||||
|
else
|
||||||
|
qicards:GetTransition("t1"):Play()
|
||||||
|
end
|
||||||
|
elseif(DataManager.CurrenRoom.self_player.seat == 3)then
|
||||||
|
if(seat == 1)then
|
||||||
|
qicards:GetTransition("t0"):Play()
|
||||||
|
else
|
||||||
|
qicards:GetTransition("t1"):Play()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
qicards:GetTransition("t0"):Play()
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._area_qipai_list:AddChild(qicards)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,503 @@
|
||||||
|
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})
|
||||||
|
self.class = "PlayerSelfCardInfoView"
|
||||||
|
self._view = view
|
||||||
|
self._mainView = mainView
|
||||||
|
self._full = true
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:onTouchBegin(context)
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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:ClearMpList(mpList)
|
||||||
|
local tempList={}
|
||||||
|
for k,v in pairs(mpList) do
|
||||||
|
if #v>0 then
|
||||||
|
table.insert(tempList,v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return tempList
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:__OnDragEnd(context)
|
||||||
|
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
|
||||||
|
-- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat)
|
||||||
|
local currentCtrS=IsHasDictionary(card.card_item,DataManager.CurrenRoom.self_player.currentNotPutCardList)
|
||||||
|
if currentCtrS==nil then currentCtrS=false end
|
||||||
|
if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) and currentCtrS==false then
|
||||||
|
button.touchable = false
|
||||||
|
self.outcard_button = card
|
||||||
|
self:UpdateIsOnClick(false)
|
||||||
|
self._mainView:OutCard(card.card_item)
|
||||||
|
else
|
||||||
|
local isChangeCard = false
|
||||||
|
self.outcard_button = nil
|
||||||
|
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
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local CountCards = {}
|
||||||
|
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
|
||||||
|
else
|
||||||
|
CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
CountCards=self:ClearMpList(CountCards)
|
||||||
|
|
||||||
|
local minmark = 1
|
||||||
|
local maxmark = #self.card_list
|
||||||
|
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
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<12 then
|
||||||
|
list_remove(self.card_list,card)
|
||||||
|
local num = 0
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
else
|
||||||
|
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)
|
||||||
|
isChangeCard = true
|
||||||
|
elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<12 then
|
||||||
|
list_remove(self.card_list,card)
|
||||||
|
local num = 0
|
||||||
|
for i=1,#self.card_list do
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
isChangeCard = true
|
||||||
|
else
|
||||||
|
local MoveCard = false
|
||||||
|
local MoveCardPos = 0
|
||||||
|
local MoveCardY = 0
|
||||||
|
for i=1,#CountCards do
|
||||||
|
if CountCards[i] then
|
||||||
|
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
|
||||||
|
|
||||||
|
MoveCardPos = i
|
||||||
|
MoveCardY = #CountCards[i]+1
|
||||||
|
MoveCard = true
|
||||||
|
list_remove(self.card_list,card)
|
||||||
|
end
|
||||||
|
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 _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) +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
|
||||||
|
local num = 0
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if MoveCardPos > card.index_X then
|
||||||
|
MoveCardPos = MoveCardPos-1
|
||||||
|
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 then
|
||||||
|
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
|
||||||
|
--向下移动
|
||||||
|
if MoveCardindex == -1 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
|
||||||
|
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
isChangeCard = true
|
||||||
|
else
|
||||||
|
isChangeCard = false
|
||||||
|
self._area_handcard_list:AddChild(button)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
if isChangeCard ==true then
|
||||||
|
self:SendChangeCard()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateOutCardList(outcard,isShow,isMopai,seat)
|
||||||
|
if(isShow == nil) then
|
||||||
|
isShow = false
|
||||||
|
end
|
||||||
|
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"
|
||||||
|
else
|
||||||
|
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")
|
||||||
|
-- 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
|
||||||
|
else
|
||||||
|
show_di_bg.visible = false
|
||||||
|
outcards:GetTransition("cpai"..seat):Play()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
--show_di_bg.visible = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
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()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._area_qipai_list:AddChild(qicards)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--摸牌动画
|
||||||
|
function M:PlayingOutCardAnima( card)
|
||||||
|
coroutine.start(function()
|
||||||
|
coroutine.wait(0.1)
|
||||||
|
self:ClearOutCard()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateFzList( fz_list ,ispaly)
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
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
|
||||||
|
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)--]]
|
||||||
|
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)
|
||||||
|
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"
|
||||||
|
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)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
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==4 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"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--出牌提示动画
|
||||||
|
function M:ChuPaiTiShi()
|
||||||
|
if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local chu_player = DataManager.CurrenRoom.self_player
|
||||||
|
local selfplayeTable = {}
|
||||||
|
selfplayeTable.handcard_list = chu_player.handcard_list
|
||||||
|
selfplayeTable.fz_list = chu_player.fz_list
|
||||||
|
selfplayeTable.tiCount = chu_player.tiCount
|
||||||
|
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]
|
||||||
|
list_remove(player.handcard_list, card)
|
||||||
|
local _player = membe_deep_clone(player)
|
||||||
|
local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom)
|
||||||
|
local isKan = false
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #tingList > 0 and isKan == false then
|
||||||
|
|
||||||
|
mark_ting[#mark_ting+1] = card
|
||||||
|
end
|
||||||
|
table.insert(player.handcard_list, card)
|
||||||
|
table.sort( player.handcard_list, ViewUtil.HandCardSort)
|
||||||
|
end
|
||||||
|
-- print("ChuPaiTiShi",#mark_ting)
|
||||||
|
--pt(mark_ting)
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
local Protocol = {
|
||||||
|
|
||||||
|
|
||||||
|
-- 出牌
|
||||||
|
GAME_DIS_CARD = "611",
|
||||||
|
-- 提示选择行为
|
||||||
|
GAME_ACTION = "612",
|
||||||
|
|
||||||
|
-- 通知服务器手牌队形改变
|
||||||
|
GAME_CHANGE_CARD = "613",
|
||||||
|
-- 通知服务器牌字体改变
|
||||||
|
GAME_CHANGE_TYPEfACE = "615",
|
||||||
|
|
||||||
|
-- 发牌协议
|
||||||
|
GAME_EVT_PLAYER_DEAL = "811",
|
||||||
|
|
||||||
|
-- 出牌事件
|
||||||
|
GAME_EVT_DISCARD = "812",
|
||||||
|
|
||||||
|
-- 出牌提示事件
|
||||||
|
GAME_EVT_DISCARD_TIP = "813",
|
||||||
|
|
||||||
|
-- 放子提示事件
|
||||||
|
GAME_EVT_FZTIPS = "814",
|
||||||
|
|
||||||
|
-- action 事件
|
||||||
|
GAME_EVT_ACTION = "815",
|
||||||
|
|
||||||
|
-- 胡牌事件
|
||||||
|
GAME_EVT_HU = "816",
|
||||||
|
|
||||||
|
-- 结算
|
||||||
|
GAME_EVT_RESULT1 = "817",
|
||||||
|
|
||||||
|
-- 弃牌
|
||||||
|
GAME_EVT_QIPAI = "818",
|
||||||
|
|
||||||
|
-- 抓牌
|
||||||
|
GAME_EVT_DRAW = "819",
|
||||||
|
|
||||||
|
-- 转盘指向事件
|
||||||
|
GAME_EVT_CHANGE_ACTIVE_PLAYER = "820",
|
||||||
|
--第二十一张牌
|
||||||
|
GAME_EVT_ADD_CARD = "821",
|
||||||
|
|
||||||
|
GAME_EVT_Send_Piao = "1015",
|
||||||
|
GAME_EVT_Piao_Tip = "2031",
|
||||||
|
GAME_EVT_Piao_Action = "2032",
|
||||||
|
|
||||||
|
GAME_XIPAI = "20836",
|
||||||
|
GAME_EVENT_XIPAI = "20837",
|
||||||
|
GAME_EVENT_NOTIFY_XIPAI = "20838",
|
||||||
|
}
|
||||||
|
|
||||||
|
return Protocol
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
local RunBeard_GameEvent = {
|
||||||
|
-- 换座
|
||||||
|
|
||||||
|
-- 发牌
|
||||||
|
SendCards = "SendCards",
|
||||||
|
|
||||||
|
-- 胡牌
|
||||||
|
ZPHuCard = "ZPHuCard",
|
||||||
|
-- 结算事件
|
||||||
|
ZPResult1 = "ZPResult1",
|
||||||
|
-- 大结算事件
|
||||||
|
ZPResult2 = "ZPResult2",
|
||||||
|
|
||||||
|
|
||||||
|
EventDicelCard ="EventDicelCard",
|
||||||
|
OnEventTake = "OnEventTake",
|
||||||
|
|
||||||
|
OnEcentRecond = "OnEcentRecond",
|
||||||
|
|
||||||
|
EventTurn = "EventTurn",
|
||||||
|
|
||||||
|
OutHint = "OutHint",
|
||||||
|
|
||||||
|
|
||||||
|
GetCard = "GetCard",
|
||||||
|
|
||||||
|
OutCard = "OutCard",
|
||||||
|
|
||||||
|
FangziAction = "FangziAction",
|
||||||
|
|
||||||
|
FZTips = "FZTips",
|
||||||
|
QiCard = "QiCard",
|
||||||
|
AddCard = "AddCard",
|
||||||
|
|
||||||
|
OnPiaoTips="OnPiaoTips",
|
||||||
|
OnPiaoAction="OnPiaoAction",
|
||||||
|
EventXiPai="EventXiPai",
|
||||||
|
|
||||||
|
}
|
||||||
|
return RunBeard_GameEvent
|
||||||
|
|
@ -0,0 +1,823 @@
|
||||||
|
require('Game.View.ResultView')
|
||||||
|
local PendulumRule = import('.main.PendulumRule')
|
||||||
|
local RunBeard_ResultView = {}
|
||||||
|
|
||||||
|
local M = RunBeard_ResultView
|
||||||
|
|
||||||
|
function RunBeard_ResultView.new(blur_view, index)
|
||||||
|
setmetatable(M, {__index = ResultView})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.class = 'RunBeard_ResultView'
|
||||||
|
self._currenIndex = 0
|
||||||
|
if index ~= 1 then
|
||||||
|
self._blur_view = blur_view
|
||||||
|
end
|
||||||
|
self._close_zone = false
|
||||||
|
|
||||||
|
self:init('ui://Extend_Poker_FanPaoFa/clearing')
|
||||||
|
self.xiPaiCtr=self._view:GetController("xipai")
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init(url)
|
||||||
|
ResultView.init(self, url)
|
||||||
|
local btn_share = self._view:GetChild('btn_share')
|
||||||
|
btn_share.onClick:Set(
|
||||||
|
function()
|
||||||
|
ShareScreenShot()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:InitData(over, room, result, total_result, callback)
|
||||||
|
local _overCtr = self._view:GetController('over')
|
||||||
|
local btn_confirm = self._view:GetChild('btn_confirm')
|
||||||
|
local btn_result = self._view:GetChild('btn_showResult')
|
||||||
|
local _btnCtr = self._view:GetController('button')
|
||||||
|
local _sdkCtr = self._view:GetController('sdk')
|
||||||
|
local _icon = self._view:GetChild('win_base')
|
||||||
|
local btn_close = self._view:GetChild('btn_close')
|
||||||
|
self._view:GetChild('tex_roomnum').text = room.room_id
|
||||||
|
self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time())
|
||||||
|
|
||||||
|
|
||||||
|
local round=DataManager.CurrenRoom.room_config.config.times or 1
|
||||||
|
local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai
|
||||||
|
if xpconfig and round>1 then
|
||||||
|
self.xiPaiCtr.selectedIndex=1
|
||||||
|
else
|
||||||
|
self.xiPaiCtr.selectedIndex=0
|
||||||
|
end
|
||||||
|
|
||||||
|
local xipai=self._view:GetChild("btn_xipai")
|
||||||
|
xipai.touchable=true
|
||||||
|
xipai.onClick:Add(function()
|
||||||
|
local xiPaiCallBack=function ()
|
||||||
|
xipai.touchable=false
|
||||||
|
self.xiPaiCtr.selectedIndex=0
|
||||||
|
ViewUtil.ErrorTip(1000000,"申请洗牌成功")
|
||||||
|
end
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:SendXiPaiAction(xiPaiCallBack)
|
||||||
|
end)
|
||||||
|
if result and result.xipai_score then
|
||||||
|
--xipai.text="洗牌 积分x"..result.xipai_score
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if result ~= nil and result.liuju == true then
|
||||||
|
_icon.icon = 'ui://Main_RunBeard/liuju'
|
||||||
|
_btnCtr.selectedIndex = 0
|
||||||
|
_sdkCtr.selectedIndex = 1
|
||||||
|
_overCtr.selectedIndex = 2
|
||||||
|
|
||||||
|
if over ~= 1 then
|
||||||
|
btn_confirm.onClick:Add(
|
||||||
|
function()
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:PlayerReady()
|
||||||
|
self:Close()
|
||||||
|
|
||||||
|
if callback then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, result, nil, over)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
self.xiPaiCtr.selectedIndex=0
|
||||||
|
_btnCtr.selectedIndex = 1
|
||||||
|
_sdkCtr.selectedIndex = 1
|
||||||
|
btn_result.onClick:Add(
|
||||||
|
function()
|
||||||
|
_overCtr.selectedIndex = 3
|
||||||
|
_btnCtr.selectedIndex = 0
|
||||||
|
_sdkCtr.selectedIndex = 0
|
||||||
|
end
|
||||||
|
)
|
||||||
|
btn_close.onClick:Add(
|
||||||
|
function()
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, result, total_result.info_list, over)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if over == 0 and result.liuju == false then
|
||||||
|
_icon.icon = 'ui://Main_RunBeard/jiesuan'
|
||||||
|
_btnCtr.selectedIndex = 0
|
||||||
|
_sdkCtr.selectedIndex = 1
|
||||||
|
_overCtr.selectedIndex = 0
|
||||||
|
btn_confirm.onClick:Add(
|
||||||
|
function()
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:PlayerReady()
|
||||||
|
self:Close()
|
||||||
|
|
||||||
|
if callback then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, result, nil, over)
|
||||||
|
elseif over == 1 and result.liuju == false then
|
||||||
|
_icon.icon = 'ui://Main_RunBeard/jiesuan'
|
||||||
|
_btnCtr.selectedIndex = 1
|
||||||
|
_sdkCtr.selectedIndex = 1
|
||||||
|
_overCtr.selectedIndex = 0
|
||||||
|
btn_result.onClick:Add(
|
||||||
|
function()
|
||||||
|
_overCtr.selectedIndex = 3
|
||||||
|
_btnCtr.selectedIndex = 0
|
||||||
|
_sdkCtr.selectedIndex = 0
|
||||||
|
end
|
||||||
|
)
|
||||||
|
btn_close.onClick:Add(
|
||||||
|
function()
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, result, total_result.info_list, over)
|
||||||
|
else
|
||||||
|
if result ~= nil then
|
||||||
|
if result.liuju == false then
|
||||||
|
_icon.icon = 'ui://Main_RunBeard/jiesuan'
|
||||||
|
over = 2
|
||||||
|
_overCtr.selectedIndex = 3
|
||||||
|
btn_close.onClick:Add(
|
||||||
|
function()
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, nil, total_result.info_list, over)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_icon.icon = 'ui://Main_RunBeard/jiesuan'
|
||||||
|
over = 2
|
||||||
|
_overCtr.selectedIndex = 3
|
||||||
|
self.xiPaiCtr.selectedIndex=0
|
||||||
|
btn_close.onClick:Add(
|
||||||
|
function()
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:AddClearItem(room, nil, total_result.info_list, over)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:AddClearItem(room, data, total_data, over)
|
||||||
|
local n = over + 1
|
||||||
|
local list_view1 = self._view:GetChild('player_list')
|
||||||
|
local list_view2 = self._view:GetChild('player_list_2')
|
||||||
|
|
||||||
|
if data ~= nil and data.liuju == true then
|
||||||
|
self:FillLiuJuItemData(room, data)
|
||||||
|
if over == 1 then
|
||||||
|
self:FillItemData2(room, total_data, list_view2)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if 0 == over or 1 == over and data.liuju == false then
|
||||||
|
self:FillItemData(room, data, list_view1)
|
||||||
|
if 1 == over then
|
||||||
|
self:FillItemData2(room, total_data, list_view2)
|
||||||
|
end
|
||||||
|
elseif 2 == over then
|
||||||
|
self:FillItemData2(room, total_data, list_view2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:GetPos(room, seat)
|
||||||
|
return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num)
|
||||||
|
end
|
||||||
|
function M:FillLiuJuItemData(room, data)
|
||||||
|
local qipai_list = self._view:GetChild('qipai_listl')
|
||||||
|
local _dipaiC = self._view:GetController('qipai')
|
||||||
|
qipai_list:RemoveChildrenToPool()
|
||||||
|
if data.throw_card ~= nil and #data.throw_card > 0 then
|
||||||
|
_dipaiC.selectedIndex = 1
|
||||||
|
local hand_card = PendulumRule.GetHandCard(data.throw_card, 3)
|
||||||
|
for k = 1, #hand_card do
|
||||||
|
local cards = qipai_list:AddItemFromPool()
|
||||||
|
for j = 1, #hand_card[k] do
|
||||||
|
cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_dipaiC.selectedIndex = 0
|
||||||
|
end
|
||||||
|
for i = 1, #data.info_list do
|
||||||
|
if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then
|
||||||
|
local card_list
|
||||||
|
if #data.info_list == 2 then
|
||||||
|
card_list = self._view:GetChild('card_list_2')
|
||||||
|
else
|
||||||
|
if self:GetPos(room, data.info_list[i].seat) == 2 then
|
||||||
|
card_list = self._view:GetChild('card_list_1')
|
||||||
|
else
|
||||||
|
card_list = self._view:GetChild('card_list_3')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
card_list:RemoveChildrenToPool()
|
||||||
|
for k = 1, #data.info_list[i].opCardList do
|
||||||
|
local fztype = data.info_list[i].opCardList[k].type
|
||||||
|
if fztype == RB_FZType.Kan then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3)
|
||||||
|
for k = 1, #hand_card do
|
||||||
|
local item = card_list:AddItemFromPool()
|
||||||
|
for j = 1, #hand_card[k] do
|
||||||
|
item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local haoNameList={"散毫","清溜","内毫","外毫"}
|
||||||
|
local huxiList={40,30,20,10}
|
||||||
|
function M:FillItemData(room, data, item)
|
||||||
|
local dipai_list = self._view:GetChild('dipai_list')
|
||||||
|
dipai_list:RemoveChildren(0, -1, true)
|
||||||
|
if data.left_card ~= nil and #data.left_card > 0 then
|
||||||
|
for i = 1, #data.left_card do
|
||||||
|
local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai')
|
||||||
|
dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i])
|
||||||
|
dipai_list:AddChild(dipais)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local qipai_list = self._view:GetChild('qipai_list')
|
||||||
|
local _dipaiC = self._view:GetController('qipai')
|
||||||
|
qipai_list:RemoveChildrenToPool()
|
||||||
|
if data.throw_card ~= nil and #data.throw_card > 0 then
|
||||||
|
_dipaiC.selectedIndex = 1
|
||||||
|
local hand_card = PendulumRule.GetHandCard(data.throw_card, 3)
|
||||||
|
for k = 1, #hand_card do
|
||||||
|
local cards = qipai_list:AddItemFromPool()
|
||||||
|
for j = 1, #hand_card[k] do
|
||||||
|
cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_dipaiC.selectedIndex = 0
|
||||||
|
end
|
||||||
|
local info_list = data.info_list
|
||||||
|
local Yes_win = false
|
||||||
|
local win_data = {}
|
||||||
|
for i = 1, #info_list do
|
||||||
|
if info_list[i].is_win == true then
|
||||||
|
Yes_win = true
|
||||||
|
win_data = info_list[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--printlog("win_data===>>>")
|
||||||
|
--pt(win_data)
|
||||||
|
if win_data.seat == room.self_player.seat then
|
||||||
|
self._view:GetChild('show_win').visible = true
|
||||||
|
self._view:GetChild('show_low').visible = false
|
||||||
|
else
|
||||||
|
self._view:GetChild('show_win').visible = false
|
||||||
|
self._view:GetChild('show_low').visible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if Yes_win == true then
|
||||||
|
local isWin_Card = true
|
||||||
|
local p = room:GetPlayerBySeat(win_data.seat)
|
||||||
|
if p.self_user.account_id == room.owner_id then
|
||||||
|
self._view:GetController('owner').selectedIndex = 1
|
||||||
|
end
|
||||||
|
if p.seat == room.banker_seat then
|
||||||
|
self._view:GetController('bank').selectedIndex = 1
|
||||||
|
end
|
||||||
|
self._view:GetChild('WinerName').text = p.self_user.nick_name
|
||||||
|
--self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤'
|
||||||
|
self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi
|
||||||
|
--self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun
|
||||||
|
--self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun
|
||||||
|
if win_data.round_score >= 0 then
|
||||||
|
self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score
|
||||||
|
self._view:GetChild('score').grayed = false
|
||||||
|
else
|
||||||
|
self._view:GetChild('score').text = '游戏分:' .. win_data.round_score
|
||||||
|
self._view:GetChild('score').grayed = true
|
||||||
|
end
|
||||||
|
local hp_info = win_data.hp_info
|
||||||
|
if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then
|
||||||
|
local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值
|
||||||
|
self._view:GetChild('tili_score').visible = true
|
||||||
|
self._view:GetChild('tili_title').visible = true
|
||||||
|
if (round_actual_hp > 0) then
|
||||||
|
self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp
|
||||||
|
self._view:GetChild('tili_score').grayed = false
|
||||||
|
else
|
||||||
|
self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp
|
||||||
|
self._view:GetChild('tili_score').grayed = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then
|
||||||
|
local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限
|
||||||
|
if (isupper_limit) then
|
||||||
|
self._view:GetChild('yidashangxian').text = '已达上限'
|
||||||
|
else
|
||||||
|
self._view:GetChild('yidashangxian').text = ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local btn_head = self._view:GetChild('btn_head')
|
||||||
|
ImageLoad.Load(p.self_user.head_url, btn_head._iconObject)
|
||||||
|
local fullname_list = self._view:GetChild('fullname_list')
|
||||||
|
fullname_list:RemoveChildren(0, -1, true)
|
||||||
|
if win_data.mingtang ~= nil and #win_data.mingtang > 0 then
|
||||||
|
for i = 1, #win_data.mingtang do
|
||||||
|
local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_FanPaoFa/FullName')
|
||||||
|
dipais:GetChild('n0').icon = 'ui://Extend_Poker_FanPaoFa/hu_' .. win_data.mingtang[i].mingtang
|
||||||
|
--[[if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then
|
||||||
|
dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番'
|
||||||
|
elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then
|
||||||
|
dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤'
|
||||||
|
elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then
|
||||||
|
dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍'
|
||||||
|
end--]]
|
||||||
|
if win_data.mingtang[i].score ~= 0 then
|
||||||
|
dipais:GetChild('n2').text = win_data.mingtang[i].score .. '胡息'
|
||||||
|
end
|
||||||
|
fullname_list:AddChild(dipais)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local card_list = self._view:GetChild('card_list')
|
||||||
|
card_list:RemoveChildrenToPool()
|
||||||
|
if #win_data.cardList > 0 then
|
||||||
|
for i = 1, #win_data.cardList do
|
||||||
|
-- 1 是对子 2 是三个的
|
||||||
|
local fztype = win_data.cardList[i].type
|
||||||
|
if fztype == 1 then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '将'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 0
|
||||||
|
if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1
|
||||||
|
end
|
||||||
|
for j = 1, 2 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i]['card'..j])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '顺'
|
||||||
|
if
|
||||||
|
win_data.cardList[i].card1 == win_data.cardList[i].card2 and
|
||||||
|
win_data.cardList[i].card1 == win_data.cardList[i].card3
|
||||||
|
then
|
||||||
|
cards:GetChild('card_type').text = '碰'
|
||||||
|
end
|
||||||
|
if fztype == 4 then
|
||||||
|
cards:GetChild('card_type').text = '歪'
|
||||||
|
end
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 1
|
||||||
|
cards:GetChild('card_1').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1)
|
||||||
|
cards:GetChild('card_2').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2)
|
||||||
|
cards:GetChild('card_3').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3)
|
||||||
|
if isWin_Card == true then
|
||||||
|
if win_data.cardList[i].card1 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1
|
||||||
|
elseif win_data.cardList[i].card2 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 2
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1
|
||||||
|
elseif win_data.cardList[i].card3 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 3
|
||||||
|
cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i = 1, #win_data.opCardList do
|
||||||
|
local fztype = win_data.opCardList[i].type
|
||||||
|
if fztype == RB_FZType.Chi then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '顺'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 1
|
||||||
|
cards:GetChild('card_1').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
cards:GetChild('card_2').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2)
|
||||||
|
cards:GetChild('card_3').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3)
|
||||||
|
--[[if isWin_Card == true then
|
||||||
|
if win_data.opCardList[i].card1 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
elseif win_data.opCardList[i].card2 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 2
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
elseif win_data.opCardList[i].card3 == win_data.win_card then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 3
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end
|
||||||
|
|
||||||
|
end--]]
|
||||||
|
elseif fztype == RB_FZType.Peng then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '碰'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 1
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
end
|
||||||
|
--[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end--]]
|
||||||
|
elseif fztype == RB_FZType.Kan then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '坎'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 1
|
||||||
|
--[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end--]]
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '歪'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 1
|
||||||
|
--[[ if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end--]]
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Pao then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '跑'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 2
|
||||||
|
--[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end--]]
|
||||||
|
for j = 1, 4 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Ti then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '溜'
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi
|
||||||
|
cards:GetController('c1').selectedIndex = 2
|
||||||
|
--[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = 1
|
||||||
|
cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1
|
||||||
|
end--]]
|
||||||
|
for j = 1, 4 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if #win_data.hand_card > 0 then
|
||||||
|
for i = 1, #win_data.hand_card, 4 do
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = '散'
|
||||||
|
cards:GetChild('card_huxi').text = 0
|
||||||
|
cards:GetController('c1').selectedIndex = 2
|
||||||
|
for j = 0, 3 do
|
||||||
|
if (i + j) <= #win_data.hand_card then
|
||||||
|
cards:GetChild('card_' .. (j + 1)).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j])
|
||||||
|
if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then
|
||||||
|
isWin_Card = false
|
||||||
|
cards:GetController('hu').selectedIndex = j + 1
|
||||||
|
cards:GetChild('card_huxi').text = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if win_data.haoList and #win_data.haoList then
|
||||||
|
local tempHaoList={}
|
||||||
|
for i=1,#win_data.haoList do
|
||||||
|
if win_data.haoList[i].hao>0 then
|
||||||
|
if tempHaoList[win_data.haoList[i].hao]==nil then
|
||||||
|
tempHaoList[win_data.haoList[i].hao]={}
|
||||||
|
end
|
||||||
|
table.insert(tempHaoList[win_data.haoList[i].hao],win_data.haoList[i])
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
for k,v in pairs(tempHaoList) do
|
||||||
|
local count=#v
|
||||||
|
printlog(count)
|
||||||
|
if count<5 then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_type').text = haoNameList[tonumber(k)]
|
||||||
|
local haoNum=huxiList[tonumber(k)]
|
||||||
|
if DataManager.CurrenRoom.room_config.config.hao_config and DataManager.CurrenRoom.room_config.config.hao_config==1 then
|
||||||
|
haoNum=(haoNum+10)*count
|
||||||
|
else
|
||||||
|
haoNum=(haoNum)*count
|
||||||
|
end
|
||||||
|
cards:GetChild('card_huxi').text = haoNum
|
||||||
|
cards:GetController('c1').selectedIndex = 2
|
||||||
|
for i=1,count do
|
||||||
|
cards:GetChild('card_' .. i).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/201_', v[i].hao_card)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
item:RemoveChildrenToPool()
|
||||||
|
for i = 1, #info_list do
|
||||||
|
if info_list[i].is_win == false then
|
||||||
|
local player = item:AddItemFromPool()
|
||||||
|
local p = room:GetPlayerBySeat(info_list[i].seat)
|
||||||
|
if p.self_user.account_id == room.owner_id then
|
||||||
|
player:GetController('owner').selectedIndex = 1
|
||||||
|
end
|
||||||
|
if p.seat == room.banker_seat then
|
||||||
|
player:GetController('bank').selectedIndex = 1
|
||||||
|
end
|
||||||
|
local btn_head = player:GetChild('btn_head')
|
||||||
|
ImageLoad.Load(p.self_user.head_url, btn_head._iconObject)
|
||||||
|
player:GetChild('playerName').text = p.self_user.nick_name
|
||||||
|
if info_list[i].round_score >= 0 then
|
||||||
|
player:GetChild('score').text = '+' .. info_list[i].round_score
|
||||||
|
player:GetChild('score').grayed = false
|
||||||
|
else
|
||||||
|
player:GetChild('score').text = info_list[i].round_score
|
||||||
|
player:GetChild('score').grayed = true
|
||||||
|
end
|
||||||
|
local hp_info = info_list[i].hp_info
|
||||||
|
if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then
|
||||||
|
local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值
|
||||||
|
player:GetChild('tili_score').visible = true
|
||||||
|
player:GetChild('tili_title').visible = true
|
||||||
|
if (round_actual_hp > 0) then
|
||||||
|
player:GetChild('tili_score').text = '+' .. round_actual_hp
|
||||||
|
player:GetChild('tili_score').grayed = false
|
||||||
|
else
|
||||||
|
player:GetChild('tili_score').text = '' .. round_actual_hp
|
||||||
|
player:GetChild('tili_score').grayed = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then
|
||||||
|
local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限
|
||||||
|
if (isupper_limit) then
|
||||||
|
player:GetChild('yidashangxian').text = '已达上限'
|
||||||
|
else
|
||||||
|
player:GetChild('yidashangxian').text = ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local card_list = player:GetChild('card_list')
|
||||||
|
card_list:RemoveChildrenToPool()
|
||||||
|
for k = 1, #info_list[i].opCardList do
|
||||||
|
local fztype = info_list[i].opCardList[k].type
|
||||||
|
if fztype == RB_FZType.Chi then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
cards:GetChild('card_1').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
cards:GetChild('card_2').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2)
|
||||||
|
cards:GetChild('card_3').icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3)
|
||||||
|
elseif fztype == RB_FZType.Peng then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Kan then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 3 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Pao then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 4 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
elseif fztype == RB_FZType.Ti then
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, 4 do
|
||||||
|
cards:GetChild('card_' .. j).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #info_list[i].hand_card > 0 then
|
||||||
|
local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3)
|
||||||
|
for k = 1, #hand_card do
|
||||||
|
local cards = card_list:AddItemFromPool()
|
||||||
|
for j = 1, #hand_card[k] do
|
||||||
|
cards:GetChild('card_' .. (j)).icon =
|
||||||
|
self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillItemData2(room, data, list)
|
||||||
|
-- 赋值result_info,聊天室分享需要
|
||||||
|
local player_list = {}
|
||||||
|
for i = 1, #data do
|
||||||
|
player_list[i] = {}
|
||||||
|
local user = room:GetPlayerBySeat(data[i].seat).self_user
|
||||||
|
local p = room:GetPlayerBySeat(data[i].seat)
|
||||||
|
player_list[i].id = user.account_id
|
||||||
|
local total_score = data[i].total_score
|
||||||
|
player_list[i].hp_info = data[i].hp_info
|
||||||
|
player_list[i].score = total_score
|
||||||
|
player_list[i].house = room.owner_id == player_list[i].id and 1 or 0
|
||||||
|
player_list[i].nick = user.nick_name
|
||||||
|
player_list[i].head_url = user.head_url
|
||||||
|
local entrust = data[i].entrust
|
||||||
|
if entrust == nil then
|
||||||
|
entrust = false
|
||||||
|
end
|
||||||
|
player_list[i].entrust = entrust
|
||||||
|
player_list[i].param = {}
|
||||||
|
local wcount = 0
|
||||||
|
if (data[i].win_count ~= nil) then
|
||||||
|
wcount = data[i].win_count
|
||||||
|
end
|
||||||
|
local hxcount = 0
|
||||||
|
if (data[i].total_huxi ~= nil) then
|
||||||
|
hxcount = data[i].total_huxi
|
||||||
|
end
|
||||||
|
player_list[i].param[1] = {}
|
||||||
|
player_list[i].param[1].key = '胡牌次数:'
|
||||||
|
player_list[i].param[1].value = tostring(wcount)
|
||||||
|
player_list[i].param[2] = {}
|
||||||
|
player_list[i].param[2].key = '胡息总数:'
|
||||||
|
player_list[i].param[2].value = tostring(hxcount)
|
||||||
|
end
|
||||||
|
local round = room.room_config.round
|
||||||
|
self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list)
|
||||||
|
self:SetGSListlineGap(5)
|
||||||
|
self:InitBigResult(room, 26)
|
||||||
|
DataManager.CurrenRoom = nil
|
||||||
|
-- list:RemoveChildrenToPool()
|
||||||
|
-- for i =1, #data do
|
||||||
|
-- local total_score = room:GetTotalScore(data[i].total_score)
|
||||||
|
-- local item = list:AddItemFromPool()
|
||||||
|
-- local p = room:GetPlayerBySeat(data[i].seat)
|
||||||
|
-- if p.self_user.account_id == room.owner_id then
|
||||||
|
-- item:GetController("owner").selectedIndex = 1
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- local btn_head = item:GetChild("btn_head")
|
||||||
|
-- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject)
|
||||||
|
-- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次"
|
||||||
|
-- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi
|
||||||
|
-- --点赞
|
||||||
|
-- self:Click_zan(item, p.self_user.account_id)
|
||||||
|
|
||||||
|
-- item:GetChild("name").text = p.self_user.nick_name
|
||||||
|
|
||||||
|
-- local hp_info = data[i].hp_info
|
||||||
|
-- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then
|
||||||
|
-- -- --体力值
|
||||||
|
-- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值
|
||||||
|
-- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限
|
||||||
|
-- if(isupper_limit)then
|
||||||
|
-- item:GetChild("yidashangxian").text = "已达上限"
|
||||||
|
-- else
|
||||||
|
-- item:GetChild("yidashangxian").text = ""
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- local x = room:GetOriginScore(total_score)
|
||||||
|
-- if total_score >= 0 then
|
||||||
|
-- item:GetChild("score").text = "+"..x
|
||||||
|
-- item:GetChild("score").grayed = false
|
||||||
|
-- else
|
||||||
|
-- item:GetChild("score").text = x
|
||||||
|
-- item:GetChild("score").grayed = true
|
||||||
|
-- end
|
||||||
|
-- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then
|
||||||
|
-- item:GetController("bei") .selectedIndex=1
|
||||||
|
-- item:GetChild("sss").text = room.score_times
|
||||||
|
-- if(hp_info ~= nil)then
|
||||||
|
-- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值
|
||||||
|
-- total_score = round_actual_hp
|
||||||
|
-- end
|
||||||
|
-- if total_score >= 0 then
|
||||||
|
-- item:GetChild("score1").text = "+"..total_score
|
||||||
|
-- item:GetChild("score1").grayed = false
|
||||||
|
-- else
|
||||||
|
-- item:GetChild("score1").text = total_score
|
||||||
|
-- item:GetChild("score1").grayed = true
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- if #data ==3 then
|
||||||
|
-- if i ==1 then
|
||||||
|
-- if total_score >data[2].total_score and total_score >data[3].total_score then
|
||||||
|
-- item:GetController("winer") .selectedIndex=1
|
||||||
|
-- end
|
||||||
|
-- elseif i ==2 then
|
||||||
|
-- if total_score >data[1].total_score and total_score >data[3].total_score then
|
||||||
|
-- item:GetController("winer") .selectedIndex=1
|
||||||
|
-- end
|
||||||
|
-- elseif i ==3 then
|
||||||
|
-- if total_score >data[2].total_score and total_score >data[1].total_score then
|
||||||
|
-- item:GetController("winer") .selectedIndex=1
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- else
|
||||||
|
-- if i ==1 then
|
||||||
|
-- if total_score >data[2].total_score then
|
||||||
|
-- item:GetController("winer") .selectedIndex=1
|
||||||
|
-- end
|
||||||
|
-- elseif i ==2 then
|
||||||
|
-- if total_score >data[1].total_score then
|
||||||
|
-- item:GetController("winer") .selectedIndex=1
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- DataManager.CurrenRoom = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:LoadHead(p, room)
|
||||||
|
local btn_head = self._view:GetChild('btn_head')
|
||||||
|
for i = 1, #room.player_list do
|
||||||
|
local player = room.player_list[i]
|
||||||
|
if p.seat == player.seat and player.self_user.head_url ~= '' then
|
||||||
|
ImageLoad.Load(player.self_user.head_url, btn_head.icon)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function M:getCardItem(card_1, card_2)
|
||||||
|
local _room = DataManager.CurrenRoom
|
||||||
|
if _room ~= nil and _room.change_card_display ~= nil then
|
||||||
|
return card_1 .. _room.change_card_display .. card_2
|
||||||
|
else
|
||||||
|
return card_1 .. '2_' .. card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,648 @@
|
||||||
|
-- 检测牌是否存在
|
||||||
|
local function checkCard(eventCard, cardList, num)
|
||||||
|
if num == nil then
|
||||||
|
num = 1
|
||||||
|
end
|
||||||
|
local result = 0
|
||||||
|
for i = 1, #cardList do
|
||||||
|
if (cardList[i] == eventCard) then
|
||||||
|
result = result + 1
|
||||||
|
if (result == num) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 移除指定数量的牌
|
||||||
|
local function removeCard(cardList, card, count)
|
||||||
|
for i = 1, count do
|
||||||
|
list_remove(cardList, card)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function checkCardAndRomve(eventCard, cardList, num)
|
||||||
|
if (checkCard(eventCard, cardList, num)) then
|
||||||
|
removeCard(cardList, eventCard, num)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取列表中牌数量
|
||||||
|
local function cardNum(eventCard, cardList)
|
||||||
|
local result = 0
|
||||||
|
for i = 1, #cardList do
|
||||||
|
local card = cardList[i]
|
||||||
|
if (card == eventCard) then
|
||||||
|
result = result + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
local M = {
|
||||||
|
pair_count = 0,
|
||||||
|
cardList = nil,
|
||||||
|
stack = nil,
|
||||||
|
stackHuxi = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
function M:push(cardGroup)
|
||||||
|
self.stack[#self.stack + 1] = cardGroup
|
||||||
|
end
|
||||||
|
function M:pushhuxi(cardGroup)
|
||||||
|
self.stackHuxi[#self.stackHuxi + 1] = cardGroup
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:rollBack()
|
||||||
|
local cardGroup = self.stack[#self.stack]
|
||||||
|
table.remove(self.stack, #self.stack)
|
||||||
|
for _, card in ipairs(cardGroup) do
|
||||||
|
self.cardList[#self.cardList + 1] = card
|
||||||
|
end
|
||||||
|
table.sort(self.cardList)
|
||||||
|
end
|
||||||
|
-- 顺子
|
||||||
|
function M:tryShunzi1(card, player)
|
||||||
|
if card < 300 and card % 100 > 8 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if card == 106 then
|
||||||
|
printlog("jefesc:",card)
|
||||||
|
pt(self.cardList)
|
||||||
|
end
|
||||||
|
if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then
|
||||||
|
|
||||||
|
removeCard(self.cardList, card + 1, 1)
|
||||||
|
removeCard(self.cardList, card + 2, 1)
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
local cardGroup = {card, card + 1, card + 2}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- 2 7 10
|
||||||
|
function M:tryShunzi3(card, player)
|
||||||
|
if card % 100 == 2 then
|
||||||
|
if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card + 5, 1)
|
||||||
|
removeCard(self.cardList, card + 8, 1)
|
||||||
|
local cardGroup = {card, card + 5, card + 8}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- 坎
|
||||||
|
function M:tryKezi(card, player)
|
||||||
|
if (checkCard(card, self.cardList, 3)) then
|
||||||
|
removeCard(self.cardList, card, 3)
|
||||||
|
local cardGroup = {card, card, card}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
if self.drawCard~=card then
|
||||||
|
--printlog("tryKezi====>>>",self.drawCard,card)
|
||||||
|
_huxi = 3
|
||||||
|
end
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function M:tryPair(card)
|
||||||
|
if (self.pair_count > 0) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if (checkCard(card, self.cardList, 2)) then
|
||||||
|
removeCard(self.cardList, card, 2)
|
||||||
|
local cardGroup = {card, card}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
elseif (checkCard(card, self.cardList, 1)) then
|
||||||
|
if card % 100 <=9 then
|
||||||
|
if (checkCard(card+1, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+1, 1)
|
||||||
|
local cardGroup = {card, card+1}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 <=8 then
|
||||||
|
if (checkCard(card+2, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+2, 1)
|
||||||
|
local cardGroup = {card, card+2}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 >=2 then
|
||||||
|
if (checkCard(card-1, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-1, 1)
|
||||||
|
local cardGroup = {card, card-1}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 >=3 then
|
||||||
|
if (checkCard(card-2, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-2, 1)
|
||||||
|
local cardGroup = {card, card-2}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 ==2 then
|
||||||
|
if (checkCard(card+5, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+5, 1)
|
||||||
|
local cardGroup = {card, card+5}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card+8, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+8, 1)
|
||||||
|
local cardGroup = {card, card+8}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if card % 100 ==7 then
|
||||||
|
if (checkCard(card-5, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-5, 1)
|
||||||
|
local cardGroup = {card, card-5}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card+3, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+3, 1)
|
||||||
|
local cardGroup = {card, card+3}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 ==10 then
|
||||||
|
if (checkCard(card-8, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-8, 1)
|
||||||
|
local cardGroup = {card, card-8}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card-3, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-3, 1)
|
||||||
|
local cardGroup = {card, card-3}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:tryPair2(card)
|
||||||
|
if (self.pair_count > 0) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card, self.cardList, 1)) then
|
||||||
|
if card % 100 ==2 then
|
||||||
|
if (checkCard(card+5, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+5, 1)
|
||||||
|
local cardGroup = {card, card+5}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card+8, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+8, 1)
|
||||||
|
local cardGroup = {card, card+8}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if card % 100 ==7 then
|
||||||
|
if (checkCard(card-5, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-5, 1)
|
||||||
|
local cardGroup = {card, card-5}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card+3, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+3, 1)
|
||||||
|
local cardGroup = {card, card+3}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if card % 100 ==10 then
|
||||||
|
if (checkCard(card-8, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-8, 1)
|
||||||
|
local cardGroup = {card, card-8}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (checkCard(card-3, self.cardList, 1)) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-3, 1)
|
||||||
|
local cardGroup = {card, card-3}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 1
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
self.pair_count = 1
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function M:tryWin(player)
|
||||||
|
|
||||||
|
if #self.cardList == 0 then
|
||||||
|
if (self.pair_count == 1) then
|
||||||
|
return true
|
||||||
|
elseif self.pair_count == 2 and #self.stack==2 then
|
||||||
|
local tempPList={}
|
||||||
|
for i=1,#self.stack do
|
||||||
|
local card1=self.stack[i][1]
|
||||||
|
local card2=self.stack[i][2]
|
||||||
|
table.insert(tempPList,card1)
|
||||||
|
table.insert(tempPList,card2)
|
||||||
|
end
|
||||||
|
|
||||||
|
if #tempPList~=4 then return false end
|
||||||
|
|
||||||
|
table.sort(tempPList)
|
||||||
|
|
||||||
|
if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local activeCard = 0
|
||||||
|
for i = 1, #self.cardList do
|
||||||
|
if (self.cardList[i] == 201 or self.cardList[i] == 202) then
|
||||||
|
activeCard = self.cardList[i]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (activeCard == 0) then
|
||||||
|
activeCard = self.cardList[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
if (activeCard % 100 == 1) then
|
||||||
|
if self:tryShunzi1(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
if self:tryKezi(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair(activeCard) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair2(activeCard) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif activeCard % 100 == 2 then
|
||||||
|
if self:tryShunzi3(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
if self:tryKezi(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair(activeCard) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair2(activeCard) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryShunzi1(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
|
if self:tryKezi(activeCard, player) then
|
||||||
|
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair(activeCard) then
|
||||||
|
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryPair2(activeCard) then
|
||||||
|
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self.pair_count = 0
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self:tryShunzi1(activeCard, player) then
|
||||||
|
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init(self, player, cardInhand, addCard)
|
||||||
|
self.stack = {}
|
||||||
|
self.stackHuxi = {}
|
||||||
|
self.pair_count = 0
|
||||||
|
self.kong_count = 0
|
||||||
|
self.drawCard=0
|
||||||
|
self.cardList = membe_clone(cardInhand)
|
||||||
|
if addCard == nil then
|
||||||
|
self.kong_count = 1
|
||||||
|
else
|
||||||
|
self.kong_count = 0
|
||||||
|
self.cardList[#self.cardList + 1] = addCard
|
||||||
|
self.drawCard=addCard
|
||||||
|
end
|
||||||
|
table.sort(self.cardList)
|
||||||
|
return self:tryWin(player)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.tingPai(player, room)
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
local tingList = {}
|
||||||
|
local cardInhand = player.handcard_list
|
||||||
|
if not cardInhand or #cardInhand == 0 then
|
||||||
|
return tingList
|
||||||
|
end
|
||||||
|
local kan_huxi = 0
|
||||||
|
local kan_cards = {}
|
||||||
|
for j = 1, #player.fz_list do
|
||||||
|
for i = 1, #cardInhand do
|
||||||
|
if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then
|
||||||
|
kan_cards[#kan_cards + 1] = cardInhand[i]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #kan_cards > 0 then
|
||||||
|
for i = 1, #kan_cards do
|
||||||
|
kan_huxi = kan_huxi + 3
|
||||||
|
removeCard(cardInhand, kan_cards[i], 3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
player.tiCount = 0
|
||||||
|
player.paoCount = 0
|
||||||
|
|
||||||
|
|
||||||
|
for k = 100, 200, 100 do
|
||||||
|
for i = 1, 10 do
|
||||||
|
local tem = k + i
|
||||||
|
local result = init(self, player, cardInhand, tem)
|
||||||
|
if result then
|
||||||
|
--printlog("是否胡牌===>>>",tem)
|
||||||
|
end
|
||||||
|
|
||||||
|
local num = 0
|
||||||
|
for k = 1, #self.stackHuxi do
|
||||||
|
num = num + self.stackHuxi[k]
|
||||||
|
end
|
||||||
|
|
||||||
|
if result then
|
||||||
|
local num1 = 0
|
||||||
|
--pt(self.stackHuxi)
|
||||||
|
for k = 1, #self.stackHuxi do
|
||||||
|
num1 = num1 + self.stackHuxi[k]
|
||||||
|
--printlog(self.stackHuxi[k])
|
||||||
|
end
|
||||||
|
--printlog("胡息数量===>>>",player.hu_xi,num1,kan_huxi)
|
||||||
|
if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then
|
||||||
|
tingList[#tingList + 1] = tem
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
printlog("jefe2:")
|
||||||
|
pt(tingList)
|
||||||
|
return tingList
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:getHuxi(room)
|
||||||
|
if room.game_id == 301 then
|
||||||
|
return 8
|
||||||
|
end
|
||||||
|
if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then
|
||||||
|
return 15
|
||||||
|
elseif room.game_id == 26 then
|
||||||
|
return 10
|
||||||
|
elseif room.game_id == 29 then
|
||||||
|
if room.room_config.maxPlayers == 3 then
|
||||||
|
return 15
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:GetFzData(tem, ctype)
|
||||||
|
local huxi
|
||||||
|
|
||||||
|
if ctype == 1 then
|
||||||
|
huxi=1
|
||||||
|
elseif ctype == 2 then
|
||||||
|
huxi=1
|
||||||
|
elseif ctype == 3 then
|
||||||
|
huxi = 3
|
||||||
|
elseif ctype == 4 then
|
||||||
|
huxi = 3
|
||||||
|
elseif ctype == 5 then
|
||||||
|
huxi = 3
|
||||||
|
elseif ctype == 7 then
|
||||||
|
huxi = 5
|
||||||
|
end
|
||||||
|
return huxi
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
RB_FZType =
|
||||||
|
{
|
||||||
|
Chi = 1,
|
||||||
|
Peng = 2,
|
||||||
|
Kan = 3,
|
||||||
|
Wei = 4,
|
||||||
|
ChouWei=5,
|
||||||
|
Pao = 6,
|
||||||
|
Ti = 7,
|
||||||
|
HU = 8,
|
||||||
|
Bi = 9,
|
||||||
|
PengPao =10,
|
||||||
|
WeiPao =11,
|
||||||
|
WeiTi =12,
|
||||||
|
KanTi =13,
|
||||||
|
DuiZi = 14,
|
||||||
|
zhao = 15,
|
||||||
|
}
|
||||||
|
|
||||||
|
local FZTipList = {
|
||||||
|
tip_map_id = nil,
|
||||||
|
tip_map_type = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
local M = FZTipList
|
||||||
|
|
||||||
|
function M.new()
|
||||||
|
local self = {}
|
||||||
|
setmetatable(self,{__index = FZTipList})
|
||||||
|
self.tip_map_id = {}
|
||||||
|
self.tip_map_type = {}
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:AddTip(tip)
|
||||||
|
self.tip_map_id[tip.id] = tip
|
||||||
|
local tiplist = self.tip_map_type[tip.weight]
|
||||||
|
if not tiplist then
|
||||||
|
tiplist = {}
|
||||||
|
self.tip_map_type[tip.weight] = tiplist
|
||||||
|
end
|
||||||
|
tiplist[#tiplist+1] = tip
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
local HuTipView = {
|
||||||
|
_view_start_pos = nil,
|
||||||
|
_touch_start_pos = nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
local M = HuTipView
|
||||||
|
|
||||||
|
function M.new(main_view)
|
||||||
|
local self = {}
|
||||||
|
self.class = "HuTipView"
|
||||||
|
setmetatable(self,{__index = HuTipView})
|
||||||
|
self._main_view = main_view
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
local function SetObjEnabled(obj, enabled)
|
||||||
|
obj.visible = enabled
|
||||||
|
obj.touchable = enabled
|
||||||
|
end
|
||||||
|
function M:OnTouchBegin(context)
|
||||||
|
self._view_start_pos = Vector2(self._view.x, self._view.y)
|
||||||
|
self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y))
|
||||||
|
end
|
||||||
|
function M:OnTouchMove(context)
|
||||||
|
local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y))
|
||||||
|
local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y)
|
||||||
|
local posx = self._view_start_pos.x + dist.x
|
||||||
|
local posy = self._view_start_pos.y + dist.y
|
||||||
|
local max_x = self._main_view._view.width - self._view.width
|
||||||
|
local max_y = self._main_view._view.height - self._view.height
|
||||||
|
self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx
|
||||||
|
self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init()
|
||||||
|
self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip")
|
||||||
|
self._main_view._view:AddChild(self._view)
|
||||||
|
local width = self._view.width
|
||||||
|
local m_width = self._main_view._view.width
|
||||||
|
local m_height = self._main_view._view.height
|
||||||
|
-- self._view.x = 0.5 * m_width - 0.5 * width
|
||||||
|
self._view.x = 0
|
||||||
|
self._view.y = 0.7 * m_height
|
||||||
|
SetObjEnabled(self._view, false)
|
||||||
|
self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin))
|
||||||
|
self._view.onTouchMove:Add(handler(self, self.OnTouchMove))
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillData(cards)
|
||||||
|
local lst_card = self._view:GetChild("tingpai")
|
||||||
|
lst_card:RemoveChildrenToPool()
|
||||||
|
local num = #cards
|
||||||
|
if num > 0 then
|
||||||
|
if num > 4 and num < 28 then
|
||||||
|
self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38
|
||||||
|
self._view.height = 69 + (math.ceil(num / 5) - 1) * 56
|
||||||
|
end
|
||||||
|
for i = 1, num do
|
||||||
|
local item = lst_card:AddItemFromPool()
|
||||||
|
item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i]
|
||||||
|
end
|
||||||
|
SetObjEnabled(self._view, true)
|
||||||
|
else
|
||||||
|
SetObjEnabled(self._view, false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
|
||||||
|
|
||||||
|
local M = {
|
||||||
|
btn_card = nil,
|
||||||
|
card_item = 0,
|
||||||
|
Hierarchy = 0,
|
||||||
|
index_X = 0,
|
||||||
|
index_Y = 0,
|
||||||
|
isUser = false,
|
||||||
|
initPos = Vector2.zero
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function M.InitCardView(card_code, index_X, index_Y, type)
|
||||||
|
-- setmetatable(M, {__index = CardView})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self._room = DataManager.CurrenRoom
|
||||||
|
self.btn_card = self:InitUI(card_code, type)
|
||||||
|
self.card_item = card_code
|
||||||
|
self.index_X = index_X
|
||||||
|
self.index_Y = index_Y
|
||||||
|
self.btn_card.data = self
|
||||||
|
|
||||||
|
self:Init()
|
||||||
|
return self, self.btn_card
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Init()
|
||||||
|
self.card_width = 87
|
||||||
|
self.initPos = Vector2.zero
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:InitUI(card_code, type)
|
||||||
|
local card
|
||||||
|
if type == 0 then
|
||||||
|
card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card")
|
||||||
|
self.icon = card:GetChild("icon")
|
||||||
|
self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code)
|
||||||
|
self.icon:SetScale(self:getCardSize(), self:getCardSize())
|
||||||
|
card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize())
|
||||||
|
elseif type == 1 then
|
||||||
|
card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard")
|
||||||
|
self.icon = card:GetChild("icon")
|
||||||
|
if card_code == 0 then
|
||||||
|
self.icon = "ui://Main_RunBeard/202_1_300"
|
||||||
|
else
|
||||||
|
self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return card
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:GetCardItem(card_1, card_2)
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
if room.change_card_display ~= nil then
|
||||||
|
return card_1 .. room.change_card_display .. card_2
|
||||||
|
else
|
||||||
|
return card_1 .. "2_" .. card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:getCardSize()
|
||||||
|
if self._room.change_card_size ~= nil then
|
||||||
|
return self._room.change_card_size
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:getHandCardItem(card_1, card_2)
|
||||||
|
if self._room.change_card_display ~= nil then
|
||||||
|
if self._room.change_card_display == "1_" then
|
||||||
|
if self._room.change_card_size ~= nil then
|
||||||
|
self.card_width = 94 * self._room.change_card_size
|
||||||
|
else
|
||||||
|
self.card_width = 94
|
||||||
|
end
|
||||||
|
|
||||||
|
return card_1 .. "4_" .. card_2
|
||||||
|
end
|
||||||
|
if self._room.change_card_size ~= nil then
|
||||||
|
self.card_width = 87 * self._room.change_card_size
|
||||||
|
else
|
||||||
|
self.card_width = 87
|
||||||
|
end
|
||||||
|
return card_1 .. self._room.change_card_display .. card_2
|
||||||
|
else
|
||||||
|
if self._room.change_card_size ~= nil then
|
||||||
|
self.card_width = 90 * self._room.change_card_size
|
||||||
|
else
|
||||||
|
self.card_width = 90
|
||||||
|
end
|
||||||
|
return card_1 .. "6_" .. card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateKan()
|
||||||
|
self.btn_card.touchable = false
|
||||||
|
self.btn_card:GetController("Kan").selectedIndex = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateTing(isting)
|
||||||
|
self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateIcon()
|
||||||
|
self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item)
|
||||||
|
-- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02)
|
||||||
|
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()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.InitChiView(gamectr, view, cardInfo)
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self._room = DataManager.CurrenRoom
|
||||||
|
self.class = "ChiView"
|
||||||
|
self._gamectr = gamectr
|
||||||
|
self._mainView = view
|
||||||
|
self._cardInfo = cardInfo
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateChiView(list, tip_hu, callback, cardInfo)
|
||||||
|
self:ShowView(list, tip_hu, callback, cardInfo)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:ShowView(tiplist, tip_hu, callback, cardInfo)
|
||||||
|
local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice")
|
||||||
|
local list_choose = _pop_tip_choice:GetChild("Lst_choose")
|
||||||
|
_pop_tip_choice:GetChild("dibtn").onClick:Add(function()
|
||||||
|
_pop_tip_choice:Dispose()
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- --list 去重复的
|
||||||
|
if #tiplist == 1 then
|
||||||
|
_pop_tip_choice:GetController("bipai").selectedIndex = 3
|
||||||
|
end
|
||||||
|
|
||||||
|
local tip_list = membe_deep_clone(tiplist)
|
||||||
|
for i = 1, #tiplist do
|
||||||
|
for k = 1, #tip_list do
|
||||||
|
if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then
|
||||||
|
if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then
|
||||||
|
tip_list[i].weight = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
list_choose:RemoveChildrenToPool()
|
||||||
|
for i = 1, #tip_list do
|
||||||
|
if tip_list[i].weight ~=4 then
|
||||||
|
local item_choose = list_choose:AddItemFromPool()
|
||||||
|
self:SetIcon(item_choose, 2, tip_list[i].OpCard[1])
|
||||||
|
self:SetIcon(item_choose, 3, tip_list[i].OpCard[2])
|
||||||
|
self:SetIcon(item_choose, 1, tip_list[i].card)
|
||||||
|
|
||||||
|
item_choose.onClick:Add(function()
|
||||||
|
for k=1,list_choose.numChildren do
|
||||||
|
list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0
|
||||||
|
end
|
||||||
|
item_choose:GetController("zhong").selectedIndex = 1
|
||||||
|
if tip_list[i].bi_list ==nil then
|
||||||
|
callback(tip_list[i].id)
|
||||||
|
self:CloseTip()
|
||||||
|
else
|
||||||
|
self.bilist={}
|
||||||
|
self._chiid = tip_list[i].id
|
||||||
|
self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card)
|
||||||
|
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
list_choose:ResizeToFit(#tip_list)
|
||||||
|
_pop_tip_choice:GetChild("di1").width = list_choose.width+110
|
||||||
|
_pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100)
|
||||||
|
self._mainView:AddChild(_pop_tip_choice)
|
||||||
|
self._pop_tip_choice = _pop_tip_choice
|
||||||
|
end
|
||||||
|
--比牌显示
|
||||||
|
function M:CheckRatioCard(_tiplist,index,chicard,_biid)
|
||||||
|
if _biid ~=nil then
|
||||||
|
self.bilist={}
|
||||||
|
self.bilist[#self.bilist+1] = _biid
|
||||||
|
end
|
||||||
|
self._pop_tip_choice:GetController("bipai").selectedIndex = index
|
||||||
|
local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index)
|
||||||
|
Bilist_choose:RemoveChildrenToPool()
|
||||||
|
for i = 1, #_tiplist do
|
||||||
|
local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose")
|
||||||
|
local item_choose = Bilist_choose:AddChild(item)
|
||||||
|
self:SetIcon(item_choose, 2, _tiplist[i].opcard[1])
|
||||||
|
self:SetIcon(item_choose, 3, _tiplist[i].opcard[2])
|
||||||
|
self:SetIcon(item_choose, 1, chicard)
|
||||||
|
item_choose:GetController("zhong") .selectedIndex = 0
|
||||||
|
item_choose.onClick:Add(function()
|
||||||
|
for k=1,Bilist_choose.numChildren do
|
||||||
|
Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0
|
||||||
|
end
|
||||||
|
item_choose:GetController("zhong") .selectedIndex = 1
|
||||||
|
if _tiplist[i].bi_list ==nil then
|
||||||
|
if tip_hu then
|
||||||
|
local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel)
|
||||||
|
guo_msg.onOk:Add(function()
|
||||||
|
self.bilist[#self.bilist+1] = i-1
|
||||||
|
self._gamectr:SendAction(self._chiid,self.bilist)
|
||||||
|
guo_msg:Close()
|
||||||
|
self:CloseTip()
|
||||||
|
self._cardInfo:UpdateIsOnClick(false)
|
||||||
|
end)
|
||||||
|
guo_msg:Show()
|
||||||
|
else
|
||||||
|
self.bilist[#self.bilist+1] = i-1
|
||||||
|
self._gamectr:SendAction(self._chiid,self.bilist)
|
||||||
|
self:CloseTip()
|
||||||
|
self._cardInfo:UpdateIsOnClick(false)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
Bilist_choose:ResizeToFit(#_tiplist)
|
||||||
|
self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SetIcon(item, index, card)
|
||||||
|
item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card))
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:CloseTip()
|
||||||
|
if (self._pop_tip_choice) then
|
||||||
|
self._pop_tip_choice:Dispose()
|
||||||
|
self._pop_tip_choice = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,181 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local source_fz_03 = "ui://Main_RunBeard/Fz_0_3"
|
||||||
|
local source_fz_04 = "ui://Main_RunBeard/Fz_0_4"
|
||||||
|
local source_card = "ui://Main_RunBeard/202_"
|
||||||
|
|
||||||
|
function M:getCardItem(card_1, card_2)
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
if room.change_card_display ~= nil then
|
||||||
|
return card_1 .. room.change_card_display .. card_2
|
||||||
|
else
|
||||||
|
return card_1 .. "6_" .. card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.InitFzView(fz,isMy,isplay,index,count)
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
local item,fzcards
|
||||||
|
if fz.type ~= RB_FZType.Kan then
|
||||||
|
item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard
|
||||||
|
item:RemoveChildren(0, -1, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- local fzItem
|
||||||
|
if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then
|
||||||
|
fzcards = self:UpateChiBi(item,fz)
|
||||||
|
elseif fz.type == RB_FZType.Peng then
|
||||||
|
fzcards = self:UpdatePeng(item,fz)
|
||||||
|
elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then
|
||||||
|
fzcards = self:UpdateWei(item,fz,isMy)
|
||||||
|
elseif fz.type == RB_FZType.Ti then
|
||||||
|
fzcards = self:UpateTi(item,fz)
|
||||||
|
elseif fz.type == RB_FZType.Pao then
|
||||||
|
fzcards = self:UpatePao(item,fz)
|
||||||
|
end
|
||||||
|
|
||||||
|
if item ~= nil and fzcards ~= nil then
|
||||||
|
self:PlayEffect(item,fzcards,isplay,index,count)
|
||||||
|
end
|
||||||
|
|
||||||
|
return item,fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpateChiBi(item,fz)
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL(source_fz_03)
|
||||||
|
local cardId1,cardId2,cardId3
|
||||||
|
if #fz.opcard == 2 then
|
||||||
|
cardId1 = fz.card
|
||||||
|
cardId2 = fz.opcard[1]
|
||||||
|
cardId3 = fz.opcard[2]
|
||||||
|
else
|
||||||
|
cardId1 = fz.opcard[1]
|
||||||
|
cardId2 = fz.opcard[2]
|
||||||
|
cardId3 = fz.opcard[3]
|
||||||
|
end
|
||||||
|
fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1)
|
||||||
|
fzcards:GetController("c2").selectedIndex = 1
|
||||||
|
fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2)
|
||||||
|
-- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2]
|
||||||
|
fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3)
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
item:AddChildAt(fzcards, 0)
|
||||||
|
return fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdatePeng(item,fz)
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL(source_fz_03)
|
||||||
|
for j = 1, 3 do
|
||||||
|
fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1])
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
item:AddChildAt(fzcards, 0)
|
||||||
|
return fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateWei(item,fz,isMy)
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL(source_fz_03)
|
||||||
|
--fzcards:GetController("c1").selectedIndex=1
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
for j = 1, 3 do
|
||||||
|
if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then
|
||||||
|
if j == 3 then
|
||||||
|
fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1])
|
||||||
|
else
|
||||||
|
fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
--未勾选明偎
|
||||||
|
-- if isMy then
|
||||||
|
-- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1])
|
||||||
|
-- fzcards:GetController("c1").selectedIndex = 1
|
||||||
|
-- else
|
||||||
|
fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300"
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
item:AddChildAt(fzcards,0)
|
||||||
|
return fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpateTi(item, fz,icon)
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL(source_fz_04)
|
||||||
|
for i = 1, 4 do
|
||||||
|
if i == 4 and fz.type == RB_FZType.Ti then
|
||||||
|
fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card)
|
||||||
|
else
|
||||||
|
fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
-- item:AddChildAt(fzcards,0)
|
||||||
|
return fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpatePao(item, fz,icon)
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL(source_fz_04)
|
||||||
|
for i = 1, 4 do
|
||||||
|
fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1])
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
return fzcards
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:PlayEffect(fzitem,fzcards,isplay,index,count)
|
||||||
|
if (isplay == nil) then
|
||||||
|
isplay = false
|
||||||
|
end
|
||||||
|
if (isplay and index == count) then
|
||||||
|
local faArray = fzitem:GetChild("chiwei")
|
||||||
|
if (faArray ~= nil) then
|
||||||
|
faArray:AddChild(fzcards)
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat)
|
||||||
|
isplay = isplay == nil and false or isplay
|
||||||
|
local isAddlast = false
|
||||||
|
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
if isplay and i== size then
|
||||||
|
local faArray = fzitem:GetChild("chiwei")
|
||||||
|
if room.room_config.people_num == 3 then
|
||||||
|
if (room.self_player.seat == 1) then
|
||||||
|
if (seat == 2) then
|
||||||
|
faArray = fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray = fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
elseif (room.self_player.seat == 2) then
|
||||||
|
if (seat == 3) then
|
||||||
|
faArray = fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray = fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
elseif (room.self_player.seat == 3) then
|
||||||
|
if (seat == 1) then
|
||||||
|
faArray = fzitem:GetChild("chiwei1")
|
||||||
|
else
|
||||||
|
faArray = fzitem:GetChild("chiwei")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (faArray ~= nil) then
|
||||||
|
faArray:AddChild(fzcards)
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fzitem:AddChild(fzcards)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
setmetatable(M,{__index = GameController})
|
||||||
|
|
||||||
|
function M:init(name)
|
||||||
|
GameController.init(self,name)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
local ZPGameEvent = {
|
||||||
|
-- 发牌
|
||||||
|
SendCards = 'SendCards',
|
||||||
|
--发最后一张牌
|
||||||
|
AddCard = 'AddCard',
|
||||||
|
-- 胡牌
|
||||||
|
ZPHuCard = 'ZPHuCard',
|
||||||
|
-- 结算事件
|
||||||
|
ZPResult1 = 'ZPResult1',
|
||||||
|
-- 大结算事件
|
||||||
|
ZPResult2 = 'ZPResult2',
|
||||||
|
-- 转盘指向事件
|
||||||
|
EventTurn = 'EventTurn',
|
||||||
|
OutHint = 'OutHint', --出牌tips
|
||||||
|
GetCard = 'GetCard', --摸牌
|
||||||
|
OutCard = 'OutCard', --出牌
|
||||||
|
FangziAction = 'FangziAction', --吃碰等操作事件
|
||||||
|
FZTips = 'FZTips', --放子提示
|
||||||
|
QiCard = 'QiCard' --弃牌
|
||||||
|
}
|
||||||
|
|
||||||
|
return ZPGameEvent
|
||||||
|
|
@ -0,0 +1,401 @@
|
||||||
|
local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView')
|
||||||
|
local PlayerCardInfoView = import('.ZPPlayerCardInfoView')
|
||||||
|
local ZPSettingView = import('.ZPSettingView')
|
||||||
|
local ZPTableBG = import('.ZPTableBG')
|
||||||
|
local HuTipView = import('.HuTipView')
|
||||||
|
local ZPGameEvent = import('.ZPGameEvent')
|
||||||
|
local M = {
|
||||||
|
default_btn = false
|
||||||
|
}
|
||||||
|
|
||||||
|
setmetatable(M, {__index = MainView})
|
||||||
|
|
||||||
|
local default_bg = 1
|
||||||
|
|
||||||
|
function M:InitView(url, isdisplay, open_social, change_card_size, qihu)
|
||||||
|
UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard')
|
||||||
|
MainView.InitView(self, url)
|
||||||
|
self._full_offset = false
|
||||||
|
--显示背景
|
||||||
|
ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view)
|
||||||
|
self.qihu = qihu
|
||||||
|
if qihu ~= nil then
|
||||||
|
local id = ZPTableBG.GetTableBG(self._room.game_id)
|
||||||
|
if id > 3 or id <= 0 then
|
||||||
|
id = 1
|
||||||
|
end
|
||||||
|
if self._room.score_times ~= nil and self._room.score_times > 0 then
|
||||||
|
self._view:GetChild('di_text').text =
|
||||||
|
self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍'
|
||||||
|
else
|
||||||
|
self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起'
|
||||||
|
end
|
||||||
|
self._view:GetController('bg_state').selectedIndex = id - 1
|
||||||
|
end
|
||||||
|
self.cd_time = 0
|
||||||
|
self.default_btn = open_social
|
||||||
|
if isdisplay == nil then
|
||||||
|
isdisplay = false
|
||||||
|
end
|
||||||
|
local tex_round = self._view:GetChild('tex_round')
|
||||||
|
self._tex_leftTime = self._view:GetChild('time')
|
||||||
|
local remaining_card = self._view:GetChild('remaining_card')
|
||||||
|
self._tex_LeftCard = self._view:GetChild('remaining_card')
|
||||||
|
self._rightPanelView._opt = 2
|
||||||
|
self._rightPanelView:__UpdateTime()
|
||||||
|
local rightpanel = self._view:GetChild('right_panel')
|
||||||
|
if (rightpanel ~= nil) then
|
||||||
|
self.tex_gametype = rightpanel:GetChild('tex_gametype')
|
||||||
|
if (self.tex_gametype ~= nil) then
|
||||||
|
self.tex_gametype.text = self._room.room_config:GetGameName()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self._player_card_info = {}
|
||||||
|
local _room = self._room
|
||||||
|
self._hu_tip = HuTipView.new(self)
|
||||||
|
--加载上次游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. _room.game_id)
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
|
||||||
|
local _gamectr = self._gamectr
|
||||||
|
_gamectr:SendChangeTypeFace(typeface)
|
||||||
|
if typeface == 1 then
|
||||||
|
if isdisplay then
|
||||||
|
self._room.change_card_display = '7_'
|
||||||
|
else
|
||||||
|
self._room.change_card_display = '2_'
|
||||||
|
end
|
||||||
|
elseif typeface == 2 then
|
||||||
|
self._room.change_card_display = '1_'
|
||||||
|
elseif typeface == 3 then
|
||||||
|
self._room.change_card_display = '3_'
|
||||||
|
elseif typeface == 4 then
|
||||||
|
self._room.change_card_display = '8_'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- self._view.fairyBatching = true
|
||||||
|
--加载上次游戏的手牌大小
|
||||||
|
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new')
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
local typeface = _data['game_cardsize']
|
||||||
|
local _gamectr = self._gamectr
|
||||||
|
if typeface == 0 then
|
||||||
|
self._room.change_card_size = 1.2
|
||||||
|
elseif typeface == 1 then
|
||||||
|
self._room.change_card_size = 1
|
||||||
|
elseif typeface == 2 then
|
||||||
|
self._room.change_card_size = 0.8
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self._room.change_card_size = change_card_size
|
||||||
|
end
|
||||||
|
|
||||||
|
--加载上次游戏的接收语音
|
||||||
|
if self.default_btn then
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin')
|
||||||
|
local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai')
|
||||||
|
local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan')
|
||||||
|
self._room.yuyin_typeface = 1
|
||||||
|
self._room.chupai_typeface = 1
|
||||||
|
self._room.fangyan_typeface = 1
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
self._room.yuyin_typeface = typeface
|
||||||
|
self:SetInteractEnabled(typeface == 1 and 0 or 1)
|
||||||
|
end
|
||||||
|
if json_data1 ~= nil then
|
||||||
|
local _data = json.decode(json_data1)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
self._room.chupai_typeface = typeface
|
||||||
|
end
|
||||||
|
if json_data2 ~= nil then
|
||||||
|
local _data = json.decode(json_data2)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
self._room.fangyan_typeface = typeface
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
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)
|
||||||
|
_player_card_info[i] = self:NewPlayerCardInfoView(tem, i)
|
||||||
|
end
|
||||||
|
|
||||||
|
local list = _room.player_list
|
||||||
|
for i = 1, #list do
|
||||||
|
local p = list[i]
|
||||||
|
local info = _player_card_info[self:GetPos(p.seat)]
|
||||||
|
info:SetPlayer(p)
|
||||||
|
info:FillData()
|
||||||
|
end
|
||||||
|
|
||||||
|
self._rightPanelView.ctr_log.selectedIndex = 0
|
||||||
|
local list = _room.player_list
|
||||||
|
local readyNum = 0
|
||||||
|
for i = 1, #list do
|
||||||
|
local p = list[i]
|
||||||
|
local info = self._player_info[self:GetPos(p.seat)]
|
||||||
|
info._view.visible = true
|
||||||
|
info:FillData(p)
|
||||||
|
if p.ready then
|
||||||
|
readyNum = readyNum + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (_room.curren_round > 0) then
|
||||||
|
self._rightPanelView.ctr_log.selectedIndex = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
if round>1 then
|
||||||
|
self._ctr_action.selectedIndex = 1
|
||||||
|
else
|
||||||
|
self._ctr_action.selectedIndex = 2
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
self._ctr_action.selectedIndex = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
self._ctr_action.selectedIndex = 0
|
||||||
|
end
|
||||||
|
self:ResetHandCard()
|
||||||
|
self:showBackBtnView()
|
||||||
|
self:InitXiPai()
|
||||||
|
self:InitXiPai1()
|
||||||
|
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.width = GRoot.inst.width - (offset * 2)
|
||||||
|
self._xipaiPanel.height = GRoot.inst.height
|
||||||
|
self._xipaiPanel.x = offset
|
||||||
|
|
||||||
|
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
|
||||||
|
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.width = GRoot.inst.width - (offset * 2)
|
||||||
|
self._xipaiPanel1.height = GRoot.inst.height
|
||||||
|
self._xipaiPanel1.x = offset
|
||||||
|
|
||||||
|
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
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:NewSettingView(cardIndex)
|
||||||
|
local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex)
|
||||||
|
settingView:FillBgSection(
|
||||||
|
function(url)
|
||||||
|
LoadGameBg(url, self._root_view)
|
||||||
|
end,
|
||||||
|
self._room.game_id,
|
||||||
|
default_bg,
|
||||||
|
self._room,
|
||||||
|
self.qihu
|
||||||
|
)
|
||||||
|
return settingView
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:EventInit()
|
||||||
|
MainView.EventInit(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:NewPlayerCardInfoView(view, index)
|
||||||
|
if index == 1 then
|
||||||
|
return PlayerSelfCardInfoView.new(view, self)
|
||||||
|
end
|
||||||
|
return PlayerCardInfoView.new(view, self)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 设置 更新 手牌字体 三套
|
||||||
|
function M:UpdateCardDisplay(index)
|
||||||
|
local _gamectr = self._gamectr
|
||||||
|
_gamectr:SendChangeTypeFace(index)
|
||||||
|
if index == 1 then
|
||||||
|
self._room.change_card_display = '2_'
|
||||||
|
elseif index == 2 then
|
||||||
|
self._room.change_card_display = '1_'
|
||||||
|
elseif index == 3 then
|
||||||
|
self._room.change_card_display = '3_'
|
||||||
|
elseif index == 4 then
|
||||||
|
self._room.change_card_display = '8_'
|
||||||
|
end
|
||||||
|
for i = 1, #self._room.player_list do
|
||||||
|
local p = self._room.player_list[i]
|
||||||
|
local info = self._player_card_info[self:GetPos(p.seat)]
|
||||||
|
if p.DiceCard ~= nil and p.DiceCard ~= 0 then
|
||||||
|
info:UpdateOutCardList(p.DiceCard)
|
||||||
|
end
|
||||||
|
if p.outcard_list ~= nil and #p.outcard_list > 0 then
|
||||||
|
info:UpdateQiPai(p.outcard_list)
|
||||||
|
end
|
||||||
|
if p.fz_list ~= nil and #p.fz_list > 0 then
|
||||||
|
info:UpdateFzList(p.fz_list)
|
||||||
|
end
|
||||||
|
if p.seat == self._room.self_player.seat then
|
||||||
|
info:UpdateCardDisplay()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 设置 更新 手牌大小
|
||||||
|
function M:UpdateCardSize(index)
|
||||||
|
if index == 0 then
|
||||||
|
self._room.change_card_size = 1.2
|
||||||
|
elseif index == 1 then
|
||||||
|
self._room.change_card_size = 1
|
||||||
|
elseif index == 2 then
|
||||||
|
self._room.change_card_size = 0.8
|
||||||
|
end
|
||||||
|
local info = self._player_card_info[1]
|
||||||
|
info:UpdateCardSize()
|
||||||
|
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.onClick:Set(
|
||||||
|
function(...)
|
||||||
|
if self._popEvent == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--加载上次的
|
||||||
|
local index = 1
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard')
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
index = _data['index']
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['ResetHandCard'] = true
|
||||||
|
if index == 1 then
|
||||||
|
_data['index'] = 2
|
||||||
|
elseif index == 2 then
|
||||||
|
_data['index'] = 3
|
||||||
|
elseif index == 3 then
|
||||||
|
_data['index'] = 1
|
||||||
|
end
|
||||||
|
local key = user_id .. 'ResetHandCard'
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
local x = _data['index']
|
||||||
|
local card_info = self._player_card_info[1]
|
||||||
|
--printlog("1111111111111111111111111",x)
|
||||||
|
card_info:InitHandCard(false, x)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
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:GetChild("n8").displayObject.gameObject:SetActive(false)
|
||||||
|
if (btn_jiesan_lobby1 ~= nil) then
|
||||||
|
btn_jiesan_lobby1.onClick:Set(
|
||||||
|
function()
|
||||||
|
if (self.cd_time > 0) then
|
||||||
|
ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试')
|
||||||
|
else
|
||||||
|
self.cd_time = 30
|
||||||
|
self._gamectr:AskDismissRoom(
|
||||||
|
function(res)
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, '')
|
||||||
|
end
|
||||||
|
)
|
||||||
|
self:onDisBandTimer()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--解散计时器
|
||||||
|
function M:onDisBandTimer()
|
||||||
|
if self.cd_coroutine ~= nil then
|
||||||
|
coroutine.stop(self.cd_coroutine)
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Destroy()
|
||||||
|
UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard')
|
||||||
|
MainView.Destroy(self)
|
||||||
|
end
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
local ZPTableBG = import('.ZPTableBG')
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
setmetatable(M, {__index = PlayBackView})
|
||||||
|
|
||||||
|
function M:InitView(url)
|
||||||
|
PlayBackView.InitView(self, url)
|
||||||
|
local _view = self._view
|
||||||
|
ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
|
||||||
|
|
||||||
|
local EXPlayer ={
|
||||||
|
-- 手牌列表
|
||||||
|
card_list = nil,
|
||||||
|
-- 剩余牌数
|
||||||
|
hand_left_count = 0,
|
||||||
|
-- 出牌列表
|
||||||
|
outcard_list = nil,
|
||||||
|
-- 牌组列表
|
||||||
|
fz_list = nil,
|
||||||
|
hu_xi =0
|
||||||
|
}
|
||||||
|
|
||||||
|
local M = EXPlayer
|
||||||
|
|
||||||
|
--- Create a new EXPlayer
|
||||||
|
function M.new()
|
||||||
|
setmetatable(M,{__index = Player})
|
||||||
|
local self = setmetatable({}, {__index = M})
|
||||||
|
self.card_list = {}
|
||||||
|
self.outcard_list = {}
|
||||||
|
self.fz_list = {}
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 清理玩家数据
|
||||||
|
function M:Clear()
|
||||||
|
Player.Clear(self)
|
||||||
|
self.card_list = {}
|
||||||
|
self.outcard_list = {}
|
||||||
|
self.fz_list = {}
|
||||||
|
self.hand_left_count = 0
|
||||||
|
self.hu_xi =0
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,476 @@
|
||||||
|
local PendulumRule = import('.PendulumRule')
|
||||||
|
AreaOderType = {
|
||||||
|
left_right = "left_right",
|
||||||
|
right_left = "right_left",
|
||||||
|
up_down = "up_down",
|
||||||
|
down_up = "down_up"
|
||||||
|
}
|
||||||
|
|
||||||
|
local PlayerCardInfoView = {
|
||||||
|
_view = nil,
|
||||||
|
_mainView = nil,
|
||||||
|
|
||||||
|
_mask_liangpai = nil,
|
||||||
|
_area_outcard_list = nil,
|
||||||
|
_area_handcard_list = nil,
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
local function NewCardView(card,cardItem,index_X,index_Y)
|
||||||
|
local self = {}
|
||||||
|
setmetatable(self,{__index = CardView})
|
||||||
|
self.btn_card = card
|
||||||
|
self.card_item = cardItem
|
||||||
|
self.index_X = index_X
|
||||||
|
self.index_Y = index_Y
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local M = PlayerCardInfoView
|
||||||
|
|
||||||
|
function M.new(view,mainView)
|
||||||
|
local self = {}
|
||||||
|
setmetatable(self, {__index = M})
|
||||||
|
self._view = view
|
||||||
|
self._mainView = mainView
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init()
|
||||||
|
|
||||||
|
local view = self._view
|
||||||
|
self._room = DataManager.CurrenRoom
|
||||||
|
self._area_outcard_list = view:GetChild("area_outcard_list")
|
||||||
|
self._area_handcard_list = view:GetChild("area_handcard_list")
|
||||||
|
self._area_fz_list = view:GetChild("area_fz_list")
|
||||||
|
self._area_qipai_list = view:GetChild("windcard_list")
|
||||||
|
self._mask_liangpai = view:GetChild("mask_liangpai")
|
||||||
|
UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard")
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:SetPlayer(p)
|
||||||
|
self._player = p
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillData(begin)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Clear()
|
||||||
|
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_fz_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_qipai_list:RemoveChildren(0, -1, true)
|
||||||
|
self._mask_liangpai:RemoveChildren(0, -1, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:fillCard(obj,card_type,card)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:ClearOutCard()
|
||||||
|
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--弃牌
|
||||||
|
function M:UpdateQiPai( qi_list)
|
||||||
|
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])
|
||||||
|
self._area_qipai_list:AddChild(qicards)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--放字
|
||||||
|
function M:UpdateFzList( fz_list )
|
||||||
|
printlog("UpdateFzList=======")
|
||||||
|
pt(fz_list)
|
||||||
|
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/Component1")
|
||||||
|
fzitem:RemoveChildren(0,-1,true)
|
||||||
|
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:GetController("c2").selectedIndex =1
|
||||||
|
fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card)
|
||||||
|
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
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
|
||||||
|
elseif fz_list[i].type == RB_FZType.Wei 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"
|
||||||
|
end
|
||||||
|
fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
|
||||||
|
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"
|
||||||
|
end
|
||||||
|
fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
|
||||||
|
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==4 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"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fzcards.x,fzcards.y = 0,0
|
||||||
|
fzitem:AddChildAt(fzcards,0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--回放手牌
|
||||||
|
function M:InitHandCard(handcard)
|
||||||
|
self._area_handcard_list:RemoveChildren(0,-1,true)
|
||||||
|
local pokerList =PendulumRule.GetHandCard(handcard) --self:PendulumRule(handcard)
|
||||||
|
self.card_lists ={}
|
||||||
|
for i =1,#pokerList do
|
||||||
|
for j =1,#pokerList[i] do
|
||||||
|
local card_code = pokerList[i][j]
|
||||||
|
local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai")
|
||||||
|
btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code)
|
||||||
|
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)
|
||||||
|
self.card_lists[#self.card_lists+1] = card_view
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for j=#self.card_lists,1,-1 do
|
||||||
|
local card_view = self.card_lists[j]
|
||||||
|
card_view.btn_card:RemoveFromParent()
|
||||||
|
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self._player.fz_list~=nil then
|
||||||
|
for i=1,#self._player.fz_list do
|
||||||
|
if self._player.fz_list[i].type == RB_FZType.Kan then
|
||||||
|
self:UpdateKan(self._player.fz_list[i].card)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function M:UpdateHandCards( list )
|
||||||
|
self.card_lists = {}
|
||||||
|
self._area_handcard_list:RemoveChildren(0,-1,true)
|
||||||
|
local CountCards = {}
|
||||||
|
for i=1,#list do
|
||||||
|
CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1
|
||||||
|
end
|
||||||
|
for i=1,#list do
|
||||||
|
local card_code = list[i].card_item
|
||||||
|
local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai")
|
||||||
|
btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code)
|
||||||
|
local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y)
|
||||||
|
--存牌堆
|
||||||
|
self.card_lists[#self.card_lists+1] =card_view
|
||||||
|
end
|
||||||
|
for j=#self.card_lists,1,-1 do
|
||||||
|
local card_view = self.card_lists[j]
|
||||||
|
card_view.btn_card:RemoveFromParent()
|
||||||
|
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--牌位置
|
||||||
|
function M:GetHandCardPos(cards_view,cards)
|
||||||
|
local x,y = 0,0
|
||||||
|
local card_width = 42 -- 牌的宽度
|
||||||
|
local middle_x = self._area_handcard_list.width / 2
|
||||||
|
local start_x = middle_x - (cards / 2 * (card_width))
|
||||||
|
x = start_x + (card_width) * (cards_view.index_X - 1)
|
||||||
|
y = 0 - (42*cards_view.index_Y)
|
||||||
|
return Vector2.New(x,y)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function M:UpdateOutCardList(outcard)
|
||||||
|
|
||||||
|
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/201_1_300"
|
||||||
|
else
|
||||||
|
outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard)
|
||||||
|
end
|
||||||
|
outcards.x,outcards.y = 0,0
|
||||||
|
self._area_outcard_list:AddChild(outcards)
|
||||||
|
end
|
||||||
|
|
||||||
|
--摸牌动画
|
||||||
|
function M:PlayingOutCardAnima(card)
|
||||||
|
if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then
|
||||||
|
self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card)
|
||||||
|
self._view:GetTransition("t0"):Play()
|
||||||
|
end
|
||||||
|
coroutine.start(function()
|
||||||
|
coroutine.wait(0.1)
|
||||||
|
self:ClearOutCard()
|
||||||
|
end)
|
||||||
|
--
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--摆牌规则
|
||||||
|
function M:PendulumRule(handcard)
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local card_list = handcard
|
||||||
|
local card_count = #card_list
|
||||||
|
local cards_map = {}
|
||||||
|
local CountCards = {}
|
||||||
|
for i=1,#card_list do
|
||||||
|
CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1
|
||||||
|
end
|
||||||
|
--find4
|
||||||
|
for k,v in pairs(CountCards) do
|
||||||
|
if (v == 4) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= k
|
||||||
|
cs[2]= k
|
||||||
|
cs[3]= k
|
||||||
|
cs[4]= k
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[k] = 0
|
||||||
|
card_count =card_count- 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--find3
|
||||||
|
for k,v in pairs(CountCards) do
|
||||||
|
if (v >= 3) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= k
|
||||||
|
cs[2]= k
|
||||||
|
cs[3]= k
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[k] = CountCards[k] -3
|
||||||
|
card_count =card_count- 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--find AAa
|
||||||
|
for i = 201, 210 do
|
||||||
|
if CountCards[i]~=nil and CountCards[i] >= 2 then
|
||||||
|
if CountCards[i-100]~=nil and CountCards[i-100] == 1 then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= i
|
||||||
|
cs[2]= i
|
||||||
|
cs[3]= i-100
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[i] = CountCards[i]- 2;
|
||||||
|
CountCards[i - 100] = CountCards[i - 100]-1
|
||||||
|
card_count = card_count-3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--find aaA
|
||||||
|
for i = 101, 110 do
|
||||||
|
if CountCards[i]~=nil and (CountCards[i] >= 2) then
|
||||||
|
if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= i
|
||||||
|
cs[2]= i
|
||||||
|
cs[3]= i+100
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[i] = CountCards[i]- 2;
|
||||||
|
CountCards[i +100] = CountCards[i +100] - 1
|
||||||
|
card_count = card_count-3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--find2
|
||||||
|
for k,v in pairs(CountCards) do
|
||||||
|
if (v >= 2) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1] = k
|
||||||
|
cs[2] = k
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[k] = CountCards[k] - 2
|
||||||
|
card_count =card_count- 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--find 小 2 7 10
|
||||||
|
local counta = CountCards[102]
|
||||||
|
if counta ~=nil and counta>0 then
|
||||||
|
for i=1,counta do
|
||||||
|
if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= 102
|
||||||
|
cs[2]= 107
|
||||||
|
cs[3]= 110
|
||||||
|
cards_map[#cards_map+1] = cs
|
||||||
|
CountCards[102] = CountCards[102]-1
|
||||||
|
CountCards[107] = CountCards[107]-1
|
||||||
|
CountCards[110] = CountCards[110]-1
|
||||||
|
card_count = card_count - 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--find 大 2 7 10
|
||||||
|
local countA = CountCards[202]
|
||||||
|
if countA ~=nil and countA>0 then
|
||||||
|
for i=1,countA do
|
||||||
|
if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= 202
|
||||||
|
cs[2]= 207
|
||||||
|
cs[3]= 210
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[202] = CountCards[202]-1
|
||||||
|
CountCards[207] = CountCards[207]-1
|
||||||
|
CountCards[210] = CountCards[210]-1
|
||||||
|
card_count = card_count - 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--find abc
|
||||||
|
for i=101,110 do
|
||||||
|
if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= i
|
||||||
|
cs[2]= i+1
|
||||||
|
cs[3]= i+2
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[i] = CountCards[i]-1
|
||||||
|
CountCards[i+1] = CountCards[i+1]-1
|
||||||
|
CountCards[i+2] = CountCards[i+2]-1
|
||||||
|
card_count = card_count - 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--find ABC
|
||||||
|
for i=201,210 do
|
||||||
|
if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= i
|
||||||
|
cs[2]= i+1
|
||||||
|
cs[3]= i+2
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[i] = CountCards[i]-1
|
||||||
|
CountCards[i+1] = CountCards[i+1]-1
|
||||||
|
CountCards[i+2] = CountCards[i+2]-1
|
||||||
|
card_count = card_count - 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--find Aa
|
||||||
|
for i = 201, 210 do
|
||||||
|
if CountCards[i]~=nil and CountCards[i] == 1 then
|
||||||
|
if CountCards[i-100]~=nil and CountCards[i-100] == 1 then
|
||||||
|
local cs = {}
|
||||||
|
cs[1]= i
|
||||||
|
cs[2]= i-100
|
||||||
|
cards_map[#cards_map+1]=cs
|
||||||
|
CountCards[i] = CountCards[i]- 1;
|
||||||
|
CountCards[i - 100] = CountCards[i - 100]-1
|
||||||
|
card_count = card_count-2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local r_count = 9 - #cards_map
|
||||||
|
local merge = false
|
||||||
|
merge = r_count<card_count
|
||||||
|
local singleList = {}
|
||||||
|
--find else
|
||||||
|
|
||||||
|
for k,v in pairs(CountCards) do
|
||||||
|
if (v == 1) then
|
||||||
|
singleList[#singleList+1] = k
|
||||||
|
CountCards[k] = CountCards[k] -1
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local index = 0
|
||||||
|
if merge then index = 3 else index=1 end
|
||||||
|
for i=1,#singleList,index do
|
||||||
|
local cs ={}
|
||||||
|
if merge then
|
||||||
|
cs[#cs+1] = singleList[i]
|
||||||
|
if i < #singleList then cs[#cs+1] = singleList[i+1] end
|
||||||
|
if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end
|
||||||
|
cards_map[#cards_map + 1]=cs
|
||||||
|
else
|
||||||
|
cs[#cs+1] = singleList[i]
|
||||||
|
cards_map[#cards_map + 1]=cs
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--变成9列--这里牌多了也不会报错了
|
||||||
|
for i=9 ,1,-1 do
|
||||||
|
for j = #cards_map , 9,-1 do
|
||||||
|
if #cards_map[i] < 3 then
|
||||||
|
cards_map[i][#cards_map[i]+1] = cards_map[j][1]
|
||||||
|
list_remove(cards_map[j],cards_map[j][1])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return cards_map
|
||||||
|
|
||||||
|
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.."2_"..card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,879 @@
|
||||||
|
local CardCheck = import('.CardCheck')
|
||||||
|
local PendulumRule = import('.PendulumRule')
|
||||||
|
AreaOderType = {
|
||||||
|
left_right = 'left_right',
|
||||||
|
right_left = 'right_left',
|
||||||
|
up_down = 'up_down',
|
||||||
|
down_up = 'down_up'
|
||||||
|
}
|
||||||
|
|
||||||
|
local CardView = {
|
||||||
|
btn_card = nil,
|
||||||
|
-- 牌序号
|
||||||
|
card_item = 0,
|
||||||
|
-- 牌层级
|
||||||
|
Hierarchy = 0,
|
||||||
|
-- 牌的列数
|
||||||
|
index_X = 0,
|
||||||
|
-- 每一列第几张牌
|
||||||
|
index_Y = 0,
|
||||||
|
-- 原始位置
|
||||||
|
old_postion = Vector2.zero
|
||||||
|
}
|
||||||
|
|
||||||
|
local function NewCardView(card, cardItem, index_X, index_Y)
|
||||||
|
local self = {}
|
||||||
|
setmetatable(self, {__index = CardView})
|
||||||
|
self.btn_card = card
|
||||||
|
self.card_item = cardItem
|
||||||
|
self.index_X = index_X
|
||||||
|
self.index_Y = index_Y
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
local PlayerSelfCardInfoView = {
|
||||||
|
_view = nil,
|
||||||
|
_mainView = nil,
|
||||||
|
_mask_liangpai = nil,
|
||||||
|
_area_outcard_list = nil,
|
||||||
|
_area_handcard_list = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
local M = PlayerSelfCardInfoView
|
||||||
|
function M.new(view, mainView)
|
||||||
|
local self = {}
|
||||||
|
setmetatable(self, {__index = M})
|
||||||
|
self._view = view
|
||||||
|
self._mainView = mainView
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init()
|
||||||
|
local view = self._view
|
||||||
|
self._isDrg = false
|
||||||
|
self.card_list = {} -- 牌的btn code type pos 等等
|
||||||
|
self.cards_count = 0 -- 牌的总列数
|
||||||
|
self.card_width = 87
|
||||||
|
self.card_hight = 110
|
||||||
|
self.outcard_button = nil
|
||||||
|
self._room = DataManager.CurrenRoom
|
||||||
|
self._area_handcard_list = view:GetChild('area_handcard_list')
|
||||||
|
self._area_outcard_list = view:GetChild('area_outcard_list')
|
||||||
|
self._area_fz_list = view:GetChild('area_fz_list')
|
||||||
|
self._area_qipai_list = view:GetChild('windcard_list')
|
||||||
|
self._mask_liangpai = view:GetChild('mask_liangpai')
|
||||||
|
UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard')
|
||||||
|
self.ctr_piao = self._view:GetController('piao')
|
||||||
|
self.ctr_piao_value = self._view:GetController('piaovalue')
|
||||||
|
self:BtnEvent()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:ShowPiao(piao)
|
||||||
|
self:UpdateIsOnClick(true)
|
||||||
|
self.ctr_piao.selectedIndex = piao
|
||||||
|
self:EnableAllPiaoTouch()
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:HidePiao()
|
||||||
|
self.ctr_piao.selectedIndex = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:BtnEvent()
|
||||||
|
self.btn_tips = self._view:GetChild('btn_tips')
|
||||||
|
|
||||||
|
local function click_piao()
|
||||||
|
local closePiaoTipsFunc=function ()
|
||||||
|
self.ctr_piao.selectedIndex = 0
|
||||||
|
end
|
||||||
|
ControllerManager.GetController(GameController):SendPiao(tonumber(self.ctr_piao_value.selectedPage),closePiaoTipsFunc)
|
||||||
|
end
|
||||||
|
self.PiaoList={}
|
||||||
|
local btn_piao0 = self._view:GetChild('piao0')
|
||||||
|
btn_piao0.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao0)
|
||||||
|
|
||||||
|
local btn_piao1 = self._view:GetChild('piao1')
|
||||||
|
btn_piao1.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao1)
|
||||||
|
|
||||||
|
local btn_piao2 = self._view:GetChild('piao2')
|
||||||
|
btn_piao2.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao2)
|
||||||
|
|
||||||
|
local btn_piao3 = self._view:GetChild('piao3')
|
||||||
|
btn_piao3.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao3)
|
||||||
|
|
||||||
|
local btn_piao5 = self._view:GetChild('piao5')
|
||||||
|
btn_piao5.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao5)
|
||||||
|
|
||||||
|
local btn_piao8 = self._view:GetChild('piao8')
|
||||||
|
btn_piao8.onClick:Set(click_piao)
|
||||||
|
table.insert(self.PiaoList,btn_piao8)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:EnableAllPiaoTouch()
|
||||||
|
for i=1,#self.PiaoList do
|
||||||
|
self.PiaoList[i].touchable=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SetPlayer(p)
|
||||||
|
self._player = p
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillData(begin)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Clear()
|
||||||
|
self.outcard_button = nil
|
||||||
|
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_fz_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||||
|
self._area_qipai_list:RemoveChildren(0, -1, true)
|
||||||
|
self._mask_liangpai:RemoveChildren(0, -1, true)
|
||||||
|
self.card_list = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:fillCard(obj, card_type, cards)
|
||||||
|
end
|
||||||
|
function M:ShowHuTip(card)
|
||||||
|
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||||
|
local x = {}
|
||||||
|
self._mainView._hu_tip:FillData(x)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local _aplayer = DataManager.CurrenRoom.self_player
|
||||||
|
local selfplayeTable = {}
|
||||||
|
selfplayeTable.handcard_list = _aplayer.handcard_list
|
||||||
|
selfplayeTable.fz_list = _aplayer.fz_list
|
||||||
|
selfplayeTable.tiCount = _aplayer.tiCount
|
||||||
|
selfplayeTable.paoCount = _aplayer.paoCount
|
||||||
|
selfplayeTable.hu_xi = _aplayer.hu_xi
|
||||||
|
local player = membe_deep_clone(selfplayeTable)
|
||||||
|
if card ~= nil then
|
||||||
|
list_remove(player.handcard_list, card)
|
||||||
|
end
|
||||||
|
local tingList = CardCheck.tingPai(player, DataManager.CurrenRoom)
|
||||||
|
if self._mainView._hu_tip ~= nil then
|
||||||
|
self._mainView._hu_tip:FillData(tingList)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function M:SetNotPutCard()
|
||||||
|
local tempNotPutList=DataManager.CurrenRoom.self_player.currentNotPutCardList
|
||||||
|
if tempNotPutList and #tempNotPutList>0 then
|
||||||
|
for i=1,#tempNotPutList do
|
||||||
|
self:UpdateKan(tempNotPutList[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--手牌
|
||||||
|
function M:InitHandCard(isPlayAni, index)
|
||||||
|
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.outcard_button = nil
|
||||||
|
|
||||||
|
if self.cor_init_poker ~= nil then
|
||||||
|
coroutine.stop(self.cor_init_poker)
|
||||||
|
end
|
||||||
|
self.cor_init_poker = nil
|
||||||
|
local _room = DataManager.CurrenRoom
|
||||||
|
--得到排序好的 list
|
||||||
|
local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index)
|
||||||
|
if pokerList == nil or #pokerList == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.cards_count = #pokerList
|
||||||
|
self.card_list = {}
|
||||||
|
self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||||
|
--开始发牌动画
|
||||||
|
if isPlayAni == true then
|
||||||
|
self.cor_init_poker =
|
||||||
|
coroutine.start(
|
||||||
|
function()
|
||||||
|
self._mainView._popEvent = false
|
||||||
|
if self._mainView._rightPanelView._settingView ~= nil then
|
||||||
|
self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false)
|
||||||
|
end
|
||||||
|
for i = 1, #pokerList do
|
||||||
|
local pokerListNum = 0
|
||||||
|
for j = 1, #pokerList[i] do
|
||||||
|
local card_code = pokerList[i][j]
|
||||||
|
local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card')
|
||||||
|
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()
|
||||||
|
local x, y = 500, (j * 85) - 500
|
||||||
|
btn_card:SetXY(x, y)
|
||||||
|
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)
|
||||||
|
--存牌堆
|
||||||
|
self.card_list[#self.card_list + 1] = card_view
|
||||||
|
btn_card.data = card_view
|
||||||
|
btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin))
|
||||||
|
btn_card.onTouchMove:Set(handler(self, self.onTouchMove))
|
||||||
|
btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd))
|
||||||
|
end
|
||||||
|
for j = #self.card_list, 1, -1 do
|
||||||
|
coroutine.wait(0.005)
|
||||||
|
if pokerListNum == #pokerList[i] then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
pokerListNum = pokerListNum + 1
|
||||||
|
local card_view = self.card_list[j]
|
||||||
|
card_view.btn_card:RemoveFromParent()
|
||||||
|
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
self._mainView._popEvent = true
|
||||||
|
self:UpdateIsOnClick(true)
|
||||||
|
if self._mainView._rightPanelView._settingView ~= nil then
|
||||||
|
coroutine.start(
|
||||||
|
function()
|
||||||
|
coroutine.wait(1)
|
||||||
|
self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
else
|
||||||
|
--没有发牌动画
|
||||||
|
for i = 1, #pokerList do
|
||||||
|
for j = 1, #pokerList[i] do
|
||||||
|
local card_code = pokerList[i][j]
|
||||||
|
local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card')
|
||||||
|
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()
|
||||||
|
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)
|
||||||
|
--存牌堆
|
||||||
|
self.card_list[#self.card_list + 1] = card_view
|
||||||
|
btn_card.data = card_view
|
||||||
|
btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin))
|
||||||
|
btn_card.onTouchMove:Set(handler(self, self.onTouchMove))
|
||||||
|
btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd))
|
||||||
|
end
|
||||||
|
--存牌堆
|
||||||
|
for j = 1, #self.card_list do
|
||||||
|
local card_view = self.card_list[j]
|
||||||
|
card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self._player.fz_list ~= nil then
|
||||||
|
for i = 1, #self._player.fz_list do
|
||||||
|
if self._player.fz_list[i].type == RB_FZType.Kan then
|
||||||
|
self:UpdateKan(self._player.fz_list[i].card)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
end
|
||||||
|
|
||||||
|
self:SetNotPutCard()
|
||||||
|
end
|
||||||
|
--更新手牌
|
||||||
|
function M:UpdateHandCards(list)
|
||||||
|
self.card_list = {}
|
||||||
|
self._area_handcard_list:RemoveChildren(0, -1, true)
|
||||||
|
|
||||||
|
self.outcard_button = nil
|
||||||
|
|
||||||
|
local CountCards = {}
|
||||||
|
for i = 1, #list do
|
||||||
|
CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1
|
||||||
|
end
|
||||||
|
for i = 1, #list do
|
||||||
|
local card_code = list[i].card_item
|
||||||
|
local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card')
|
||||||
|
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()
|
||||||
|
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
|
||||||
|
btn_card.data = card_view
|
||||||
|
btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin))
|
||||||
|
btn_card.onTouchMove:Set(handler(self, self.onTouchMove))
|
||||||
|
btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd))
|
||||||
|
end
|
||||||
|
for j = #self.card_list, 1, -1 do
|
||||||
|
local card_view = self.card_list[j]
|
||||||
|
card_view.btn_card:RemoveFromParent()
|
||||||
|
self._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards)
|
||||||
|
end
|
||||||
|
if self._player.fz_list ~= nil then
|
||||||
|
for i = 1, #self._player.fz_list do
|
||||||
|
if self._player.fz_list[i].type == RB_FZType.Kan then
|
||||||
|
self:UpdateKan(self._player.fz_list[i].card)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:SetNotPutCard()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- --
|
||||||
|
function M:onTouchBegin(context)
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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:onTouchMove(context)
|
||||||
|
local button = context.sender
|
||||||
|
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
|
||||||
|
end
|
||||||
|
|
||||||
|
--出牌提示动画
|
||||||
|
function M:ChuPaiTiShi()
|
||||||
|
if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then
|
||||||
|
self._view:GetController('chupai').selectedIndex = 1
|
||||||
|
else
|
||||||
|
self._view:GetController('chupai').selectedIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 删手牌
|
||||||
|
function M:DeleteHandCard(carditem)
|
||||||
|
local card = nil
|
||||||
|
if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then
|
||||||
|
list_remove(self.card_list, self.outcard_button)
|
||||||
|
self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true)
|
||||||
|
|
||||||
|
card = self.outcard_button
|
||||||
|
self.outcard_button = nil
|
||||||
|
else
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
local card_view = self.card_list[i]
|
||||||
|
if carditem == card_view.card_item then
|
||||||
|
card_view.btn_card.touchable = false
|
||||||
|
list_remove(self.card_list, card_view)
|
||||||
|
card = card_view
|
||||||
|
--card_view.btn_card:RemoveFromParent()
|
||||||
|
self._area_handcard_list:RemoveChild(card_view.btn_card, true)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if card ~= nil then
|
||||||
|
local num = 0
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
end
|
||||||
|
--更新手牌的坎
|
||||||
|
function M:UpdateKan(card)
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
local card_view = self.card_list[i]
|
||||||
|
if card_view.card_item == card then
|
||||||
|
--card_view.btn_card.touchable = false
|
||||||
|
card_view.btn_card:GetController('Kan').selectedIndex = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号
|
||||||
|
function M:UpdateHandCardsPos()
|
||||||
|
--得到有 多少列
|
||||||
|
local CountCards = {}
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
CountCards[self.card_list[i].index_X] =
|
||||||
|
CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1
|
||||||
|
end
|
||||||
|
for i = #self.card_list, 1, -1 do
|
||||||
|
local card_view = self.card_list[i]
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
self:ShowHuTip()
|
||||||
|
end
|
||||||
|
|
||||||
|
--刷新手牌字体
|
||||||
|
function M:UpdateCardDisplay()
|
||||||
|
local CountCards = {}
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
CountCards[self.card_list[i].index_X] =
|
||||||
|
CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1
|
||||||
|
end
|
||||||
|
for i = #self.card_list, 1, -1 do
|
||||||
|
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._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--更新手牌大小
|
||||||
|
function M:UpdateCardSize()
|
||||||
|
local CountCards = {}
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
CountCards[self.card_list[i].index_X] =
|
||||||
|
CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1
|
||||||
|
end
|
||||||
|
for i = #self.card_list, 1, -1 do
|
||||||
|
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)
|
||||||
|
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._area_handcard_list:AddChild(card_view.btn_card)
|
||||||
|
card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:UpdateIsOnClick(isOut)
|
||||||
|
self._view.touchable = isOut
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 结束 拖拽事件
|
||||||
|
-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较
|
||||||
|
function M:__OnDragEnd(context)
|
||||||
|
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
|
||||||
|
-- card.btn_card.sortingOrder = 0
|
||||||
|
local _room = DataManager.CurrenRoom
|
||||||
|
|
||||||
|
if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then
|
||||||
|
button.touchable = false
|
||||||
|
self.outcard_button = card
|
||||||
|
self:UpdateIsOnClick(false)
|
||||||
|
self._mainView:OutCard(card.card_item)
|
||||||
|
else
|
||||||
|
local isChangeCard = false
|
||||||
|
self.outcard_button = nil
|
||||||
|
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
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local CountCards = {}
|
||||||
|
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
|
||||||
|
else
|
||||||
|
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 self.card_list[1].index_X == self.card_list[2].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--位置x小于第一张牌 放第一排
|
||||||
|
if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then
|
||||||
|
--位置大于最后一张牌 放最后一排
|
||||||
|
list_remove(self.card_list, card)
|
||||||
|
local num = 0
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
else
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
local num = 0
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
isChangeCard = true
|
||||||
|
else
|
||||||
|
--放已有的牌堆上 判断放第几列
|
||||||
|
local MoveCard = false
|
||||||
|
local MoveCardPos = 0
|
||||||
|
local MoveCardY = 0
|
||||||
|
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
|
||||||
|
MoveCardPos = i
|
||||||
|
MoveCardY = #CountCards[i] + 1
|
||||||
|
MoveCard = true
|
||||||
|
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 _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) + 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
|
||||||
|
--上下移动
|
||||||
|
local num = 0
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if card.index_X == self.card_list[i].index_X then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
if MoveCardPos > card.index_X then
|
||||||
|
MoveCardPos = MoveCardPos - 1
|
||||||
|
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 then
|
||||||
|
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
|
||||||
|
--向下移动
|
||||||
|
if MoveCardindex == -1 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
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
isChangeCard = true
|
||||||
|
else
|
||||||
|
isChangeCard = false
|
||||||
|
self._area_handcard_list:AddChild(button)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:UpdateHandCardsPos()
|
||||||
|
--每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示
|
||||||
|
if isChangeCard == true then
|
||||||
|
self:SendChangeCard()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--改变手牌排列发给服务器
|
||||||
|
function M:SendChangeCard(...)
|
||||||
|
local list = {}
|
||||||
|
for i = 1, #self.card_list do
|
||||||
|
local data = {}
|
||||||
|
data.card = self.card_list[i].card_item
|
||||||
|
data.X = self.card_list[i].index_X
|
||||||
|
data.Y = self.card_list[i].index_Y
|
||||||
|
list[#list + 1] = data
|
||||||
|
end
|
||||||
|
self._mainView:ChangeCards(list)
|
||||||
|
end
|
||||||
|
|
||||||
|
--计算手牌位置
|
||||||
|
function M:GetHandCardPos(cards_view, cards)
|
||||||
|
local x, y = 0, 0
|
||||||
|
local card_width = self.card_width -- 牌的宽度
|
||||||
|
local middle_x = self._area_handcard_list.width / 2
|
||||||
|
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 = 70 - (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
|
||||||
|
|
||||||
|
--更新 吃碰
|
||||||
|
function M:UpdateFzList(fz_list)
|
||||||
|
printlog("UpdateFzList=======")
|
||||||
|
pt(fz_list)
|
||||||
|
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/Component1')
|
||||||
|
fzitem:RemoveChildren(0, -1, true)
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
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
|
||||||
|
fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card)
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
elseif fz_list[i].type == RB_FZType.ChouWei then
|
||||||
|
local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3')
|
||||||
|
fzcards:GetController('c1').selectedIndex = 1
|
||||||
|
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
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
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)
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
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 == 4 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'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fzcards.x, fzcards.y = 0, 0
|
||||||
|
fzitem:AddChildAt(fzcards, 0)
|
||||||
|
self._area_fz_list:AddChild(fzitem)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:ClearOutCard()
|
||||||
|
self._area_outcard_list:RemoveChildren(0, -1, true)
|
||||||
|
end
|
||||||
|
--出牌
|
||||||
|
function M:UpdateOutCardList(outcard)
|
||||||
|
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/201_1_300'
|
||||||
|
else
|
||||||
|
outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard)
|
||||||
|
end
|
||||||
|
outcards.x, outcards.y = 0, 0
|
||||||
|
self._area_outcard_list:AddChild(outcards)
|
||||||
|
end
|
||||||
|
|
||||||
|
--弃牌
|
||||||
|
function M:UpdateQiPai(qi_list)
|
||||||
|
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])
|
||||||
|
self._area_qipai_list:AddChild(qicards)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--摸牌动画
|
||||||
|
function M:PlayingOutCardAnima(card)
|
||||||
|
if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then
|
||||||
|
self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card)
|
||||||
|
self._view:GetTransition('t0'):Play()
|
||||||
|
end
|
||||||
|
coroutine.start(
|
||||||
|
function()
|
||||||
|
coroutine.wait(0.1)
|
||||||
|
self:ClearOutCard()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
--得到设置的牌字体
|
||||||
|
function M:getCardItem(card_1, card_2)
|
||||||
|
if self._room.change_card_display ~= nil then
|
||||||
|
--printlog("===========",self._room.change_card_display)
|
||||||
|
return card_1 .. self._room.change_card_display .. card_2
|
||||||
|
else
|
||||||
|
return card_1 .. '2_' .. card_2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--得到设置的牌大小
|
||||||
|
function M:getCardSize()
|
||||||
|
if self._room.change_card_size ~= nil then
|
||||||
|
return self._room.change_card_size
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
local Protocol = {
|
||||||
|
-- 通知服务器出牌
|
||||||
|
GAME_DIS_CARD = "611",
|
||||||
|
-- 通知服务器提示选择行为
|
||||||
|
GAME_ACTION = "612",
|
||||||
|
-- 通知服务器手牌队形改变
|
||||||
|
GAME_CHANGE_CARD = "613",
|
||||||
|
-- 通知服务器牌字体改变
|
||||||
|
GAME_CHANGE_TYPEfACE = "615",
|
||||||
|
|
||||||
|
-- 发牌协议
|
||||||
|
GAME_EVT_PLAYER_DEAL = "811",
|
||||||
|
-- 出牌事件
|
||||||
|
GAME_EVT_DISCARD = "812",
|
||||||
|
-- 出牌提示事件
|
||||||
|
GAME_EVT_DISCARD_TIP = "813",
|
||||||
|
-- 放子提示事件
|
||||||
|
GAME_EVT_FZTIPS = "814",
|
||||||
|
-- action 事件
|
||||||
|
GAME_EVT_ACTION = "815",
|
||||||
|
-- 胡牌事件
|
||||||
|
GAME_EVT_HU = "816",
|
||||||
|
-- 结算
|
||||||
|
GAME_EVT_RESULT1 = "817",
|
||||||
|
-- 弃牌
|
||||||
|
GAME_EVT_QIPAI = "818",
|
||||||
|
-- 抓牌
|
||||||
|
GAME_EVT_DRAW = "819",
|
||||||
|
-- 转盘指向事件
|
||||||
|
GAME_EVT_CHANGE_ACTIVE_PLAYER = "820",
|
||||||
|
--第二十一张牌
|
||||||
|
GAME_EVT_ADD_CARD = "821",
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return Protocol
|
||||||
|
|
@ -0,0 +1,336 @@
|
||||||
|
local SettingView = require('Game.View.SettingView')
|
||||||
|
local ZPTableBG = import('.ZPTableBG')
|
||||||
|
|
||||||
|
local ZPSettingView = {
|
||||||
|
-- 修改牌字体
|
||||||
|
onEXMainCallback = nil,
|
||||||
|
-- 修改手牌大小
|
||||||
|
onUpdataCardSizeCallback = nil,
|
||||||
|
-- 语音
|
||||||
|
onEXVoiceCallback = nil,
|
||||||
|
-- 快速出牌
|
||||||
|
onEXChuPaiCallback = nil,
|
||||||
|
-- 方言
|
||||||
|
onEXFangYanCallback = nil
|
||||||
|
}
|
||||||
|
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})
|
||||||
|
self.class = 'ZPSettingView'
|
||||||
|
self._currenIndex = 0
|
||||||
|
self._blur_view = blur_view
|
||||||
|
self.onCallback = event('onCallback', true)
|
||||||
|
self.stateIndex = 0
|
||||||
|
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._full = true
|
||||||
|
self._anim_pop = 2
|
||||||
|
self._open_social = open_social
|
||||||
|
self._cardType=cardIndex
|
||||||
|
self:init('ui://Main_RunBeard/New_SettingWindow')
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:init(url)
|
||||||
|
SettingView.init(self, url)
|
||||||
|
if DataManager.CurrenRoom == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self._view = self._view:GetChild('showview')
|
||||||
|
|
||||||
|
local view = self._view
|
||||||
|
local slider_sound = view:GetChild('slider_sound')
|
||||||
|
local slider_music = view:GetChild('slider_music')
|
||||||
|
-- local btn_music = view:GetChild('btn_music')
|
||||||
|
-- local btn_sound = view:GetChild('btn_sound')
|
||||||
|
|
||||||
|
-- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true)
|
||||||
|
slider_sound.value = GameApplication.Instance.SoundValue
|
||||||
|
slider_music.value = GameApplication.Instance.MusicValue
|
||||||
|
-- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true
|
||||||
|
|
||||||
|
slider_music.onChanged:Add(
|
||||||
|
function()
|
||||||
|
GameApplication.Instance.MusicValue = slider_music.value
|
||||||
|
-- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
slider_sound.onChanged:Add(
|
||||||
|
function()
|
||||||
|
GameApplication.Instance.SoundValue = slider_sound.value
|
||||||
|
-- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local c1 = self._view:GetController('cards')
|
||||||
|
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
|
||||||
|
size.selectedIndex = 1
|
||||||
|
elseif room.change_card_size == self.smallSize then
|
||||||
|
size.selectedIndex = 2
|
||||||
|
end
|
||||||
|
else
|
||||||
|
room.change_card_size = 0
|
||||||
|
size.selectedIndex = 0
|
||||||
|
end
|
||||||
|
printlog("room.change_card_display===>>>",room.change_card_display)
|
||||||
|
if room.change_card_display ~= nil then
|
||||||
|
local _str = string.sub(room.change_card_display, 1, 1)
|
||||||
|
local n = tonumber(_str)
|
||||||
|
if n == 1 then
|
||||||
|
c1.selectedIndex = 1
|
||||||
|
elseif n == 2 then
|
||||||
|
c1.selectedIndex = 0
|
||||||
|
elseif n == 8 then
|
||||||
|
c1.selectedIndex = 3
|
||||||
|
else
|
||||||
|
c1.selectedIndex = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self._open_social then
|
||||||
|
self._view:GetChild('n78').visible = true
|
||||||
|
self._view:GetChild('n88').visible = true
|
||||||
|
self._view:GetChild('n57').visible = true
|
||||||
|
|
||||||
|
local yuyin = self._view:GetController('yuyin')
|
||||||
|
local chupai = self._view:GetController('chupai')
|
||||||
|
local fangyan = self._view:GetController('fangyan')
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin')
|
||||||
|
local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai')
|
||||||
|
local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan')
|
||||||
|
yuyin.selectedIndex = 1
|
||||||
|
chupai.selectedIndex = 1
|
||||||
|
room.yuyin_typeface = 1
|
||||||
|
room.chupai_typeface = 1
|
||||||
|
fangyan.selectedIndex = 1
|
||||||
|
room.fangyan_typeface = 1
|
||||||
|
if json_data ~= nil then
|
||||||
|
local _data = json.decode(json_data)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
room.yuyin_typeface = typeface
|
||||||
|
end
|
||||||
|
if json_data1 ~= nil then
|
||||||
|
local _data = json.decode(json_data1)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
room.chupai_typeface = typeface
|
||||||
|
end
|
||||||
|
if json_data2 ~= nil then
|
||||||
|
local _data = json.decode(json_data2)
|
||||||
|
local typeface = _data['game_typeface']
|
||||||
|
room.fangyan_typeface = typeface
|
||||||
|
end
|
||||||
|
if room.yuyin_typeface ~= nil then
|
||||||
|
yuyin.selectedIndex = room.yuyin_typeface
|
||||||
|
end
|
||||||
|
if room.chupai_typeface ~= nil then
|
||||||
|
chupai.selectedIndex = room.chupai_typeface
|
||||||
|
end
|
||||||
|
if room.fangyan_typeface ~= nil then
|
||||||
|
fangyan.selectedIndex = room.fangyan_typeface
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self._view:GetChild('n78').visible = false
|
||||||
|
self._view:GetChild('n88').visible = false
|
||||||
|
self._view:GetChild('n57').visible = false
|
||||||
|
end
|
||||||
|
|
||||||
|
c1.onChanged:Set(
|
||||||
|
function()
|
||||||
|
if self.onEXMainCallback then
|
||||||
|
self.onEXMainCallback(c1.selectedIndex + 1)
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['game_typeface'] = c1.selectedIndex + 1
|
||||||
|
local key = user_id .. room.game_id
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
size.onChanged:Set(
|
||||||
|
function()
|
||||||
|
if self.onUpdataCardSizeCallback then
|
||||||
|
self.onUpdataCardSizeCallback(size.selectedIndex)
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['game_cardsize'] = size.selectedIndex
|
||||||
|
local key = user_id .. room.game_id .. 'cardsize_new'
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
if self._open_social then
|
||||||
|
self._view:GetChild('n78').visible = false
|
||||||
|
local yuyin = self._view:GetController('yuyin')
|
||||||
|
local chupai = self._view:GetController('chupai')
|
||||||
|
local fangyan = self._view:GetController('fangyan')
|
||||||
|
yuyin.onChanged:Set(
|
||||||
|
function()
|
||||||
|
if self.onEXVoiceCallback then
|
||||||
|
room.yuyin_typeface = yuyin.selectedIndex
|
||||||
|
self.onEXVoiceCallback(yuyin.selectedIndex)
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['game_typeface'] = yuyin.selectedIndex
|
||||||
|
local key = user_id .. room.game_id .. 'yuyin'
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
chupai.onChanged:Set(
|
||||||
|
function()
|
||||||
|
if self.onEXChuPaiCallback then
|
||||||
|
room.chupai_typeface = chupai.selectedIndex
|
||||||
|
self.onEXChuPaiCallback(chupai.selectedIndex)
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['game_typeface'] = chupai.selectedIndex
|
||||||
|
local key = user_id .. room.game_id .. 'chupai'
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
fangyan.onChanged:Set(
|
||||||
|
function()
|
||||||
|
if self.onEXFangYanCallback then
|
||||||
|
room.fangyan_typeface = fangyan.selectedIndex
|
||||||
|
self.onEXFangYanCallback(fangyan.selectedIndex)
|
||||||
|
end
|
||||||
|
--点击换牌按钮后保存当前游戏的牌字体
|
||||||
|
local user_id = DataManager.SelfUser.account_id
|
||||||
|
local _data = {}
|
||||||
|
_data['game_typeface'] = fangyan.selectedIndex
|
||||||
|
local key = user_id .. room.game_id .. 'fangyan'
|
||||||
|
Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
else
|
||||||
|
self._view:GetChild('n78').visible = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:Show()
|
||||||
|
SettingView.Show(self)
|
||||||
|
self:UpdateIndex()
|
||||||
|
self:UpdateCardSizeIndex()
|
||||||
|
end
|
||||||
|
--根据存的数据改变设置里面的控制器
|
||||||
|
|
||||||
|
function M:UpdateIndex()
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
local c1 = self._view:GetController('cards')
|
||||||
|
if room.change_card_display ~= nil then
|
||||||
|
local _str = string.sub(room.change_card_display, 1, 1)
|
||||||
|
local n = tonumber(_str)
|
||||||
|
if n == 7 then
|
||||||
|
n = 2
|
||||||
|
end
|
||||||
|
if n == 1 then
|
||||||
|
c1.selectedIndex = 1
|
||||||
|
elseif n == 2 then
|
||||||
|
c1.selectedIndex = 0
|
||||||
|
elseif n == 8 then
|
||||||
|
c1.selectedIndex = 3
|
||||||
|
else
|
||||||
|
c1.selectedIndex = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function M:UpdateCardSizeIndex()
|
||||||
|
local room = DataManager.CurrenRoom
|
||||||
|
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
|
||||||
|
size.selectedIndex = 1
|
||||||
|
elseif room.change_card_size == self.smallSize then
|
||||||
|
size.selectedIndex = 2
|
||||||
|
end
|
||||||
|
else
|
||||||
|
size.selectedIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:SetBtnUpdateCardEnable(enable)
|
||||||
|
self._view:GetChild('n37').enabled = enable
|
||||||
|
self._view:GetChild('n38').enabled = enable
|
||||||
|
self._view:GetChild('n49').enabled = enable
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:FillBgSection(cb, game_id, default_bg, room, qihu)
|
||||||
|
if (default_bg == nil) then
|
||||||
|
default_bg = 1
|
||||||
|
end
|
||||||
|
local view = self._view
|
||||||
|
local lst_bg = view:GetChild('lst_bg')
|
||||||
|
local ctr_bg = view:GetController('bg')
|
||||||
|
for i = 1, #bg_config_zipai do
|
||||||
|
local config = bg_config_zipai[i]
|
||||||
|
local item = lst_bg:AddItemFromPool()
|
||||||
|
item.icon = config.thumb
|
||||||
|
if i > 3 then
|
||||||
|
ctr_bg:AddPage(i - 1)
|
||||||
|
end
|
||||||
|
item.onClick:Add(
|
||||||
|
function()
|
||||||
|
cb(config.url)
|
||||||
|
ctr_bg.selectedIndex = i - 1
|
||||||
|
if qihu ~= nil then
|
||||||
|
-- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起'
|
||||||
|
self._blur_view:GetController('bg_state').selectedIndex = i - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
self._game_id = game_id
|
||||||
|
self._bg = ZPTableBG.GetTableBG(game_id)
|
||||||
|
local index = 0
|
||||||
|
if self._bg > 0 then
|
||||||
|
lst_bg.selectedIndex = self._bg - 1
|
||||||
|
index = lst_bg.selectedIndex
|
||||||
|
else
|
||||||
|
ctr_bg.selectedIndex = default_bg - 1
|
||||||
|
index = ctr_bg.selectedIndex
|
||||||
|
end
|
||||||
|
if qihu ~= nil then
|
||||||
|
-- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起'
|
||||||
|
if index < 3 then
|
||||||
|
self._blur_view:GetController('bg_state').selectedIndex = index
|
||||||
|
else
|
||||||
|
self._blur_view:GetController('bg_state').selectedIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function M:Destroy()
|
||||||
|
local bg_id = self._view:GetController('bg').selectedIndex + 1
|
||||||
|
if self._bg ~= bg_id then
|
||||||
|
self._bg = bg_id
|
||||||
|
ZPTableBG.SaveTableBG(self._game_id, self._bg)
|
||||||
|
end
|
||||||
|
SettingView.Destroy(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
-- 记录各游戏的桌面背景
|
||||||
|
json = require 'cjson'
|
||||||
|
|
||||||
|
local ZPTableBG = {}
|
||||||
|
|
||||||
|
local M = ZPTableBG
|
||||||
|
bg_config_zipai = {
|
||||||
|
{id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"},
|
||||||
|
{id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"},
|
||||||
|
{id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"},
|
||||||
|
-- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"},
|
||||||
|
-- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"},
|
||||||
|
-- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function GetBG(data, game_id)
|
||||||
|
local bg_id = 0
|
||||||
|
for i = 1, #data do
|
||||||
|
if data[i].game_id == game_id then
|
||||||
|
bg_id = data[i].bg_id
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return bg_id
|
||||||
|
end
|
||||||
|
local function SetBG(data, game_id, bg_id)
|
||||||
|
local contain_key = false
|
||||||
|
for i = 1, #data do
|
||||||
|
if data[i].game_id == game_id then
|
||||||
|
contain_key = true
|
||||||
|
if data[i].bg_id ~= bg_id then
|
||||||
|
data[i].bg_id = bg_id
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not contain_key then
|
||||||
|
local _data = {}
|
||||||
|
_data.game_id = game_id
|
||||||
|
_data.bg_id = bg_id
|
||||||
|
table.insert(data, _data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ZPTableBG.GetTableBG(game_id)
|
||||||
|
local id = -1
|
||||||
|
local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code)
|
||||||
|
if json_data ~= nil then
|
||||||
|
local config_data = json.decode(json_data)
|
||||||
|
id = GetBG(config_data, game_id)
|
||||||
|
end
|
||||||
|
return id
|
||||||
|
end
|
||||||
|
|
||||||
|
function ZPTableBG.LoadTableBG(id, game_id, main_view)
|
||||||
|
local bg_id = M.GetTableBG(game_id)
|
||||||
|
local index
|
||||||
|
if bg_id > 0 then
|
||||||
|
index = bg_id
|
||||||
|
else
|
||||||
|
index = id
|
||||||
|
end
|
||||||
|
|
||||||
|
if index>3 then
|
||||||
|
-- body
|
||||||
|
index=1
|
||||||
|
end
|
||||||
|
local url = bg_config_zipai[index].url
|
||||||
|
LoadGameBg(url, main_view)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ZPTableBG.SaveTableBG(game_id, bg_id)
|
||||||
|
local config_data
|
||||||
|
local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code)
|
||||||
|
if json_data ~= nil then
|
||||||
|
config_data = json.decode(json_data)
|
||||||
|
else
|
||||||
|
config_data = {}
|
||||||
|
end
|
||||||
|
SetBG(config_data, game_id, bg_id)
|
||||||
|
Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data))
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
{
|
{
|
||||||
"objectStatus": {
|
|
||||||
"n45_j34t": {
|
|
||||||
"collapsed": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fitScreen": "FitSize"
|
"fitScreen": "FitSize"
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,18 @@
|
||||||
{
|
{
|
||||||
"objectStatus": {
|
"objectStatus": {
|
||||||
|
"n36_k3io": {
|
||||||
|
"collapsed": true
|
||||||
|
},
|
||||||
"n34_k3io": {
|
"n34_k3io": {
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
|
"n163_o49p": {
|
||||||
|
"hidden": true,
|
||||||
|
"collapsed": true
|
||||||
|
},
|
||||||
|
"n154_r1mo": {
|
||||||
|
"collapsed": true
|
||||||
|
},
|
||||||
"n150_8th3": {
|
"n150_8th3": {
|
||||||
"collapsed": true
|
"collapsed": true
|
||||||
},
|
},
|
||||||
|
|
@ -11,10 +21,6 @@
|
||||||
},
|
},
|
||||||
"n35_k3io": {
|
"n35_k3io": {
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
|
||||||
"n163_o49p": {
|
|
||||||
"hidden": true,
|
|
||||||
"collapsed": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"adaptiveTest": true,
|
"adaptiveTest": true,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"libview.firstColumnWidth": 522,
|
"libview.firstColumnWidth": 297,
|
||||||
"expanded_nodes": [
|
"expanded_nodes": [
|
||||||
"27vd145b",
|
"27vd145b",
|
||||||
"/",
|
"/",
|
||||||
|
|
@ -10,22 +10,41 @@
|
||||||
"doc.openedDocs": [
|
"doc.openedDocs": [
|
||||||
"ui://m7iejg4610snh5j",
|
"ui://m7iejg4610snh5j",
|
||||||
"ui://2d9xdj6zfn7fao",
|
"ui://2d9xdj6zfn7fao",
|
||||||
|
"ui://2d9xdj6zker3jg",
|
||||||
"ui://m7iejg46hsbhhjn",
|
"ui://m7iejg46hsbhhjn",
|
||||||
|
"ui://v6yvqp7wf55qvt",
|
||||||
|
"ui://v6yvqp7wf55qwa",
|
||||||
|
"ui://v6yvqp7wf55qvx",
|
||||||
|
"ui://v6yvqp7wf55qw4",
|
||||||
|
"ui://v6yvqp7w99we1h1",
|
||||||
|
"ui://v6yvqp7wf55qw5",
|
||||||
"ui://m7iejg46r0qx7i6v"
|
"ui://m7iejg46r0qx7i6v"
|
||||||
],
|
],
|
||||||
"packageGroup.mine": [],
|
"packageGroup.mine": [],
|
||||||
"test.device": "720p Phone",
|
"test.device": "720p Phone",
|
||||||
"canvasColor": 10066329,
|
"canvasColor": 10066329,
|
||||||
"auxline2": true,
|
"auxline2": true,
|
||||||
"doc.activeDoc": "ui://m7iejg46r0qx7i6v",
|
"doc.activeDoc": "ui://v6yvqp7wf55qwa",
|
||||||
"libview.twoColumn": false,
|
"libview.twoColumn": false,
|
||||||
"libview.expandedNodes": [
|
"libview.expandedNodes": [
|
||||||
"m7iejg46",
|
"ppu1wv76",
|
||||||
"/",
|
"/",
|
||||||
"m7iejg46",
|
"ppu1wv76",
|
||||||
"/images/",
|
"/component/",
|
||||||
"m7iejg46",
|
"ppu1wv76",
|
||||||
"/images/bxx/"
|
"/component/Main/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/component/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/component/Main/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/component/Main/component/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/component/Main/images/",
|
||||||
|
"v6yvqp7w",
|
||||||
|
"/component/niao/"
|
||||||
],
|
],
|
||||||
"auxline1": true,
|
"auxline1": true,
|
||||||
"snapToGrid": true,
|
"snapToGrid": true,
|
||||||
|
|
|
||||||
|
|
@ -400,6 +400,7 @@
|
||||||
<image id="iaes7dhg" name="renwu-AE_00092.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
<image id="iaes7dhg" name="renwu-AE_00092.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
||||||
<image id="iaes7dhh" name="renwu-AE_00096.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
<image id="iaes7dhh" name="renwu-AE_00096.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
||||||
<image id="iaes7dhi" name="renwu-AE_00142.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
<image id="iaes7dhi" name="renwu-AE_00142.png" path="/images/clip_renwu/" exported="true" qualityOption="source" atlas="10"/>
|
||||||
|
<<<<<<< HEAD
|
||||||
<image id="iaes7dhk" name="hecheng 1_00054.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
<image id="iaes7dhk" name="hecheng 1_00054.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
||||||
<image id="iaes7dhl" name="hecheng 1_00056.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
<image id="iaes7dhl" name="hecheng 1_00056.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
||||||
<image id="iaes7dhm" name="hecheng 1_00058.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
<image id="iaes7dhm" name="hecheng 1_00058.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
|
||||||
|
|
@ -657,6 +658,11 @@
|
||||||
<image id="thxk7dqg" name="taohua_00052.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
<image id="thxk7dqg" name="taohua_00052.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
||||||
<image id="thxk7dqh" name="taohua_00028.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
<image id="thxk7dqh" name="taohua_00028.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
||||||
<image id="thxk7dqi" name="taohua_00114.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
<image id="thxk7dqi" name="taohua_00114.png" path="/images/clip_bg/" exported="true" atlas="6"/>
|
||||||
|
=======
|
||||||
|
<misc id="nzuk7dhj" name="1030107.atlas" path="/images/movieClip/"/>
|
||||||
|
<image id="nzuk7dhk" name="1030107.png" path="/images/movieClip/"/>
|
||||||
|
<spine id="nzuk7dhl" name="1030107.json" path="/images/movieClip/" width="1053" height="1042" require="nzuk7dhj,nzuk7dhk" atlasNames="1030107" anchor="289,996"/>
|
||||||
|
>>>>>>> abfaee1b282a05078baf5eb31aea53471d1e3a26
|
||||||
</resources>
|
</resources>
|
||||||
<publish name="Lobby" path="..\wb_unity_pro\Assets\ART\base\lobby\ui" packageCount="2">
|
<publish name="Lobby" path="..\wb_unity_pro\Assets\ART\base\lobby\ui" packageCount="2">
|
||||||
<atlas name="默认" index="0"/>
|
<atlas name="默认" index="0"/>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态" selected="0"/>
|
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态" selected="0"/>
|
||||||
<controller name="sdk" pages="0,,1," selected="0"/>
|
<controller name="sdk" pages="0,,1," selected="0"/>
|
||||||
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
|
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
|
||||||
<controller name="jushu" pages="0,,1," selected="0"/>
|
<controller name="jushu" pages="0,,1," selected="1"/>
|
||||||
<controller name="bg_state" pages="0,,1,,2," selected="0"/>
|
<controller name="bg_state" pages="0,,1,,2," selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<text id="n176_fgao" name="di_text" xy="179,177" size="965,42" fontSize="30" color="#49925d" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#296137" text="123456789">
|
<text id="n176_fgao" name="di_text" xy="179,177" size="965,42" fontSize="30" color="#49925d" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#296137" text="123456789">
|
||||||
|
|
@ -73,25 +73,25 @@
|
||||||
<gearDisplay controller="state" pages="1,2"/>
|
<gearDisplay controller="state" pages="1,2"/>
|
||||||
<relation target="" sidePair="left-left"/>
|
<relation target="" sidePair="left-left"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n24" name="right_panel" src="f55qvt" fileName="component/Main/component/Folder/RightPanel.xml" xy="234,3" size="869,80" group="n150_8th3">
|
<component id="n24" name="right_panel" src="f55qvt" fileName="component/Main/component/Folder/RightPanel.xml" xy="209,5" size="869,107" group="n150_8th3">
|
||||||
<gearDisplay controller="state" pages="0,1,2,3"/>
|
<gearDisplay controller="state" pages="0,1,2,3"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n37_kba2" name="roominfo_panel1" src="f55qwb" fileName="component/Main/RoomInfoPanel1.xml" xy="395,7" size="332,80" group="n150_8th3" visible="false" touchable="false"/>
|
<component id="n37_kba2" name="roominfo_panel1" src="f55qwb" fileName="component/Main/RoomInfoPanel1.xml" xy="370,9" size="332,80" group="n150_8th3" visible="false" touchable="false"/>
|
||||||
<component id="n31_h1uu" name="roominfo_panel" src="f55qwb" fileName="component/Main/RoomInfoPanel1.xml" xy="394,12" size="322,80" group="n150_8th3" visible="false" touchable="false"/>
|
<component id="n31_h1uu" name="roominfo_panel" src="f55qwb" fileName="component/Main/RoomInfoPanel1.xml" xy="-3,84" size="322,80" group="n150_8th3" visible="false" touchable="false"/>
|
||||||
<component id="n46_u4l2" name="btn_rule1" src="f55qvn" fileName="component/Main/component/Folder/component/phone_info/Btn_log.xml" xy="715,4" size="106,29" group="n150_8th3" visible="false"/>
|
<component id="n46_u4l2" name="btn_rule1" src="f55qvn" fileName="component/Main/component/Folder/component/phone_info/Btn_log.xml" xy="690,6" size="106,29" group="n150_8th3" visible="false"/>
|
||||||
<component id="n166_o49p" name="btn_back_lobby" src="f55qvp" fileName="component/Main/component/Folder/component/phone_info/Btn_back_lobby.xml" xy="974,2" size="61,89" group="n150_8th3">
|
<component id="n166_o49p" name="btn_back_lobby" src="f55qvp" fileName="component/Main/component/Folder/component/phone_info/Btn_back_lobby.xml" xy="949,4" size="61,89" group="n150_8th3">
|
||||||
<gearDisplay controller="state" pages="0,3"/>
|
<gearDisplay controller="state" pages="0,3"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n167_o49p" name="Btn_jiesan_lobby" src="oynr1ag" fileName="component/Main/component/Folder/component/phone_info/Btn_jiesan_lobby.xml" xy="974,2" size="61,89" group="n150_8th3">
|
<component id="n167_o49p" name="Btn_jiesan_lobby" src="oynr1ag" fileName="component/Main/component/Folder/component/phone_info/Btn_jiesan_lobby.xml" xy="949,4" size="61,89" group="n150_8th3">
|
||||||
<gearDisplay controller="state" pages="1,2"/>
|
<gearDisplay controller="state" pages="1,2"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n181_r1z9" name="btn_leave_lobby" src="r1z91gx" fileName="component/Main/component/Folder/component/phone_info/Btn_leave_lobby.xml" xy="1118,17" group="n150_8th3">
|
<component id="n181_r1z9" name="btn_leave_lobby" src="r1z91gx" fileName="component/Main/component/Folder/component/phone_info/Btn_leave_lobby.xml" xy="1093,19" group="n150_8th3">
|
||||||
<gearDisplay controller="state" pages="0,3"/>
|
<gearDisplay controller="state" pages="0,3"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n168_o49p" name="btn_setting" src="f55qva" fileName="component/Main/component/Folder/component/phone_info/Btn_setting.xml" xy="1034,4" size="72,89" group="n150_8th3">
|
<component id="n168_o49p" name="btn_setting" src="f55qva" fileName="component/Main/component/Folder/component/phone_info/Btn_setting.xml" xy="1009,6" size="72,89" group="n150_8th3">
|
||||||
<gearDisplay controller="state" pages="0,1,2"/>
|
<gearDisplay controller="state" pages="0,1,2"/>
|
||||||
</component>
|
</component>
|
||||||
<group id="n150_8th3" name="n150" xy="234,2" size="941,92" advanced="true">
|
<group id="n150_8th3" name="n150" xy="-3,4" size="1154,160" advanced="true">
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</group>
|
</group>
|
||||||
<image id="n152_8th3" name="n152" src="f55qvu" fileName="component/Main/images/di00.png" xy="377,6" size="580,86" visible="false">
|
<image id="n152_8th3" name="n152" src="f55qvu" fileName="component/Main/images/di00.png" xy="377,6" size="580,86" visible="false">
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
<gearDisplay controller="state" pages="0"/>
|
<gearDisplay controller="state" pages="0"/>
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</group>
|
</group>
|
||||||
<component id="n179_kxwj" name="btn_distance" src="kxwjhyc" fileName="component/gps/btn_distance_new.xml" pkg="27vd145b" xy="172,16" visible="false" touchable="false">
|
<component id="n179_kxwj" name="btn_distance" src="kxwjhyc" fileName="component/gps/btn_distance_new.xml" pkg="27vd145b" xy="97,13" visible="false" touchable="false">
|
||||||
<gearDisplay controller="state" pages="0,1,2"/>
|
<gearDisplay controller="state" pages="0,1,2"/>
|
||||||
</component>
|
</component>
|
||||||
</displayList>
|
</displayList>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,17 @@
|
||||||
<controller name="mask_voice" pages="0,,1," selected="0"/>
|
<controller name="mask_voice" pages="0,,1," selected="0"/>
|
||||||
<controller name="dismiss_room" pages="0,,1," selected="0"/>
|
<controller name="dismiss_room" pages="0,,1," selected="0"/>
|
||||||
<controller name="time" pages="0,,1," selected="0"/>
|
<controller name="time" pages="0,,1," selected="0"/>
|
||||||
<controller name="huxi" pages="0,,1," selected="0"/>
|
<controller name="huxi" pages="0,,1," selected="1"/>
|
||||||
<controller name="tuo" pages="0,,1," selected="0"/>
|
<controller name="tuo" pages="0,,1," selected="0"/>
|
||||||
<controller name="piao" pages="0,,1," selected="0"/>
|
<controller name="piao" pages="0,,1," selected="1"/>
|
||||||
<controller name="jushou" pages="0,,1," selected="0"/>
|
<controller name="jushou" pages="0,,1," selected="0"/>
|
||||||
<controller name="chui" pages="0,,1,,2," selected="0"/>
|
<controller name="chui" pages="0,,1,,2," selected="0"/>
|
||||||
<controller name="sishou" pages="0,,1," selected="0"/>
|
<controller name="sishou" pages="0,,1," selected="0"/>
|
||||||
<controller name="zhanji" pages="0,,1," selected="0"/>
|
<controller name="zhanji" pages="0,,1," selected="1"/>
|
||||||
|
<controller name="niao" pages="0,,1," selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n77_o49p" name="n77" src="o49p1cj" fileName="component/Main/component/new_ui/touxiang_img.png" xy="2,-76" size="121,173"/>
|
<image id="n77_o49p" name="n77" src="o49p1cj" fileName="component/Main/component/new_ui/touxiang_img.png" xy="2,-76" size="121,173"/>
|
||||||
<image id="n28_e54q" name="n28" src="lwcl2m" fileName="images/head/index_bg_01.png" pkg="27vd145b" xy="-1,-51" size="100,98" group="n33_e7qn" aspect="true" visible="false"/>
|
<image id="n28_e54q" name="n28" src="lwcl2m" fileName="font/images/head/index_bg_01.png" pkg="27vd145b" xy="-1,-51" size="100,98" group="n33_e7qn" aspect="true" visible="false"/>
|
||||||
<image id="n34_u4l2" name="zhuang1" pkg="27vd145b" src="e54q3w" fileName="images/head/bank.png" xy="-40,-92" group="n33_e7qn" visible="false">
|
<image id="n34_u4l2" name="zhuang1" pkg="27vd145b" src="e54q3w" fileName="images/head/bank.png" xy="-40,-92" group="n33_e7qn" visible="false">
|
||||||
<gearDisplay controller="time" pages="1"/>
|
<gearDisplay controller="time" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -24,7 +25,7 @@
|
||||||
<image id="n79_cbxl" name="zhuang" src="o49p1cl" fileName="component/Main/component/new_ui/touxiangkuang_img.png" xy="11,-72" size="98,98" group="n33_e7qn">
|
<image id="n79_cbxl" name="zhuang" src="o49p1cl" fileName="component/Main/component/new_ui/touxiangkuang_img.png" xy="11,-72" size="98,98" group="n33_e7qn">
|
||||||
<gearDisplay controller="time" pages="1"/>
|
<gearDisplay controller="time" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n37_aawn" name="n37" xy="28,-36" size="63,41" group="n33_e7qn" fontSize="30" color="#ffffff" text="离线">
|
<text id="n37_aawn" name="n37" xy="28,-36" size="64,41" group="n33_e7qn" fontSize="30" color="#ffffff" text="离线">
|
||||||
<gearDisplay controller="offline" pages="1"/>
|
<gearDisplay controller="offline" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<image id="n81_cbxl" name="fangzhu" src="cbxl1gf" fileName="component/Main/component/new_ui/房主.png" xy="3,-75" group="n33_e7qn" visible="false">
|
<image id="n81_cbxl" name="fangzhu" src="cbxl1gf" fileName="component/Main/component/new_ui/房主.png" xy="3,-75" group="n33_e7qn" visible="false">
|
||||||
|
|
@ -42,14 +43,14 @@
|
||||||
<image id="n57_fnpw" name="n57" src="fnpwwp" fileName="component/Main/images/niuniu_icon_12.png" xy="0,-85" group="n33_e7qn" visible="false">
|
<image id="n57_fnpw" name="n57" src="fnpwwp" fileName="component/Main/images/niuniu_icon_12.png" xy="0,-85" group="n33_e7qn" visible="false">
|
||||||
<gearDisplay controller="bank" pages="1"/>
|
<gearDisplay controller="bank" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n62_vt54" name="n62" xy="30,-36" size="63,41" group="n33_e7qn" fontSize="30" color="#ffffff" text="死手">
|
<text id="n62_vt54" name="n62" xy="30,-36" size="64,41" group="n33_e7qn" fontSize="30" color="#ffffff" text="死手">
|
||||||
<gearDisplay controller="sishou" pages="1"/>
|
<gearDisplay controller="sishou" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<image id="n80_cbxl" name="n80" src="cbxl1ge" fileName="component/Main/component/new_ui/zhuang_img.png" xy="82,-86" group="n33_e7qn">
|
<image id="n80_cbxl" name="n80" src="cbxl1ge" fileName="component/Main/component/new_ui/zhuang_img.png" xy="82,-86" group="n33_e7qn">
|
||||||
<gearDisplay controller="bank" pages="1"/>
|
<gearDisplay controller="bank" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<group id="n33_e7qn" name="n33" xy="-40,-92" size="187,151"/>
|
<group id="n33_e7qn" name="n33" xy="-40,-92" size="187,151"/>
|
||||||
<image id="n8" name="ready" src="kba23z" fileName="images/game/game_fonts_01.png" pkg="27vd145b" xy="133,-58" visible="false">
|
<image id="n8" name="ready" src="kba23z" fileName="font/images/game/game_fonts_01.png" pkg="27vd145b" xy="133,-58" visible="false">
|
||||||
<gearDisplay controller="read" pages="1"/>
|
<gearDisplay controller="read" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<component id="n78_fgao" name="info" src="fgao1dk" fileName="component/Main/component/HeadNameBG.xml" xy="-1,35" size="124,49"/>
|
<component id="n78_fgao" name="info" src="fgao1dk" fileName="component/Main/component/HeadNameBG.xml" xy="-1,35" size="124,49"/>
|
||||||
|
|
@ -62,10 +63,10 @@
|
||||||
<component id="n41_jali" name="n41" src="h1uu2j" fileName="component/VoiceMask(1).xml" pkg="l0ds4ys6" xy="-8,-128">
|
<component id="n41_jali" name="n41" src="h1uu2j" fileName="component/VoiceMask(1).xml" pkg="l0ds4ys6" xy="-8,-128">
|
||||||
<gearDisplay controller="mask_voice" pages="1"/>
|
<gearDisplay controller="mask_voice" pages="1"/>
|
||||||
</component>
|
</component>
|
||||||
<image id="n73_o49p" name="n73" src="o49p1cw" fileName="component/Main/new_ui/jifen_bg_img.png" xy="-2,102" size="130,35" group="n51_m25s" aspect="true"/>
|
<image id="n73_o49p" name="n73" src="o49p1cw" fileName="component/Main/new_ui/jifen_bg_img.png" xy="-2,98" size="130,35" group="n51_m25s" aspect="true"/>
|
||||||
<text id="n49_m25s" name="huxi" xy="52,102" size="77,31" group="n51_m25s" fontSize="22" color="#ffffff" align="center" vAlign="middle" leading="0" autoSize="shrink" singleLine="true" text="11111"/>
|
<text id="n49_m25s" name="huxi" xy="52,98" size="77,31" group="n51_m25s" fontSize="22" color="#ffffff" align="center" vAlign="middle" leading="0" autoSize="shrink" singleLine="true" text="11111"/>
|
||||||
<text id="n50_m25s" name="n50" xy="2,105" size="47,27" group="n51_m25s" fontSize="20" color="#512e06" align="center" vAlign="middle" autoSize="none" singleLine="true" text="胡息
"/>
|
<text id="n50_m25s" name="n50" xy="2,101" size="47,27" group="n51_m25s" fontSize="20" color="#512e06" align="center" vAlign="middle" autoSize="none" singleLine="true" text="胡息
"/>
|
||||||
<group id="n51_m25s" name="n51" xy="-2,102" size="132,35" advanced="true">
|
<group id="n51_m25s" name="n51" xy="-2,98" size="132,35" advanced="true">
|
||||||
<gearDisplay controller="huxi" pages="1"/>
|
<gearDisplay controller="huxi" pages="1"/>
|
||||||
</group>
|
</group>
|
||||||
<image id="n52_nu0l" name="n52" src="f55qw3" fileName="component/Main/images/c00.png" xy="-2,4" visible="false">
|
<image id="n52_nu0l" name="n52" src="f55qw3" fileName="component/Main/images/c00.png" xy="-2,4" visible="false">
|
||||||
|
|
@ -74,7 +75,7 @@
|
||||||
<image id="n54_r1mo" name="n54" src="r1mown" fileName="images/di(1)(1).png" xy="-11,0" group="n56_r1mo">
|
<image id="n54_r1mo" name="n54" src="r1mown" fileName="images/di(1)(1).png" xy="-11,0" group="n56_r1mo">
|
||||||
<gearDisplay controller="piao" pages="1"/>
|
<gearDisplay controller="piao" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n55_r1mo" name="piaotext" xy="26,4" size="69,37" group="n56_r1mo" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="飘鸟 10
">
|
<text id="n55_r1mo" name="piaotext" xy="26,10" size="69,31" group="n56_r1mo" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="飘鸟 10
">
|
||||||
<gearDisplay controller="piao" pages="1"/>
|
<gearDisplay controller="piao" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<group id="n56_r1mo" name="n56" xy="-11,0" size="148,42"/>
|
<group id="n56_r1mo" name="n56" xy="-11,0" size="148,42"/>
|
||||||
|
|
@ -90,16 +91,24 @@
|
||||||
<image id="n70_o49p" name="n70" pkg="3bfrwj0h" src="o49ppl" fileName="component/Main/new_ui/jiachui_img.png" xy="0,-9">
|
<image id="n70_o49p" name="n70" pkg="3bfrwj0h" src="o49ppl" fileName="component/Main/new_ui/jiachui_img.png" xy="0,-9">
|
||||||
<gearDisplay controller="chui" pages="1,2"/>
|
<gearDisplay controller="chui" pages="1,2"/>
|
||||||
</image>
|
</image>
|
||||||
<image id="n71_o49p" name="n71" src="f7zuchj" fileName="images/game/game_new_fonts_01.png" pkg="27vd145b" xy="134,-60">
|
<image id="n71_o49p" name="n71" src="f7zuchj" fileName="font/images/game/game_new_fonts_01.png" pkg="27vd145b" xy="134,-60">
|
||||||
<gearDisplay controller="read" pages="1"/>
|
<gearDisplay controller="read" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<image id="n74_o49p" name="n74" src="o49p1cw" fileName="component/Main/new_ui/jifen_bg_img.png" xy="-2,138" size="126,33" group="n76_o49p"/>
|
<image id="n74_o49p" name="n74" src="o49p1cw" fileName="component/Main/new_ui/jifen_bg_img.png" xy="-2,133" size="126,33" group="n76_o49p"/>
|
||||||
<text id="n60_seby" name="tex_jifen" xy="52,139" size="77,29" group="n76_o49p" fontSize="22" color="#ffffff" align="center" vAlign="middle" autoSize="shrink" text="22222"/>
|
<text id="n60_seby" name="tex_jifen" xy="52,134" size="77,29" group="n76_o49p" fontSize="22" color="#ffffff" align="center" vAlign="middle" autoSize="shrink" text="22222"/>
|
||||||
<text id="n75_o49p" name="tex_jifen_text" xy="5,140" size="44,29" group="n76_o49p" fontSize="20" color="#512e06" align="center" vAlign="middle" text="战绩"/>
|
<text id="n75_o49p" name="tex_jifen_text" xy="5,135" size="44,29" group="n76_o49p" fontSize="20" color="#512e06" align="center" vAlign="middle" text="战绩"/>
|
||||||
<group id="n76_o49p" name="n76" xy="-2,138" size="131,33" advanced="true">
|
<group id="n76_o49p" name="n76" xy="-2,133" size="131,33" advanced="true">
|
||||||
<gearDisplay controller="zhanji" pages="1"/>
|
<gearDisplay controller="zhanji" pages="1"/>
|
||||||
</group>
|
</group>
|
||||||
<text id="n84_nkur" name="tuoguanTips" xy="5,-123" size="302,48" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间"/>
|
<text id="n84_nkur" name="tuoguanTips" xy="5,-123" size="302,48" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间"/>
|
||||||
<text id="n85_j34t" name="piao" xy="129,-50" size="92,29" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
|
<text id="n85_j34t" name="piao" xy="130,-50" size="92,29" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
|
||||||
|
<text id="n86_ybf5" name="niao" xy="130,-50" size="92,36" fontSize="24" color="#ffd100" align="center" vAlign="middle" autoSize="none" bold="true" text=""/>
|
||||||
|
<image id="n87_ybf5" name="niao8" src="r1mown" fileName="images/di(1)(1).png" xy="-9,-13" group="n89_ybf5">
|
||||||
|
<gearDisplay controller="niao" pages="1"/>
|
||||||
|
</image>
|
||||||
|
<text id="n88_ybf5" name="niaotext" xy="28,-3" size="69,31" group="n89_ybf5" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="打鸟">
|
||||||
|
<gearDisplay controller="niao" pages="1"/>
|
||||||
|
</text>
|
||||||
|
<group id="n89_ybf5" name="n89" xy="-9,-13" size="148,42"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -8,14 +8,15 @@
|
||||||
<controller name="time" pages="0,,1," selected="0"/>
|
<controller name="time" pages="0,,1," selected="0"/>
|
||||||
<controller name="huxi" pages="0,,1," selected="0"/>
|
<controller name="huxi" pages="0,,1," selected="0"/>
|
||||||
<controller name="tuo" pages="0,,1," selected="0"/>
|
<controller name="tuo" pages="0,,1," selected="0"/>
|
||||||
<controller name="piao" pages="0,,1," selected="0"/>
|
<controller name="piao" pages="0,,1," selected="1"/>
|
||||||
<controller name="jushou" pages="0,,1," selected="0"/>
|
<controller name="jushou" pages="0,,1," selected="0"/>
|
||||||
<controller name="chui" pages="0,,1,,2," selected="0"/>
|
<controller name="chui" pages="0,,1,,2," selected="0"/>
|
||||||
<controller name="sishou" pages="0,,1," selected="0"/>
|
<controller name="sishou" pages="0,,1," selected="0"/>
|
||||||
<controller name="zhanji" pages="0,,1," selected="0"/>
|
<controller name="zhanji" pages="0,,1," selected="1"/>
|
||||||
|
<controller name="niao" pages="0,,1," selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n76_o49p" name="n76" src="o49p1cj" fileName="component/Main/component/new_ui/touxiang_img.png" xy="13,-26" size="123,172"/>
|
<image id="n76_o49p" name="n76" src="o49p1cj" fileName="component/Main/component/new_ui/touxiang_img.png" xy="13,-26" size="123,172"/>
|
||||||
<image id="n34_e7qn" name="n34" src="lwcl2m" fileName="images/head/index_bg_01.png" pkg="27vd145b" xy="18,0" size="100,98" group="n39_e7qn" aspect="true" visible="false"/>
|
<image id="n34_e7qn" name="n34" src="lwcl2m" fileName="font/images/head/index_bg_01.png" pkg="27vd145b" xy="18,0" size="100,98" group="n39_e7qn" aspect="true" visible="false"/>
|
||||||
<image id="n38_e7qn" name="zhuang1" pkg="27vd145b" src="e54q3w" fileName="images/head/bank.png" xy="-20,-38" group="n39_e7qn" aspect="true" visible="false">
|
<image id="n38_e7qn" name="zhuang1" pkg="27vd145b" src="e54q3w" fileName="images/head/bank.png" xy="-20,-38" group="n39_e7qn" aspect="true" visible="false">
|
||||||
<gearDisplay controller="time" pages="1"/>
|
<gearDisplay controller="time" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -29,7 +30,7 @@
|
||||||
<graph id="n62_vt54" name="sishou" xy="21,-23" size="105,105" group="n39_e7qn" aspect="true" touchable="false" type="rect" lineSize="0" fillColor="#b3000000">
|
<graph id="n62_vt54" name="sishou" xy="21,-23" size="105,105" group="n39_e7qn" aspect="true" touchable="false" type="rect" lineSize="0" fillColor="#b3000000">
|
||||||
<gearDisplay controller="sishou" pages="1"/>
|
<gearDisplay controller="sishou" pages="1"/>
|
||||||
</graph>
|
</graph>
|
||||||
<text id="n63_vt54" name="n63" xy="44,14" size="63,41" group="n39_e7qn" fontSize="30" color="#ffffff" text="死手">
|
<text id="n63_vt54" name="n63" xy="44,14" size="64,41" group="n39_e7qn" fontSize="30" color="#ffffff" text="死手">
|
||||||
<gearDisplay controller="sishou" pages="1"/>
|
<gearDisplay controller="sishou" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<graph id="n36_e7qn" name="offLine" xy="20,-23" size="107,107" group="n39_e7qn" aspect="true" touchable="false" type="rect" lineSize="0" fillColor="#b3000000">
|
<graph id="n36_e7qn" name="offLine" xy="20,-23" size="107,107" group="n39_e7qn" aspect="true" touchable="false" type="rect" lineSize="0" fillColor="#b3000000">
|
||||||
|
|
@ -38,7 +39,7 @@
|
||||||
<image id="n37_e7qn" name="fangzhu" src="fnpwwo" fileName="component/Main/images/owner.png" xy="10,-26" group="n39_e7qn" visible="false">
|
<image id="n37_e7qn" name="fangzhu" src="fnpwwo" fileName="component/Main/images/owner.png" xy="10,-26" group="n39_e7qn" visible="false">
|
||||||
<gearDisplay controller="room_owner" pages="1"/>
|
<gearDisplay controller="room_owner" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n42_aawn" name="n42" xy="42,14" size="63,41" group="n39_e7qn" fontSize="30" color="#ffffff" text="离线">
|
<text id="n42_aawn" name="n42" xy="42,14" size="64,41" group="n39_e7qn" fontSize="30" color="#ffffff" text="离线">
|
||||||
<gearDisplay controller="offline" pages="1"/>
|
<gearDisplay controller="offline" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<image id="n58_fnpw" name="n58" src="fnpwwp" fileName="component/Main/images/niuniu_icon_12.png" xy="83,1" group="n39_e7qn" visible="false">
|
<image id="n58_fnpw" name="n58" src="fnpwwp" fileName="component/Main/images/niuniu_icon_12.png" xy="83,1" group="n39_e7qn" visible="false">
|
||||||
|
|
@ -54,10 +55,10 @@
|
||||||
<gearDisplay controller="room_owner" pages="1"/>
|
<gearDisplay controller="room_owner" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<group id="n39_e7qn" name="n39" xy="-20,-38" size="180,180"/>
|
<group id="n39_e7qn" name="n39" xy="-20,-38" size="180,180"/>
|
||||||
<image id="n8" name="ready1" src="kba23z" fileName="images/game/game_fonts_01.png" pkg="27vd145b" xy="-135,50" visible="false">
|
<image id="n8" name="ready1" src="kba23z" fileName="font/images/game/game_fonts_01.png" pkg="27vd145b" xy="-135,50" visible="false">
|
||||||
<gearDisplay controller="read" pages="1"/>
|
<gearDisplay controller="read" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<image id="n65_o49p" name="ready" src="f7zuchj" fileName="images/game/game_new_fonts_01.png" pkg="27vd145b" xy="-133,48">
|
<image id="n65_o49p" name="ready" src="f7zuchj" fileName="font/images/game/game_new_fonts_01.png" pkg="27vd145b" xy="-133,48">
|
||||||
<gearDisplay controller="read" pages="1"/>
|
<gearDisplay controller="read" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<component id="n77_fgao" name="info" src="fgao1dk" fileName="component/Main/component/HeadNameBG.xml" xy="13,86" size="124,54"/>
|
<component id="n77_fgao" name="info" src="fgao1dk" fileName="component/Main/component/HeadNameBG.xml" xy="13,86" size="124,54"/>
|
||||||
|
|
@ -79,13 +80,13 @@
|
||||||
</image>
|
</image>
|
||||||
<component id="n31_e54q" name="chat" src="h1uu22" fileName="component/MsgBubble1.xml" pkg="l0ds4ys6" xy="-152,6" alpha="0"/>
|
<component id="n31_e54q" name="chat" src="h1uu22" fileName="component/MsgBubble1.xml" pkg="l0ds4ys6" xy="-152,6" alpha="0"/>
|
||||||
<component id="n27_e54q" name="face" src="e54q2v" fileName="component/Face3.xml" pkg="l0ds4ys6" xy="-136,2" alpha="0"/>
|
<component id="n27_e54q" name="face" src="e54q2v" fileName="component/Face3.xml" pkg="l0ds4ys6" xy="-136,2" alpha="0"/>
|
||||||
<image id="n55_r1mo" name="n55" src="r1mown" fileName="images/di(1)(1).png" xy="5,45" group="n57_r1mo">
|
<image id="n55_r1mo" name="n55" src="r1mown" fileName="images/di(1)(1).png" xy="3,44" group="n57_r1mo">
|
||||||
<gearDisplay controller="piao" pages="1"/>
|
<gearDisplay controller="piao" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n56_r1mo" name="piaotext" xy="42,50" size="69,37" group="n57_r1mo" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="飘鸟 10
">
|
<text id="n56_r1mo" name="piaotext" xy="40,49" size="69,37" group="n57_r1mo" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="飘鸟 10
">
|
||||||
<gearDisplay controller="piao" pages="1"/>
|
<gearDisplay controller="piao" pages="1"/>
|
||||||
</text>
|
</text>
|
||||||
<group id="n57_r1mo" name="n57" xy="5,45" size="148,42"/>
|
<group id="n57_r1mo" name="n57" xy="3,44" size="148,42"/>
|
||||||
<image id="n59_mk2u" name="n59" src="mk2u14g" fileName="component/Main/images/hand.png" xy="-48,46" size="56,59">
|
<image id="n59_mk2u" name="n59" src="mk2u14g" fileName="component/Main/images/hand.png" xy="-48,46" size="56,59">
|
||||||
<gearDisplay controller="jushou" pages="1"/>
|
<gearDisplay controller="jushou" pages="1"/>
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -100,6 +101,13 @@
|
||||||
</group>
|
</group>
|
||||||
<text id="n82_nkur" name="tuoguanTips" xy="-265,46" size="237,48" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间90S"/>
|
<text id="n82_nkur" name="tuoguanTips" xy="-265,46" size="237,48" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间90S"/>
|
||||||
<text id="n83_j34t" name="piao" xy="-119,3" size="92,29" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
|
<text id="n83_j34t" name="piao" xy="-119,3" size="92,29" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
|
||||||
|
<image id="n84_ybf5" name="n84" src="r1mown" fileName="images/di(1)(1).png" xy="3,44" group="n86_ybf5">
|
||||||
|
<gearDisplay controller="niao" pages="1"/>
|
||||||
|
</image>
|
||||||
|
<text id="n85_ybf5" name="niaotext" xy="40,49" size="69,37" group="n86_ybf5" fontSize="15" color="#ffd554" align="center" vAlign="middle" autoSize="none" text="飘鸟 10
">
|
||||||
|
<gearDisplay controller="niao" pages="1"/>
|
||||||
|
</text>
|
||||||
|
<group id="n86_ybf5" name="n86" xy="3,44" size="148,42"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
<transition name="t0" autoPlay="true" autoPlayRepeat="-1"/>
|
<transition name="t0" autoPlay="true" autoPlayRepeat="-1"/>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<component id="n47_cphv" name="budaniao" src="99we1h2" fileName="component/niao/btn_noniao.xml" xy="769,-183" group="n48_cphv">
|
<component id="n47_cphv" name="budaniao" src="99we1h2" fileName="component/niao/btn_noniao.xml" xy="769,-183" group="n48_cphv">
|
||||||
<gearDisplay controller="niao" pages="1"/>
|
<gearDisplay controller="niao" pages="1"/>
|
||||||
</component>
|
</component>
|
||||||
<group id="n48_cphv" name="n48" xy="331,-183" size="688,103"/>
|
<group id="n48_cphv" name="niao" xy="331,-183" size="688,103"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
<transition name="t0">
|
<transition name="t0">
|
||||||
<item time="0" type="XY" target="n27" tween="true" startValue="490,-350" endValue="1136.53,-161.41" duration="4"/>
|
<item time="0" type="XY" target="n27" tween="true" startValue="490,-350" endValue="1136.53,-161.41" duration="4"/>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<component size="1334,217" opaque="false" initName="player_card_info">
|
|
||||||
<controller name="chupai" pages="0,,1," selected="1"/>
|
|
||||||
<displayList>
|
|
||||||
<list id="n36_lr5d" name="windcard_list" xy="0,-125" size="369,81" layout="flow_hz" lineGap="1" colGap="1" defaultItem="ui://v6yvqp7wf55qvw" vAlign="middle"/>
|
|
||||||
<list id="n35_lr5d" name="area_fz_list" xy="570,-327" size="200,135" layout="row" selectionMode="none" lineGap="3" colGap="5" defaultItem="ui://v6yvqp7wlr5d30"/>
|
|
||||||
<component id="n25" name="area_handcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="160,81" size="1039,131"/>
|
|
||||||
<component id="n37_n1ry" name="mask_liangpai" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="600,-250" size="5,5"/>
|
|
||||||
<component id="n38_ey1o" name="n38" src="f55qvy" fileName="component/Main/component/PromptOutCard.xml" xy="116,-145">
|
|
||||||
<gearDisplay controller="chupai" pages="1"/>
|
|
||||||
</component>
|
|
||||||
<component id="n27" name="area_outcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="640,-410" size="65,84"/>
|
|
||||||
</displayList>
|
|
||||||
<transition name="t0">
|
|
||||||
<item time="0" type="XY" target="n27" tween="true" startValue="490,-350" endValue="1136.53,-161.41" duration="4"/>
|
|
||||||
<item time="7" type="XY" target="n27" value="490,-350"/>
|
|
||||||
</transition>
|
|
||||||
</component>
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<component size="1334,216" pivot="0.3,0" opaque="false" initName="player_card_info">
|
|
||||||
<displayList>
|
|
||||||
<list id="n26_nu0l" name="windcard_list" xy="6,-130" size="369,101" layout="flow_hz" lineGap="1" colGap="1" defaultItem="ui://v6yvqp7wf55qvw"/>
|
|
||||||
<list id="n27_nu0l" name="area_fz_list" xy="126,23" size="200,135" layout="row" selectionMode="none" lineGap="3" colGap="5" defaultItem="ui://v6yvqp7wlr5d30"/>
|
|
||||||
<component id="n33_nu0l" name="mask_liangpai" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="898,-249" size="5,5"/>
|
|
||||||
<component id="n37_nu0l" name="area_handcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="261,-2" size="300,175" touchable="false"/>
|
|
||||||
<component id="n35_nu0l" name="area_outcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="361,-289" size="65,84"/>
|
|
||||||
</displayList>
|
|
||||||
<transition name="t0">
|
|
||||||
<item time="0" type="XY" target="n35_nu0l" tween="true" startValue="979,-326" endValue="1137,-123.73" duration="4"/>
|
|
||||||
<item time="7" type="XY" target="n35_nu0l" value="979,-326"/>
|
|
||||||
</transition>
|
|
||||||
</component>
|
|
||||||
|
|
@ -650,8 +650,6 @@
|
||||||
<image id="oynr1al" name="4g02.png" path="/component/Main/component/Folder/component/phone_info/" exported="true"/>
|
<image id="oynr1al" name="4g02.png" path="/component/Main/component/Folder/component/phone_info/" exported="true"/>
|
||||||
<image id="oynr1am" name="4g03.png" path="/component/Main/component/Folder/component/phone_info/" exported="true"/>
|
<image id="oynr1am" name="4g03.png" path="/component/Main/component/Folder/component/phone_info/" exported="true"/>
|
||||||
<image id="oynr1an" name="zipai02.png" path="/component/images/" exported="true"/>
|
<image id="oynr1an" name="zipai02.png" path="/component/images/" exported="true"/>
|
||||||
<component id="seby1au" name="Player_card_info_3_1.xml" path="/component/Main/component/" exported="true"/>
|
|
||||||
<component id="seby1av" name="Player_card_info_1_1.xml" path="/component/Main/component/" exported="true"/>
|
|
||||||
<component id="f7zu1aw" name="btn_invite.xml" path="/component/room/"/>
|
<component id="f7zu1aw" name="btn_invite.xml" path="/component/room/"/>
|
||||||
<image id="f7zu1ax" name="game_btn_kaiju_huang.png" path="/component/room/" exported="true" scale="9grid" scale9grid="73,23,146,46"/>
|
<image id="f7zu1ax" name="game_btn_kaiju_huang.png" path="/component/room/" exported="true" scale="9grid" scale9grid="73,23,146,46"/>
|
||||||
<image id="f7zu1ay" name="game_btx_fuzhifangjianhao.png" path="/component/room/" exported="true"/>
|
<image id="f7zu1ay" name="game_btx_fuzhifangjianhao.png" path="/component/room/" exported="true"/>
|
||||||
|
|
@ -853,8 +851,8 @@
|
||||||
<image id="wkl71gy" name="clock.png" path="/component/Main/images/"/>
|
<image id="wkl71gy" name="clock.png" path="/component/Main/images/"/>
|
||||||
<image id="99we1gz" name="budaniao.png" path="/component/Main/images/"/>
|
<image id="99we1gz" name="budaniao.png" path="/component/Main/images/"/>
|
||||||
<image id="99we1h0" name="daniao.png" path="/component/Main/images/"/>
|
<image id="99we1h0" name="daniao.png" path="/component/Main/images/"/>
|
||||||
<component id="99we1h1" name="btn_niao.xml" path="/component/niao/"/>
|
<component id="99we1h1" name="btn_niao.xml" path="/component/niao/" exported="true"/>
|
||||||
<component id="99we1h2" name="btn_noniao.xml" path="/component/niao/"/>
|
<component id="99we1h2" name="btn_noniao.xml" path="/component/niao/" exported="true"/>
|
||||||
</resources>
|
</resources>
|
||||||
<publish name="Main_RunBeard" path="..\wb_unity_pro\Assets\ART\base\main_zipai\ui" packageCount="2"/>
|
<publish name="Main_RunBeard" path="..\wb_unity_pro\Assets\ART\base\main_zipai\ui" packageCount="2"/>
|
||||||
</packageDescription>
|
</packageDescription>
|
||||||
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 939 KiB |
|
Before Width: | Height: | Size: 749 KiB After Width: | Height: | Size: 736 KiB |
|
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 756 KiB |
|
Before Width: | Height: | Size: 746 KiB After Width: | Height: | Size: 774 KiB |
|
Before Width: | Height: | Size: 782 KiB After Width: | Height: | Size: 507 KiB |
|
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 796 KiB |
|
Before Width: | Height: | Size: 805 KiB After Width: | Height: | Size: 721 KiB |
|
Before Width: | Height: | Size: 721 KiB After Width: | Height: | Size: 466 KiB |
|
Before Width: | Height: | Size: 571 KiB After Width: | Height: | Size: 734 KiB |
|
Before Width: | Height: | Size: 734 KiB After Width: | Height: | Size: 604 KiB |
|
Before Width: | Height: | Size: 604 KiB After Width: | Height: | Size: 791 KiB |
|
Before Width: | Height: | Size: 689 KiB After Width: | Height: | Size: 722 KiB |
|
Before Width: | Height: | Size: 730 KiB After Width: | Height: | Size: 770 KiB |
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.6 MiB |
|
|
@ -1,12 +1,12 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ea6888f59d45c5a4abf3af733fde63a1
|
guid: 8395dc5e9c4802c45b0da68db8cd10e4
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 11
|
serializedVersion: 11
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 0
|
enableMipMap: 1
|
||||||
sRGBTexture: 1
|
sRGBTexture: 1
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
|
|
@ -57,68 +57,20 @@ TextureImporter:
|
||||||
maxTextureSizeSet: 0
|
maxTextureSizeSet: 0
|
||||||
compressionQualitySet: 0
|
compressionQualitySet: 0
|
||||||
textureFormatSet: 0
|
textureFormatSet: 0
|
||||||
applyGammaDecoding: 1
|
applyGammaDecoding: 0
|
||||||
platformSettings:
|
platformSettings:
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
buildTarget: DefaultTexturePlatform
|
buildTarget: DefaultTexturePlatform
|
||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
resizeAlgorithm: 0
|
resizeAlgorithm: 0
|
||||||
textureFormat: -1
|
textureFormat: -1
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: iPhone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: 4
|
|
||||||
textureCompression: 1
|
textureCompression: 1
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
crunchedCompression: 0
|
crunchedCompression: 0
|
||||||
allowsAlphaSplitting: 0
|
allowsAlphaSplitting: 0
|
||||||
overridden: 1
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
overridden: 0
|
||||||
androidETC2FallbackOverride: 0
|
androidETC2FallbackOverride: 0
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Windows Store Apps
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 2
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
|
||||||
spriteSheet:
|
spriteSheet:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
sprites: []
|
sprites: []
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 512 KiB |
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f310028a1728c6149b92bf48333f2575
|
guid: 29e6b1868cbd5c548b21f35c6e554639
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName: base/main_majiang/0fdb386eb39db9d2ad7506202c0fb797
|
assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 2.7 MiB |
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 91da37e8e8899c44b90c0db77fe276b5
|
guid: 6a005157276da5046a0de4d317f5ef8d
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName: base/main_zipaimajiang/ef0594aacc01364a973af9643e09d3d3
|
assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cad84ae4a17cb6140a910433f4c0f95e
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84f12a0f6b1b0f342ae38dc1551a615d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c056ed0fe1ecaaa4f8271726a4b5347d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6eca3583b33e5e94392a353cc9dbf211
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6a9468bb1727d4a4b90a3edb1101156d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d0672a8c0aacdf47ac7def3cdccf176
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: db567c3e73021554e92661527e078385
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: abbccf47d80fccb4d9103fbcf8977081
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b780d7a5f12634747b0d611d75256be9
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6c7fee5037557e546bad14aa849ea35d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aa8b7613270bbdc498ea1db151294d3d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bb21421b5697b50408d07835c195f38c
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||