master
罗家炜 2025-04-28 19:58:34 +08:00
parent 95ce550312
commit 1d1b742ead
45 changed files with 7393 additions and 80 deletions

View File

@ -14,7 +14,7 @@ end
local _LocalConfigAllGame = {
10, 33,
65,
90,
66, 86, 87, 88, 89
}

View File

@ -170,7 +170,7 @@ function M:InitView(url)
self:ChangeBgmMusic()
self:EventInit()
self._view:GetChild("mask").onClick:Set(function()
self._view:GetChild("bg_mask").onClick:Set(function()
self:ResetPoker()
end)
local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log")
@ -499,9 +499,9 @@ function M:EventInit()
if p.seat == self._room.self_player.seat then
if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then
-- body
card_info:InitPoker(cardlist, true, 1)
card_info:InitPoker(cardlist, false, 1)
else
card_info:InitPoker(cardlist, true)
card_info:InitPoker(cardlist, false)
end
else
--card_info:UpdateHandPoker(#cardlist,true,false) --todo
@ -577,11 +577,13 @@ function M:EventInit()
local otherList = arg[5]
local length = arg[6]
self.ctr_time.selectedIndex = 0
print("lingmengOnPlaySucc", p, card_number, cardstype, num, otherList)
local index = self:GetPos(p.seat)
if index == 1 then
self.caozuo = 0
end
print("lingmengOnPlaySucc1")
local head_info = self._player_info[index]
if head_info._view:GetChild("shengyu") ~= nil then
-- body
@ -591,13 +593,18 @@ function M:EventInit()
head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "" .. card_number .. ""
end
end
print("lingmengOnPlaySucc2")
local card_info = self._player_card_info[index]
card_info:SetOutCardInfo(p.out_card_list, false, true)
print("lingmengOnPlaySucc3")
for i = 1, #otherList do
local other_seat = otherList[i]
local other_card_info = self._player_card_info[self:GetPos(other_seat)]
other_card_info:SetOutCardBlack()
end
print("lingmengOnPlaySucc4")
if index == 1 then
card_info:DeleteHandCards(p.out_card_list)
@ -605,6 +612,8 @@ function M:EventInit()
card_info:SetRemainCardNumber(card_number == 1)
--card_info:UpdateHandPoker(card_number,false,false) -- todo
end
print("lingmengOnPlaySucc5")
if self._room.is_new_bout == true then
for i = 1, #self._room.player_list do
local player = self._room.player_list[i]
@ -645,6 +654,8 @@ function M:EventInit()
self:_Effect(cardstype, p)
end
end
print("lingmengOnPlaySucc6")
self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout))
if card_number == 1 then
--self:ChangeBgmMusic(2)
@ -658,6 +669,7 @@ function M:EventInit()
self:PlaySound(p.self_user.sex, "card_1")
end)
end
print("lingmengOnPlaySucc7")
end)
@ -1070,7 +1082,6 @@ function M:ReConnectForStart()
self._state.selectedIndex = 1
self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat)
self:UpdateRound(self._room.curren_round)
for _, player in ipairs(self._room.player_list) do
local player_card_info = self._player_card_info[self:GetPos(player.seat)]
local head_info = self._player_info[self:GetPos(player.seat)]

View File

@ -154,31 +154,33 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim)
self.ctr_outpoker.selectedIndex = 0
end
else
self.ctr_outpoker.selectedIndex = 1
if isAnim then
if self.move_cor then
coroutine.stop(self.move_cor)
self.move_cor = nil
end
local time = 0.1
for i = 1, #cardlist do
local poker_item = self._view_Out:AddItemFromPool()
local code = self:ChangeCodeByTo(cardlist[i])
self:FillPoker(poker_item, "", code)
self:FillPoker(poker_item, "", cardlist[i])
end
self.move_cor = coroutine.start(function()
coroutine.wait(0.1)
ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/chupai.mp3")
end)
else
for i = 1, #cardlist do
local poker_item = self._view_Out:AddItemFromPool()
local code = self:ChangeCodeByTo(cardlist[i])
self:FillPoker(poker_item, "", code)
self:FillPoker(poker_item, "", cardlist[i])
end
end
--self.ctr_outpoker.selectedIndex = 1
end
end

View File

@ -222,6 +222,7 @@ function M:InitPoker(pokerList, isPlayAni, open)
self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false)
end
table.sort(pokerList)
table.sort(self.card_list, tableSortNumber)
for i = #pokerList, 1, -1 do
local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
local card_flower_code = pokerList[i]
@ -237,7 +238,6 @@ function M:InitPoker(pokerList, isPlayAni, open)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
self.card_list[#self.card_list + 1] = card_view
table.sort(self.card_list, tableSortNumber)
self:AddTouchMoveEvent(self._view_handCard)
if i == #pokerList then
@ -652,48 +652,28 @@ function M:TouchMoving(context)
if xy.x - self.touchBegin.x > 0 then -- 往右边滑
max_x = xy.x
min_x = self.touchBegin.x
for i = 1, #self.card_list do
local card = self.card_list[i]
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
if
(card.btn_card.x + oneCardWidth > min_x or (i == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
then
self:SetBtnCardColor(card, 1)
if #send_card1 == 0 then
send_card1[1] = card
end
if send_card1[#send_card1] ~= card then
send_card1[#send_card1 + 1] = card
end
else
self:SetBtnCardColor(card, 0)
end
end
end
-- elseif xy.x - self.touchBegin.x < 0 then -- 左边滑
else
max_x = self.touchBegin.x
min_x = xy.x
for i = 1, #self.card_list do
local card = self.card_list[i]
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
if
(card.btn_card.x + oneCardWidth > min_x or (i == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
then
self:SetBtnCardColor(card, 1)
if #send_card1 == 0 then
send_card1[1] = card
end
if send_card1[#send_card1] ~= card then
send_card1[#send_card1 + 1] = card
end
else
self:SetBtnCardColor(card, 0)
end
for i = 1, #self.card_list do
local card = self.card_list[i]
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
if
(card.btn_card.x + oneCardWidth > min_x or (i == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
then
self:SetBtnCardColor(card, 1)
if #send_card1 == 0 then
send_card1[1] = card
end
if send_card1[#send_card1] ~= card then
send_card1[#send_card1 + 1] = card
end
else
self:SetBtnCardColor(card, 0)
end
end
end
@ -727,14 +707,14 @@ function M:TouchMoveEnd(context)
if not card.btn_card.selected then
downCards = downCards - 1
end
if card.btn_card.touchable == true then
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
send_card[#send_card + 1] = card
self:SetBtnCardColor(card, 0)
if
(card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
and card.card_isTouchable == 0
then
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
@ -824,30 +804,30 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p
self.ctr_put_card_option.selectedIndex = ctr_select
end
function M:SetOutCardInfo(cardlist, isPass, isAnim)
self.ctr_put_card_option.selectedIndex = 0
for i = 1, #self.out_card_list do
local card = self.out_card_list[i]
self.cards_view:RemoveChild(card, true)
end
self.out_card_list = {}
if cardlist ~= nil then
-- todo
self:SetOutCardList(cardlist, isAnim)
else
if isPass == true then
self.ctr_outpoker.selectedIndex = 2
for i = 1, #self.card_list do
local card_view = self.card_list[i]
card_view.btn_card.touchable = true
self:UpdateCardMove(card_view.btn_card, false, false)
self:SetBtnCardColor(card_view, 0)
end
else
self.ctr_outpoker.selectedIndex = 0
end
end
end
-- function M:SetOutCardInfo(cardlist, isPass, isAnim)
-- self.ctr_put_card_option.selectedIndex = 0
-- for i = 1, #self.out_card_list do
-- local card = self.out_card_list[i]
-- self.cards_view:RemoveChild(card, true)
-- end
-- self.out_card_list = {}
-- if cardlist ~= nil then
-- -- todo
-- self:SetOutCardList(cardlist, isAnim)
-- else
-- if isPass == true then
-- self.ctr_outpoker.selectedIndex = 2
-- for i = 1, #self.card_list do
-- local card_view = self.card_list[i]
-- card_view.btn_card.touchable = true
-- self:UpdateCardMove(card_view.btn_card, false, false)
-- self:SetBtnCardColor(card_view, 0)
-- end
-- else
-- self.ctr_outpoker.selectedIndex = 0
-- end
-- end
-- end
function M:SetOutCardBlack()
for i = 1, #self.out_card_list do
@ -964,16 +944,31 @@ function M:SetOutCardList(cardlist, isAnim)
end
end
-- function M:DeleteHandCards(cardlist)
-- for i = 1, #cardlist do
-- local card_code_number = cardlist[i]
-- for j = 1, #self.card_list do
-- local card = self.card_list[j]
-- if card_code_number == card.card_code_number then
-- --self.out_card_list[#self.out_card_list + 1] = card
-- list_remove(self.card_list, card)
-- -- todo 出牌动画
-- self.cards_view:RemoveChild(card.btn_card, true)
-- break
-- end
-- end
-- end
-- self:UpdateHandCardsPos()
-- end
function M:DeleteHandCards(cardlist)
self.ctr_put_card_option.selectedIndex = 0
for i = 1, #cardlist do
local card_code_number = cardlist[i]
for j = 1, #self.card_list do
local card = self.card_list[j]
if card_code_number == card.card_code_number then
--self.out_card_list[#self.out_card_list + 1] = card
list_remove(self.card_list, card)
-- todo 出牌动画
self.cards_view:RemoveChild(card.btn_card, true)
self._view_handCard:RemoveChild(card.btn_card, true)
break
end
end
@ -986,9 +981,6 @@ function M:UpdateHandCardsPos()
local card_view = self.card_list[i]
card_view.index = i
card_view.btn_card.touchable = true
self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1)
--card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list)
card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1)
self:UpdateCardMove(card_view.btn_card, false, false)
self:SetBtnCardColor(card_view, 0)
end

View File

@ -0,0 +1,315 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/18 15:19
---
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/poker/suoha/ui/Info_Poker_SuoHa")
return self
end
function M:FillData(view, index)
self._maxPlayer = 2 -- 默认玩家人数
self._roundChoice = 5 -- 回合选项数
-- if oldGameVersion == 1 then
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SuoHa/Label_Detail_Play")
-- else
-- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SuoHa/Creat_SuoHa_yueyang")
-- end
if oldGameVersion == 2 then
self._config:GetController("xipai").selectedIndex = 0
self.xipaiValueText = self._config:GetChild('xipaifen')
self.xipaiValueText.text = 1
self.xipaiValue = 1
self.anchouValueText = self._config:GetChild('anchoufen')
self.anchouValueText.text = 1
self.anchouValue = 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, 0, nil)
gniv:Show()
end
)
local btn_cr2 = self._config:GetChild('anchoubtn')
btn_cr2.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.anchouValueText.text = value / 1000
self.anchouValue = value / 1000
end, 3, nil)
gniv:Show()
end
)
end
self._config:GetChild("people_2").onClick:Set(function()
self._config:GetController("rule").selectedIndex = 0
end)
local piao = self._config:GetController("piao")
local daniao = self._config:GetController("daniao")
piao.onChanged:Add(function()
if piao.selectedIndex ~= 0 then
daniao.selectedIndex = 0
end
end)
daniao.onChanged:Add(function()
if daniao.selectedIndex ~= 0 then
piao.selectedIndex = 0
end
end)
end
local _help_url = "ui://Info_Poker_SuoHa/Com_help"
function M:GetHelpUrl()
return _help_url
end
local _icon_url = "ui://Info_Poker_SuoHa/icon"
function M:GetIconUrl()
return _icon_url
end
local _icon_url1 = "ui://Info_Poker_SuoHa/icon1"
function M:GetIconUrl1()
return _icon_url1
end
local _play_list = { "15张玩法", "16张玩法" }
function M:GetPlayList()
return _play_list
end
function M:LoadConfigData(data)
local _config = self._config
_config:GetController("round").selectedIndex = data.opt - 1
_config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1
_config:GetController("play_list").selectedIndex = data.leaf - 1
_config:GetController("willBeOut").selectedIndex = data.willBeOut - 1
_config:GetController("heart10").selectedIndex = data.heartten - 1
_config:GetController("bombSpring").selectedIndex = data.minboom - 1
_config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1
_config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1
_config:GetController("showlength").selectedIndex = data.showlength
_config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree
_config:GetController("demolition").selectedIndex = data.demolition
_config:GetController("fangzuobi").selectedIndex = data.fangzuobi
local sandaidan = data.sandaidan
if sandaidan ~= nil and sandaidan == 1 then
_config:GetChild("sandaidan").selected = true
_config:GetChild("planelack").selected = false
_config:GetChild("Threelack").selected = false
else
_config:GetChild("sandaidan").selected = false
_config:GetChild("planelack").selected = data.planelack == 1 and true or false
_config:GetChild("Threelack").selected = data.threelack == 1 and true or false
end
local fs = data.fs
if fs ~= nil and fs == 1 then
_config:GetChild("fan_sprint").selected = true
else
_config:GetChild("fan_sprint").selected = false
end
local ba = data.ba
if ba ~= nil and ba == 1 then
_config:GetChild("boom_add").selected = true
else
_config:GetChild("boom_add").selected = false
end
_config:GetChild("ThreeA").selected = data.threeA == 1 and true or false
if data.piao ~= nil then
_config:GetController("piao").selectedIndex = data.piao
end
if data.daniao ~= nil then
_config:GetController("daniao").selectedIndex = data.daniao
end
if _config:GetChild("fourBeltThree") then
_config:GetChild("fourBeltThree").selected = data.fourDaiTwo
end
if _config:GetChild("fourBeltTwo") then
_config:GetChild("fourBeltTwo").selected = data.fourDaiThree
end
if _config:GetChild("xipai") then
_config:GetChild("xipai").selected = data.xi_pai
end
if oldGameVersion == 2 then
self.xipaiValueText.text = data.xi_pai_score / 1000
self.xipaiValue = data.xi_pai_score / 1000
self.anchouValueText.text = data.an_chou_score / 1000
self.anchouValue = data.an_chou_score / 1000
end
end
function M:SelectedConfigData()
local _config = self._config
local round = _config:GetController("round").selectedIndex
local rule = _config:GetController("rule").selectedIndex
local leaf = _config:GetController("play_list").selectedIndex
local willBeOut = _config:GetController("willBeOut").selectedIndex
local bombSpring = _config:GetController("bombSpring").selectedIndex
local heart10 = _config:GetController("heart10").selectedIndex
local player_num = _config:GetController("player_num").selectedIndex
local AA = _config:GetController("Cost").selectedIndex
local showlength = _config:GetController("showlength").selectedIndex
local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex
local demolition = _config:GetController("demolition").selectedIndex
local fangzuobi = _config:GetController("fangzuobi").selectedIndex
local planelack = _config:GetChild("planelack").selected and 1 or 0
local threelack = _config:GetChild("Threelack").selected and 1 or 0
local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0
local piao = _config:GetController("piao").selectedIndex
local daniao = _config:GetController("daniao").selectedIndex
local sandaidan = _config:GetController("sandaidan").selectedIndex
local ba = _config:GetChild("boom_add").selected and 1 or 0
local fs = _config:GetChild("fan_sprint").selected and 1 or 0
-----
local fourDaiTwo = false
if _config:GetChild("fourBeltThree") then
fourDaiTwo = _config:GetChild("fourBeltThree").selected
end
local fourDaiThree = false
if _config:GetChild("fourBeltTwo") then
fourDaiThree = _config:GetChild("fourBeltTwo").selected
end
local xi_pai = false
if _config:GetChild("xipai") then
xi_pai = _config:GetChild("xipai").selected
end
----
local _data = {}
_data["account_id"] = DataManager.SelfUser.Id
_data["opt"] = round + 1
_data["rule"] = rule == 0 and 2 or 1
_data["leaf"] = leaf + 1
_data["AA"] = AA
_data["willBeOut"] = willBeOut + 1
_data["showlength"] = showlength
_data["heartten"] = willBeOut == 0 and heart10 + 1 or 2
_data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2
_data["maxPlayers"] = player_num + 2
_data["fourBeltThree"] = fourBeltThree
_data["demolition"] = demolition
_data["fangzuobi"] = fangzuobi
_data["threeA"] = ThreeA
_data["piao"] = piao
_data["daniao"] = daniao
_data["sandaidan"] = sandaidan
_data["ba"] = ba
_data["fs"] = fs
_data["fourDaiTwo"] = fourDaiTwo
_data["fourDaiThree"] = fourDaiThree
if willBeOut == 1 then
-- body
_data["planelack"] = 0
_data["threelack"] = 0
else
if sandaidan == 1 then
_data["planelack"] = 0
_data["threelack"] = 0
else
_data["planelack"] = planelack
_data["threelack"] = threelack
end
end
_data['xi_pai'] = xi_pai
local xi_pai_score = 0
local an_chou_score = 0
if oldGameVersion == 2 then
xi_pai_score = self.xipaiValue
an_chou_score = self.anchouValue
end
_data['xi_pai_score'] = xi_pai_score * 1000
_data['an_chou_score'] = an_chou_score * 1000
return _data
end
function M:OnChangeOption(ctype, pay_obj)
IGameInfo.OnChangeOption(self, ctype, pay_obj)
local people = self._config:GetController("player_num")
people.onChanged:Set(function()
self._maxPlayer = people.selectedIndex + 2
self:ShowVariablePrice(ctype, pay_obj)
end)
end
function M:LoadConfigToDetail(data)
local configData = json.decode(data)
local returnString = string.format("人数%s人", configData.maxPlayers)
return returnString
end
return M

View File

@ -0,0 +1,293 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/18 15:19
---
local EXGameInfo = {}
local M = EXGameInfo
local roundTable = { 10, 15, 20 }
function EXGameInfo.new(blur_view)
setmetatable(M, { __index = IGameInfo })
local self = setmetatable({}, { __index = M })
self.class = "EXGameInfo"
UIPackage.AddPackage("extend/poker/suoha/ui/Info_Poker_SuoHa")
return self
end
function M:FillData(view, index)
self._maxPlayer = 2 -- 默认玩家人数
self._roundChoice = 5 -- 回合选项数
-- if oldGameVersion == 1 then
self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SuoHa/Label_Detail_Play")
-- else
-- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SuoHa/Creat_SuoHa_yueyang")
-- end
-- self._config:GetChild("people_2").onClick:Set(function()
-- self._config:GetController("rule").selectedIndex = 0
-- end)
-- local piao = self._config:GetController("piao")
-- local daniao = self._config:GetController("daniao")
-- piao.onChanged:Add(function()
-- if piao.selectedIndex ~= 0 then
-- daniao.selectedIndex = 0
-- end
-- end)
-- daniao.onChanged:Add(function()
-- if daniao.selectedIndex ~= 0 then
-- piao.selectedIndex = 0
-- end
-- end)
end
local _help_url = "ui://Info_Poker_SuoHa/Com_help"
function M:GetHelpUrl()
return _help_url
end
local _icon_url = "ui://Info_Poker_SuoHa/icon"
function M:GetIconUrl()
return _icon_url
end
local _icon_url1 = "ui://Info_Poker_SuoHa/icon1"
function M:GetIconUrl1()
return _icon_url1
end
local _play_list = { "15张玩法", "16张玩法" }
function M:GetPlayList()
return _play_list
end
function M:LoadConfigData(data)
local _config = self._config
_config:GetController("round").selectedIndex = data.opt - 1
_config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1
_config:GetController("play_list").selectedIndex = data.leaf - 1
_config:GetController("willBeOut").selectedIndex = data.willBeOut - 1
_config:GetController("heart10").selectedIndex = data.heartten - 1
_config:GetController("bombSpring").selectedIndex = data.minboom - 1
_config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1
_config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1
_config:GetController("showlength").selectedIndex = data.showlength
_config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree
_config:GetController("demolition").selectedIndex = data.demolition
_config:GetController("fangzuobi").selectedIndex = data.fangzuobi
local sandaidan = data.sandaidan
if sandaidan ~= nil and sandaidan == 1 then
_config:GetChild("sandaidan").selected = true
_config:GetChild("planelack").selected = false
_config:GetChild("Threelack").selected = false
else
_config:GetChild("sandaidan").selected = false
_config:GetChild("planelack").selected = data.planelack == 1 and true or false
_config:GetChild("Threelack").selected = data.threelack == 1 and true or false
end
local fs = data.fs
if fs ~= nil and fs == 1 then
_config:GetChild("fan_sprint").selected = true
else
_config:GetChild("fan_sprint").selected = false
end
local ba = data.ba
if ba ~= nil and ba == 1 then
_config:GetChild("boom_add").selected = true
else
_config:GetChild("boom_add").selected = false
end
_config:GetChild("ThreeA").selected = data.threeA == 1 and true or false
if data.piao ~= nil then
_config:GetController("piao").selectedIndex = data.piao
end
if data.daniao ~= nil then
_config:GetController("daniao").selectedIndex = data.daniao
end
if _config:GetChild("fourBeltThree") then
_config:GetChild("fourBeltThree").selected = data.fourDaiTwo
end
if _config:GetChild("fourBeltTwo") then
_config:GetChild("fourBeltTwo").selected = data.fourDaiThree
end
if _config:GetChild("xipai") then
_config:GetChild("xipai").selected = data.xi_pai
end
if oldGameVersion == 2 then
self.xipaiValueText.text = data.xi_pai_score / 1000
self.xipaiValue = data.xi_pai_score / 1000
self.anchouValueText.text = data.an_chou_score / 1000
self.anchouValue = data.an_chou_score / 1000
end
end
function M:SelectedConfigData()
local _config = self._config
local round = _config:GetController("round").selectedIndex
local handcard = _config:GetController("handcard").selectedIndex
local peopleNum = _config:GetController("peopleNum").selectedIndex
local showCardNum = _config:GetController("showCardNum").selectedIndex
local wanfa1_1 = _config:GetController("wanfa1_1").selectedIndex
local wanfa1_2 = _config:GetController("wanfa1_2").selectedIndex
local wanfa1_3 = _config:GetController("wanfa1_3").selectedIndex
local wanfa1_4 = _config:GetController("wanfa1_4").selectedIndex
local wanfa1_5 = _config:GetController("wanfa1_5").selectedIndex
local wanfa2_1 = _config:GetController("wanfa2_1").selectedIndex
-- local rule = _config:GetController("rule").selectedIndex
-- local leaf = _config:GetController("play_list").selectedIndex
-- local willBeOut = _config:GetController("willBeOut").selectedIndex
-- local bombSpring = _config:GetController("bombSpring").selectedIndex
-- local heart10 = _config:GetController("heart10").selectedIndex
-- local player_num = _config:GetController("player_num").selectedIndex
-- local AA = _config:GetController("Cost").selectedIndex
-- local showlength = _config:GetController("showlength").selectedIndex
-- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex
-- local demolition = _config:GetController("demolition").selectedIndex
-- local fangzuobi = _config:GetController("fangzuobi").selectedIndex
-- local planelack = _config:GetChild("planelack").selected and 1 or 0
-- local threelack = _config:GetChild("Threelack").selected and 1 or 0
-- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0
-- local piao = _config:GetController("piao").selectedIndex
-- local daniao = _config:GetController("daniao").selectedIndex
-- local sandaidan = _config:GetController("sandaidan").selectedIndex
-- local ba = _config:GetChild("boom_add").selected and 1 or 0
-- local fs = _config:GetChild("fan_sprint").selected and 1 or 0
-----
local fourDaiTwo = false
if _config:GetChild("fourBeltThree") then
fourDaiTwo = _config:GetChild("fourBeltThree").selected
end
local fourDaiThree = false
if _config:GetChild("fourBeltTwo") then
fourDaiThree = _config:GetChild("fourBeltTwo").selected
end
local xi_pai = false
if _config:GetChild("xipai") then
xi_pai = _config:GetChild("xipai").selected
end
----
local _data = {}
_data["account_id"] = DataManager.SelfUser.Id
-- _data["AA"] = AA
-- _data["willBeOut"] = willBeOut + 1
-- _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2
-- _data["fourBeltThree"] = fourBeltThree
-- _data["demolition"] = demolition
-- _data["fangzuobi"] = fangzuobi
-- _data["threeA"] = ThreeA
-- _data["piao"] = piao
-- _data["daniao"] = daniao
-- _data["sandaidan"] = sandaidan
-- _data["ba"] = ba
-- _data["fs"] = fs
_data["fourDaiTwo"] = fourDaiTwo
-----------------------lingmeng----------------------------
_data["AA"] = 0
_data["willBeOut"] = 1
_data["minboom"] = 2
_data["fourBeltThree"] = 0
_data["demolition"] = 0
_data["fangzuobi"] = 0
_data["threeA"] = 0
_data["piao"] = 0
_data["daniao"] = 0
_data["sandaidan"] = 0
_data["ba"] = 0
_data["fs"] = 0
_data["leaf"] = handcard == 0 and 2 or handcard --手牌 1是15张2是16张
_data["opt"] = round + 1 --局数 1是10局 2是15局 3是20局 ("未知")
_data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人
_data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法
_data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示
_data["planeNoBelt"] = wanfa1_1 --飞机不带
_data["threeNoBelt"] = wanfa1_1 --三张不带
_data["planelack"] = wanfa1_2 --飞机可少带接完
_data["threelack"] = wanfa1_2 --三张可少带接完
_data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法
if wanfa1_3 == 1 then
_data["fourDaiThree"] = true
end
_data["heartten"] = wanfa1_4 + 1 --红桃扎鸟 1没有该玩法 2有该玩法 似乎说的是红桃10分数翻倍具体要问江西那边
_data["specilAdd"] = wanfa2_1 --特殊加分规则只出一张加扣10分出2-3张加扣5分 0没有该玩法 1有该玩法
-----------------------------------------------------------
-- if willBeOut == 1 then
-- -- body
-- _data["planelack"] = 0
-- _data["threelack"] = 0
-- else
-- if sandaidan == 1 then
-- _data["planelack"] = 0
-- _data["threelack"] = 0
-- else
-- _data["planelack"] = planelack
-- _data["threelack"] = threelack
-- end
-- end
_data['xi_pai'] = xi_pai
local xi_pai_score = 1
local an_chou_score = 1
-- if oldGameVersion == 2 then
-- xi_pai_score = self.xipaiValue
-- an_chou_score = self.anchouValue
-- end
_data['xi_pai_score'] = xi_pai_score * 1000
_data['an_chou_score'] = an_chou_score * 1000
return _data
end
function M:OnChangeOption(ctype, pay_obj)
IGameInfo.OnChangeOption(self, ctype, pay_obj)
local peopleNum = self._config:GetController("peopleNum")
peopleNum.onChanged:Set(function()
self._maxPlayer = peopleNum.selectedIndex == 1 and 2 or 3
self:ShowVariablePrice(ctype, pay_obj)
end)
end
function M:LoadConfigToDetail(data)
local configData = json.decode(data)
local returnString = string.format("人数%s人", configData.maxPlayers)
return returnString
end
return M

View File

@ -0,0 +1,45 @@
local PlayerInfoView = require("Game.View.PlayerInfoView_copy")
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

View File

@ -0,0 +1,262 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:57
---
local EXTEND_MODEL_NAME = ...
local EXGameInfo = import(".EXGameInfo_jiangxi")
local SuoHa_MainView = import(".SuoHa_MainView")
local SuoHa_GameController = import(".SuoHa_GameController")
local SuoHa_RoomConfig = import(".SuoHa_RoomConfig")
local SuoHa_Player = import(".SuoHa_Player")
local SuoHa_Room = import(".SuoHa_Room")
local SuoHa_PlayerBackView = import(".SuoHa_PlayerBackView")
local ExtendConfig = {}
local M = ExtendConfig
function ExtendConfig.new()
setmetatable(M, { __index = IExtendConfig })
local self = setmetatable({}, { __index = M })
self.class = "ExtendConfig"
self.extend_id = 14
self._viewMap = {}
self._viewMap[ViewManager.View_Main] = SuoHa_MainView
self._viewMap[ViewManager.View_PlayBack] = SuoHa_PlayerBackView
return self
end
--卸载资源
function M:UnAllAssets()
UIPackage.RemovePackage("extend/poker/suoha/ui/Info_Poker_SuoHa")
self:UnAssets()
end
function M:UnAssets()
UIPackage.RemovePackage("extend/poker/suoha/ui/Extend_Poker_SuoHa")
ResourcesManager.UnLoadGroup("RunFase_PK")
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 = SuoHa_GameController.new()
end
return _ctr_game
end
function M:NewRoom()
return SuoHa_Room.new()
end
function M:GetGameRule()
return SuoHa_RuleView.new()
end
function M:GetIconUrl()
return "ui://Extend_Poker_SuoHa/icon"
--
end
function M:FillRoomConfig(room, _config)
room.room_config = SuoHa_RoomConfig.new(_config)
end
function M:FillRoomData(s2croom)
local room = DataManager.CurrenRoom
if _ctr_game == nil then
self:GetGameController()
end
local reload = s2croom["reload"]
local _tableInfo = s2croom["tableInfo"]
room.xipaiScore = _tableInfo["xipai_score"]
local _config = _tableInfo["config"]
room.room_config = SuoHa_RoomConfig.new(_config)
room.curren_round = _tableInfo["round"]
if room.curren_round == 0 and reload then
room.curren_round = 1
end
local playerList = _tableInfo["playerData"]
for i = 1, #playerList do
local _jp = playerList[i]
local p = SuoHa_Player.new()
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 (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.self_user.location = Location.new(_jp["pos"] or "")
p.self_user.host_ip = _jp["ip"]
p.total_score = _jp["score"] or 0
if _jp.hp_info then
p.cur_hp = _jp.hp_info.cur_hp
end
p.hp_info = _jp["hp_info"]
if _jp["entrust"] then
p.entrust = _jp.entrust
end
room:AddPlayer(p)
end
local owner = s2croom["owner"]
room.owner_id = owner
room.game_status = 0
if reload then
local reloadInfo = s2croom["reloadInfo"]
local playing = reloadInfo["playing"]
room.curren_turn_seat = reloadInfo["active_seat"]
local info_list = reloadInfo["info_list"]
if playing == true then
room.CurnrenState = StateType.Palying
room.game_status = 1
for i = 1, #info_list do
local p = room:GetPlayerById(info_list[i]["playerid"])
if p == room.self_player then
p.hand_list = reloadInfo["hand_card"]
p.open = reloadInfo["open"]
end
p.hand_count = info_list[i]["card_size"]
p.piao = info_list[i]["piao"]
p.handCards = info_list[i]["handCards"]
p.outCards = info_list[i]["outCards"]
local last_outcard = info_list[i]["last_outcard"]
if last_outcard ~= nil and last_outcard[1] ~= 0 then
local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list, true)
local card_type, number, length, plan_three_count = _ctr_game:GetCardListInfo(out_card_list)
p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list, card_type, number, plan_three_count)
else
p.out_card_list = { 0 }
end
end
else
-- -- print("aaaaaaaaaaaaaaaa1111111111111111111111111")
--pt(s2croom)
room.game_status = 1
room.CurnrenState = StateType.PalyingWait
room.winseat = reloadInfo["winseat"]
room.remaincards = reloadInfo["remaincards"]
for i = 1, #info_list do
local playerData = info_list[i]
local p = room:GetPlayerById(playerData["playerid"])
p.ready = playerData["certainseat"] == 1 and true or false
local last_outcard = info_list[i]["last_outcard"]
if last_outcard ~= nil and last_outcard[1] ~= 0 then
local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list, true)
local card_type, number, length, plan_three_count = _ctr_game:GetCardListInfo(out_card_list)
p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list, card_type, number, plan_three_count)
else
p.out_card_list = { 0 }
end
p.hand_list = info_list[i]["cards"]
p.winscore = info_list[i]["winscore"]
p.piao = info_list[i]["piao"]
p.hand_count = info_list[i]["card_size"]
p.thisboomnum = info_list[i]["thisboomnum"]
p.open = info_list[i]["open"]
p.handCards = info_list[i]["handCards"]
p.outCards = info_list[i]["outCards"]
end
end
else
room.CurnrenState = StateType.Ready
end
end
function M:FillPlayBackData(pd_data)
local room = DataManager.CurrenRoom
local _tableInfo = pd_data["info"]
local _config = _tableInfo["config"]
room.room_id = _tableInfo.room_id
room.room_config = SuoHa_RoomConfig.new(_config)
room.owner_id = _config["ownerid"]
local active_seat = _tableInfo["active_seat"]
local bank_seat = _tableInfo["banker_seat"]
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 = SuoHa_Player.new()
p.seat = _jp["seat"]
p.aid = _jp["aid"]
local pid = _jp["aid"]
if p.aid == 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"]
-- end
p.self_user.host_ip = p.self_user.host_ip
local _hand_card = _jp["hand_card"]
p.hand_list = _hand_card
p.hand_count = #_hand_card
p.total_score = _jp["score"]
p.piao = _jp["piao"]
p.open = _jp["open"]
p.hp_info = _jp["hp_info"]
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"]
end
function M:LoadConfigToDetail(data)
return data
end
return M

View File

@ -0,0 +1,24 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/18 11:30
---
local SuoHa_CardType = {
None = 0,
OneCard = 1, --一张
OnePair = 2, --一对
Three = 3, --三张
Pairs = 4, --连对
ThreeAndTwo = 5, --三带二
ThreeAndOne = 6, --三带一
Plane = 7, --飞机
PlaneAndTwo = 8, --飞机带二
PlaneAndOne = 9, --飞机带一
Straight = 10, --顺子
Bomb = 11, --炸
FourAndtThree = 12, --四代三
}
return SuoHa_CardType

View File

@ -0,0 +1,702 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 11:28
---
local SuoHa_Protocol = import(".SuoHa_Protocol")
local SuoHa_GameEvent = import(".SuoHa_GameEvent")
local SuoHa_CardType = import(".SuoHa_CardType")
local SuoHa_PutError = {
"必须先出最小的牌",
"出牌不符合规定牌型 ",
"下家报单,请出最大的牌 ",
"炸弹不能拆"
}
local SuoHa_GameController = {}
local M = SuoHa_GameController
function M.new()
setmetatable(M, { __index = GameController })
local self = setmetatable({}, { __index = M })
self:init("跑得快")
self.class = "SuoHa_GameController"
return self
end
function M:init(name)
GameController.init(self, name)
self:RegisterEvt()
end
-- 事件注册
function M:RegisterEvt()
self._eventmap[SuoHa_Protocol.SuoHa_Ming_Card] = self.OnMingCard
self._eventmap[SuoHa_Protocol.SuoHa_Init_Card] = self.OnInitCard
self._eventmap[SuoHa_Protocol.SuoHa_Options] = self.OnOptions
self._eventmap[SuoHa_Protocol.SuoHa_Index_Move] = self.OnIndexMove
self._eventmap[SuoHa_Protocol.SuoHa_Play_Succ] = self.OnPlaySucc
self._eventmap[SuoHa_Protocol.SuoHa_Put_Error] = self.OnPutError
self._eventmap[SuoHa_Protocol.SuoHa_Pass_Succ] = self.OnPassSucc
self._eventmap[SuoHa_Protocol.SuoHa_Result] = self.OnResult
self._eventmap[SuoHa_Protocol.SuoHa_Bomb_Score] = self.OnBombScore
self._eventmap[SuoHa_Protocol.SuoHa_Piao_Tip] = self.OnPiaoTip
self._eventmap[SuoHa_Protocol.SuoHa_Piao_Action] = self.OnPiaoAction
self._eventmap[SuoHa_Protocol.SuoHa_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc
--self._eventmap[SuoHa_Protocol.SuoHa_Oener] = self.Oener
-- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter
self._eventmap[SuoHa_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan
self._eventmap[SuoHa_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
self._eventmap[SuoHa_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
self._eventmap[SuoHa_Protocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard
end
-- function M:Oener(evt_data)
-- local seat = evt_data["owner"]
-- self._cacheEvent:Enqueue(function()
-- DispatchEvent(self._dispatcher,SuoHa_GameEvent.Oener,seat)
-- end)
-- end
-- function M:OnEventPlayerEnter(evt_data)
-- local p = self._room:NewPlayer()
-- local _user
-- _user = User.new()
-- _user.account_id = evt_data["aid"]
-- _user.host_ip = evt_data["ip"]
-- _user.nick_name = evt_data["nick"]
-- _user.head_url = evt_data["portrait"]
-- _user.sex = evt_data["sex"]
-- _user.location = Location.new(evt_data["pos"] or "")
-- p.seat = evt_data["seat"]
-- p.ready = evt_data["ready"] == 1 and true or false
-- p.self_user = _user
-- p.line_state = 1
-- p.total_score=evt_data["score"]
-- p.hp_info = evt_data["hp_info"]
-- -- p.total_score=self._room.room_config.energyTab==0 and evt_data["score"] or evt_data["score"]/10
-- DataManager.CurrenRoom:AddPlayer(p)
-- DispatchEvent(self._dispatcher,GameEvent.PlayerEnter, p)
-- end
function M:SendXiPaiAction(callBack)
local _data = {}
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_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, SuoHa_GameEvent.EventXiPai, my_isXiPai, other_isXiPai)
end)
end
function M:SendCard(cards, currentCard)
local _data = {}
_data["card"] = cards
_data["all_card"] = currentCard
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SuoHa_Send_Card, _data)
end
function M:SendPiao(piao)
local _data = {}
_data["id"] = piao
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SuoHa_Send_Piao, _data)
end
function M:SendPass()
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SuoHa_Send_Guo)
end
function M:SendInitCardEnd()
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SuoHa_Init_Card_End)
end
function M:ConformToNextGame()
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SuoHa_ConfirmToNextGame)
end
function M:OnMingCard(evt_data)
if ViewManager.GetCurrenView().dview_class == LobbyView then
self:ReturnToRoom()
return
end
local card = evt_data["mingpai"]
self._cacheEvent:Enqueue(
function()
self._room.ming_card = card
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnMingCard, card)
end
)
end
function M:OnInitCard(evt_data)
if ViewManager.GetCurrenView().dview_class == LobbyView then
self:ReturnToRoom()
return
end
local cardlist = evt_data["cards"]
local round = evt_data["round"]
self._cacheEvent:Enqueue(
function()
for _, player in ipairs(self._room.player_list) do
player:Clear()
player.hand_count = #cardlist
end
self._room.curren_round = round
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnInitCard, round, cardlist)
end
)
end
function M:OnBombScore(evt_data)
local scoreList = evt_data["gold_list"]
self._cacheEvent:Enqueue(
function()
for i = 1, #scoreList do
local score = scoreList[i].bom_score
local player = self._room:GetPlayerById(scoreList[i].aid)
player.total_score = player.total_score + score
end
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnBombScore, scoreList)
end
)
end
function M:OnPlaySucc(evt_data)
if pcall(
self.OnPlaySuccCheck, self, evt_data
) then
else
printlog("数据异常OnPlaySucc==>>>")
end
end
function M:OnPlaySuccCheck(evt_data)
local seat = evt_data["player"]
local card_obj = evt_data["card_obj"]
local cards = card_obj["card_list"]
local remain = evt_data["remain"] -- 报单
self._cacheEvent:Enqueue(
function()
local otherList = self:GetOtherSeatList(seat)
local player = self._room:GetPlayerBySeat(seat)
local out_card_list = self:ChangeCodeByFrom(cards, true)
player.hand_count = remain
local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list)
player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count)
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,
length)
end
)
end
function M:OnPlaySuccCheckHandCard(evt_data)
local seat = evt_data["player"]
local cards = evt_data["handCards"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnPassSuccCheckCard, seat, cards)
end
)
end
function M:OnPassSucc(evt_data)
local seat = evt_data["seat"]
self._cacheEvent:Enqueue(
function()
local p = self._room:GetPlayerBySeat(seat)
p.out_card_list = { 0 }
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnPassSucc, p)
end
)
end
function M:OnPutError(evt_data)
local code = evt_data["error"]
self._cacheEvent:Enqueue(
function()
local error_str = self:GetErrorStr(code)
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnErrorTip, error_str)
end
)
end
function M:TuoGuan(isTuo)
local _data = {}
_data["tuoguan"] = isTuo
local _client = ControllerManager.GameNetClinet
_client:send(SuoHa_Protocol.SEND_TUOGUAN, _data)
end
function M:Game_TuoGuan(evt_data)
local tuoguan = evt_data["tuoguan"]
local seat = evt_data["seat"]
self._cacheEvent:Enqueue(function()
DispatchEvent(self._dispatcher, SuoHa_GameEvent.Game_TuoGuan, tuoguan, seat)
end)
end
function M:OnIndexMove(evt_data)
local seat = evt_data["index"]
self._cacheEvent:Enqueue(
function()
self._room.curren_turn_seat = seat
self._room.is_new_bout = self:GetIsNewBout(seat)
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnIndexMove, seat)
end
)
end
function M:OnOptions(evt_data)
local play = evt_data["play"]
local pass = evt_data["pass"]
self._cacheEvent:Enqueue(
function()
local lastCardList = self:GetLastCardList(self._room.self_player.seat)
local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList)
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass)
end
)
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, SuoHa_GameEvent.OnPiaoTips, piao, reload)
end
)
end
function M:OnPiaoAction(evt_data)
local seat = evt_data["seat"]
local piao = evt_data["piao"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnPiaoAction, seat, piao)
end
)
end
function M:OnResult(evt_data)
local result_type = evt_data["type"]
local info = evt_data["info"]
local winseat = evt_data["winseat"]
local remaincards = evt_data["remaincards"]
DataManager.CurrenRoom.xipaiScore = evt_data["xipai_score"]
--printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type)
--pt(evt_data)
if result_type == 1 then
local over = 1
ControllerManager.SetGameNetClient(nil, true)
self._cacheEvent:Enqueue(
function()
for i = 1, #info do
local p = self._room:GetPlayerBySeat(info[i]["seat"])
p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user
end
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnResult, over, info, winseat, remaincards)
end
)
elseif result_type == 0 then
local over = 0
self._cacheEvent:Enqueue(
function()
for i = 1, #info do
local p = self._room:GetPlayerBySeat(info[i]["seat"])
p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user
end
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnResult, over, info, winseat, remaincards)
end
)
else
local dissolve = 1
ControllerManager.SetGameNetClient(nil, true)
for i = 1, #info do
local p = self._room:GetPlayerBySeat(info[i]["seat"])
p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user
end
-- ControllerManager.ChangeController(LoddyController)
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnResultByDissolve, over, info, winseat, dissolve)
end
end
function M:OnConfrimToNextGameSucc(evt_data)
local aid = evt_data["aid"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, SuoHa_GameEvent.OnConfrimToNextGameSucc, aid)
end
)
end
function M:Game_TuoGuan(evt_data)
local tuoguan = evt_data["tuoguan"]
local seat = evt_data["seat"]
self._cacheEvent:Enqueue(function()
DispatchEvent(self._dispatcher, SuoHa_GameEvent.Game_TuoGuan, tuoguan, seat)
end)
end
function M:ChangeCodeByFrom(cardList, isSort)
isSort = isSort or false
local new_card_list = {}
for i = 1, #cardList do
local flower = math.floor(cardList[i] / 100)
local number = cardList[i] % 100
if number == 2 then
number = 15
end
local card = number * 10 + flower
new_card_list[#new_card_list + 1] = card
end
return isSort == true and table.sort(new_card_list) or new_card_list
end
function M:GetOtherSeatList(seat)
local list = {}
for i = 1, self._room.room_config.people_num do
if seat ~= i then
list[#list + 1] = i
end
end
return list
end
--
function M:GetIsNewBout(seat)
local passCount = 0
for i = 1, #self._room.player_list do
local player = self._room.player_list[i]
if seat ~= player.seat then
local isPass = self:GetIsPass(player.out_card_list)
if isPass then
passCount = passCount + 1
end
end
end
if passCount == self._room.room_config.people_num - 1 then
return true
else
return false
end
end
function M:GetLastSeat(seat)
local last_seat = seat - 1
if last_seat < 1 then
last_seat = last_seat + self._room.room_config.people_num
end
return last_seat
end
function M:GetLastCardList(seat)
local last_seat = self:GetLastSeat(seat)
local player = self._room:GetPlayerBySeat(last_seat)
local isPass = self:GetIsPass(player.out_card_list)
if isPass then
if self._room.room_config.people_num == 2 then
return {}
end
local last_seat_2 = self:GetLastSeat(last_seat)
local player_2 = self._room:GetPlayerBySeat(last_seat_2)
local isPass_2 = self:GetIsPass(player_2.out_card_list)
if isPass_2 then
return {}
else
return player_2.out_card_list
end
else
return player.out_card_list
end
end
function M:GetErrorStr(code)
return SuoHa_PutError[code + 1]
end
function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count)
if cardType == 3 or cardType == 5 or cardType == 6 then
local removeList = {}
for i = #outCardList, 1, -1 do
local card = outCardList[i]
if math.floor(card / 10) == cardNumber then
removeList[#removeList + 1] = card
table.remove(outCardList, i)
end
end
for i = 1, #removeList do
table.insert(outCardList, 1, removeList[i])
end
elseif cardType >= 7 and cardType <= 9 then
local removeList = {}
for i = #outCardList, 1, -1 do
local card = outCardList[i]
if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then
removeList[#removeList + 1] = card
table.remove(outCardList, i)
end
end
for i = 1, #removeList do
table.insert(outCardList, 1, removeList[i])
end
end
return outCardList
end
--None = 0,
--OneCard = 1,
--OnePair = 2,
--Three = 3,
--Pairs = 4,
--ThreeAndTwo = 5,
--ThreeAndOne = 6,
--Plane = 7,
--PlaneAndTwo = 8,
--PlaneAndOne = 9,
--Straight = 10,
--Bomb = 11
-- 牌型,大小, 长度
function M:GetCardListInfo(cardlist)
if #cardlist == 0 then
return 0, 0, 0, 0
end
-- 检测牌型
local card_type, card_num, card_length, plan_three_count = SuoHa_CardType.None, 0, #cardlist, 0
local card_map = self:GetCardMapByList(cardlist)
if #cardlist == 1 then
card_type = SuoHa_CardType.OneCard
card_num = math.floor(cardlist[1] / 10)
elseif #cardlist == 2 then
card_type = SuoHa_CardType.OnePair
card_num = math.floor(cardlist[1] / 10)
elseif #cardlist == 3 then
card_num = math.floor(cardlist[1] / 10)
if card_num == 14 and DataManager.CurrenRoom.room_config.threeA == 1 then
-- body
card_type = SuoHa_CardType.Bomb
else
card_type = SuoHa_CardType.Three
end
elseif #cardlist == 4 then
local max_key = 0
for k, v in pairs(card_map) do
if #v == 4 then
card_type = SuoHa_CardType.Bomb
card_num = k
elseif #v == 3 then
card_type = SuoHa_CardType.ThreeAndOne
card_num = k
elseif #v == 2 then
if k > max_key then
max_key = k
end
card_type = SuoHa_CardType.Pairs
card_num = max_key
end
end
elseif #cardlist == 5 then
local count, max_key = 0, 0
for k, v in pairs(card_map) do
if #v >= 3 then
card_type = SuoHa_CardType.ThreeAndTwo
card_num = k
elseif #v == 1 then
count = count + 1
if k > max_key then
max_key = k
end
if count == 5 then
card_type = SuoHa_CardType.Straight
card_num = max_key
end
end
end
elseif #cardlist == 7 then
local count, max_key = 0, 0
for k, v in pairs(card_map) do
if #v >= 4 then
card_type = SuoHa_CardType.FourAndtThree
card_num = k
elseif #v == 1 then
count = count + 1
if k > max_key then
max_key = k
end
if count == 7 then
card_type = SuoHa_CardType.Straight
card_num = max_key
end
end
end
else
local one_count, two_count, three_count = 0, 0, 0
local max_one_key, max_two_key, max_three_key = 0, 0, 0
for k, v in pairs(card_map) do
if #v == 2 then
if k > max_two_key then
max_two_key = k
end
two_count = two_count + 1
if two_count == #cardlist / 2 then
card_type = SuoHa_CardType.Pairs
card_num = max_two_key
end
elseif #v == 1 then
if k > max_one_key then
max_one_key = k
end
one_count = one_count + 1
if one_count == #cardlist then
card_type = SuoHa_CardType.Straight
card_num = max_one_key
end
elseif #v == 3 then
if max_three_key == 0 then
max_three_key = k
three_count = three_count + 1
elseif k > max_three_key and k == max_three_key + 1 then
max_three_key = k
three_count = three_count + 1
elseif k < max_three_key and k == max_three_key - 1 then
max_three_key = k
three_count = three_count + 1
-- else
-- max_three_key = k
end
--three_count = three_count + 1
end
end
-- plan_three_count = three_count
-- if three_count * 5 >= #cardlist then
-- card_type = SuoHa_CardType.PlaneAndTwo
-- card_num = max_three_key
-- elseif three_count * 4 >= #cardlist then
-- card_type = SuoHa_CardType.PlaneAndOne
-- card_num = max_three_key
-- elseif three_count * 3 >= #cardlist then
-- card_type = SuoHa_CardType.Plane
-- card_num = max_three_key
-- end
plan_three_count = three_count
if three_count * 3 == #cardlist then
card_type = SuoHa_CardType.Plane
card_num = max_three_key
elseif three_count * 4 >= #cardlist and #cardlist % 4 == 0 then
card_type = SuoHa_CardType.PlaneAndOne
card_num = max_three_key
elseif three_count * 5 >= #cardlist and #cardlist % 5 == 0 then
card_type = SuoHa_CardType.PlaneAndTwo
card_num = max_three_key
end
end
return card_type, card_num, card_length, plan_three_count
end
function M:GetCardMapByList(cardlist)
local card_map = {}
for i = 1, #cardlist do
local card = cardlist[i]
local card_num = math.floor(cardlist[i] / 10)
if card_map[card_num] == nil then
card_map[card_num] = { card }
else
card_map[card_num][#card_map[card_num] + 1] = card
end
end
return card_map
end
function M:GetIsPass(cardlist)
if #cardlist == 0 then
return true
end
if cardlist[1] ~= nil and cardlist[1] == 0 then
return true
end
return false
end
--请求离开房间
function M:LevelRoom(callBack)
local _client = ControllerManager.GameNetClinet
if not _client then
return
end
_client:send(
Protocol.GAME_EXIT_ROOM,
nil,
function(res)
if res.ReturnCode == 0 then
ControllerManager.ChangeController(LoddyController)
elseif res.ReturnCode == 27 then
ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!")
end
callBack(res)
end
)
end
return M

View File

@ -0,0 +1,23 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:55
---
local SuoHa_GameEvent = {
OnMingCard = "OnMingCard",
OnInitCard = "OnInitCard",
OnOptions = "OnOptions",
OnPiaoTips = "OnPiaoTips",
OnPiaoAction = "OnPiaoAction",
OnBombScore = "OnBombScore",
OnIndexMove = "OnIndexMove",
OnPlaySucc = "OnPlaySucc",
OnErrorTip = "OnErrorTip",
OnPassSucc = "OnPassSucc",
OnResult = "OnResult",
OnResultByDissolve = "OnResultByDissolve",
OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc",
Game_TuoGuan = "Game_TuoGuan",
EventXiPai = "EventXiPai",
OnPassSuccCheckCard = "OnPassSuccCheckCard",
}
return SuoHa_GameEvent

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:42
---
local SuoHa_Player = {
-- 手牌列表
hand_count = 0,
out_card_list = {},
hand_list = {},
isOneCard = false, -- 报单
}
local M = SuoHa_Player
--- Create a new EXPlayer
function M.new()
setmetatable(M, { __index = Player })
local self = setmetatable({}, { __index = M })
self.hand_count = 0
self.out_card_list = {}
self.hand_list = {}
self.isOneCard = false
return self
end
-- 清理玩家数据
function M:Clear()
Player.Clear(self)
self.hand_count = 0
self.out_card_list = {}
self.hand_list = {}
self.isOneCard = false
end
return M

View File

@ -0,0 +1,440 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/25 13:52
---
local PKPlayBackView = require('main.poker.PKPlayBackView')
local SuoHa_PlayerCardInfoView = import('.SuoHa_PlayerPokerInfoView')
local SuoHa_PlayerSelfCardInfoView = import('.SuoHa_PlayerSelfPokerInfoView')
local PlayerInfoView = import('.EXPlayerInfoView')
local SuoHa_RightPanelView = import(".SuoHa_RightPanelView")
local SuoHa_ResultView = import(".SuoHa_ResultView")
local M = {}
local SuoHa_Record_Event = {
Evt_OutCard = 'OutCard',
Evt_Pass = 'pass',
Evt_NewRound = 'newindex',
Evt_result = 'result',
Evt_Result = 'Result'
}
local default_bg = 1
local bg_config = {
{ id = 1, url = 'extend/poker/suoha/bg/bg1', thumb = 'ui://Extend_Poker_SuoHa/table_bg1' },
{ id = 2, url = 'extend/poker/suoha/bg/bg2', thumb = 'ui://Extend_Poker_SuoHa/table_bg2' },
{ id = 3, url = 'extend/poker/suoha/bg/bg3', thumb = 'ui://Extend_Poker_SuoHa/table_bg3' }
}
--- Create a new
function M.new()
setmetatable(M, { __index = PKPlayBackView })
local self = setmetatable({}, { __index = M })
self.class = 'SuoHa_PlayBackView'
self:init()
return self
end
function M:InitView(url)
local room = self._room
if not room.self_player then
room.self_player = room:GetPlayerBySeat(1)
end
self._gamectr = ControllerManager.GetController(GameController)
UIPackage.AddPackage('extend/poker/suoha/ui/Extend_Poker_SuoHa')
PKPlayBackView.InitView(self, 'ui://Extend_Poker_SuoHa/SuoHa_Main_' .. self._room.room_config.people_num,
default_bg, bg_config)
self._tex_round = self._view:GetChild('round')
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")
if self._rightPanelView ~= nil then
self._rightPanelView:Destroy()
end
self._rightPanelView = SuoHa_RightPanelView.new(self, rightpanel)
rightpanel:GetChild("btn_setting").onClick:Clear()
self._player_info = {}
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild('player_info' .. i)
_player_info[i] = PlayerInfoView.new(tem, self)
end
local list = self._room.player_list
for i = 1, #list do
local p = list[i]
local info = _player_info[self:GetPos(p.seat)]
info._view.visible = true
info:FillData(p)
end
if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then
-- body
self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. ''
else
self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = ''
end
self._eventmap = {}
self._cmdmap = {}
self._cmdmap[SuoHa_Record_Event.Evt_OutCard] = self.CmdOutCard
self._cmdmap[SuoHa_Record_Event.Evt_Pass] = self.CmdPass
self._cmdmap[SuoHa_Record_Event.Evt_NewRound] = self.CmdNewRound
self._cmdmap[SuoHa_Record_Event.Evt_result] = self.Cmdresult
self._cmdmap[SuoHa_Record_Event.Evt_Result] = self.CmdResult
end
function M:NewPlayerPokerInfoView(view, index)
if index == 1 then
return SuoHa_PlayerSelfCardInfoView.new(view, self)
end
return SuoHa_PlayerCardInfoView.new(view, self)
end
function M:FillRoomData(data)
-- print("hidezhanji 1111")
self._currentStep = 1
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 = data.info.roomid
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)]
local head_info = self._player_info[self:GetPos(p.seat)]
if p.total_hp then
-- print("hidezhanji 2222")
head_info._view:GetChild('zhanji').visible = false
if room.hpOnOff == 1 or room:checkHpNonnegative() then
head_info._view:GetChild('zhanji').visible = true
head_info._view:GetChild('text_score').text = d2ad(p.total_hp)
end
end
head_info:FillData(p)
head_info:UnmarkTuoguan()
head_info:UpdateScore()
if p.seat ~= room.self_player.seat then
card_info:UpdateHandPoker(p.hand_list, false, true)
end
head_info:UpdatePiao(p.piao)
end
self:UpdateRound()
self:GenerateAllStepData(data)
self:ShowStep(1)
end
function M:ShowStep(index)
local step = self._step[index]
if step == nil then
return
end
for i = 1, #step.player_card_data do
local p = self._room:GetPlayerBySeat(i)
local info = self._player_card_info[self:GetPos(i)]
p.hand_list = step.player_card_data[i].hand_list
p.out_card_list = step.player_card_data[i].out_card_list
p.hand_left_count = #p.hand_list
if p.seat ~= self._room.self_player.seat then
info:UpdateHandPoker(p.hand_list, false, true)
else
info:InitPoker(p.hand_list, false)
end
end
if step.cmd == SuoHa_Record_Event.Evt_OutCard then
local seat = step.current_out_seat
local p = self._room:GetPlayerBySeat(seat)
local info = self._player_card_info[self:GetPos(seat)]
local card = step.out_card_list
local card_list = self._gamectr:ChangeCodeByFrom(card, true)
info:SetOutCardInfo(card_list, false)
self:ClearNextSeatOutCard(seat)
end
if step.cmd == SuoHa_Record_Event.Evt_Pass then
local seat = step.current_out_seat
local p = self._room:GetPlayerBySeat(seat)
local info = self._player_card_info[self:GetPos(seat)]
info:SetOutCardInfo(nil, true)
self:ClearNextSeatOutCard(seat)
end
if step.cmd == SuoHa_Record_Event.Evt_NewRound then
for i = 1, #self._room.player_list do
local p = self._room:GetPlayerBySeat(i)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:SetOutCardInfo(nil, false)
end
end
if step.cmd == SuoHa_Record_Event.Evt_result then
local result = step.result
for i = 1, #result do
local card_info = self._player_card_info[self:GetPos(result[i].seat)]
if result[i].entrust ~= nil and result[i].entrust == true then
local head_info = self._player_info[self:GetPos(result[i].seat)]
head_info:MarkTuoguan()
end
-- head_info:UpdateScore(result[i].score)
card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat)
end
end
if step.cmd == SuoHa_Record_Event.Evt_Result then
local Result = step.Result
self.result_view = SuoHa_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type,
Result.winseat, 0, Result.remaincards)
local num = self._view:GetChildIndex(self._view:GetChild("panel_record"))
self._view:AddChildAt(self.result_view._view, num)
else
if self.result_view then
self.result_view:Dispose()
end
end
end
function M:GenerateAllStepData(data)
local cmdList = self.cmdList
self._step = {}
local step = {}
local info = data.info
step.cmd = ''
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.hand_list = p.hand_card
u.hand_count = #u.hand_list
u.out_card_list = {}
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]
u.card_list = cmd.data.card
data.out_card_list = cmd.data.card_list
for i = 1, #data.out_card_list do
local out_card = data.out_card_list[i]
for j = 1, #u.hand_list do
if u.hand_list[j] == out_card then
list_remove(u.hand_list, out_card)
break
end
end
end
end
function M:CmdNewRound(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
end
function M:CmdPass(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.current_out_seat = cmd.seat
end
function M:Cmdresult(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.result = cmd.data.result
data.win_seat = cmd.seat
end
function M:CmdResult(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.Result = cmd.data
for i = 1, #data.Result.info do
local p = data.Result.info[i]
p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name
end
end
function M:CopyLastStep(index)
local step = {}
local last_step = self._step[index]
step = membe_clone(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].hand_list = membe_clone(last_step.player_card_data[i].hand_list)
card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list)
end
step.Result = nil
self._step[#self._step + 1] = step
return step
end
function M:ClearNextSeatOutCard(currenOutCardSeat)
local people_num = self._room.room_config.people_num
local next_seat = currenOutCardSeat + 1
if next_seat > people_num then
next_seat = next_seat - people_num
end
local p = self._room:GetPlayerBySeat(next_seat)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:SetOutCardInfo(nil, false)
end
function M:UpdateRound()
local round = self._room.curren_round
self._tex_round.text = string.format('第 %d 局', round)
end
function M:NextRecordPlay()
self._totalRound = tonumber(self._totalRound)
local result = PlayBackView.NextRecordPlay(self)
if not result then
return
end
self:ChangePlayState(false)
self._speed = 1
self._playFoward = true
self:ChangeTextSpeed()
if self.result_view then
self.result_view:Dispose()
self.result_view = nil
end
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()
if self.result_view then
self.result_view:Dispose()
self.result_view = nil
end
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 + 1 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
if self._currentStep > 0 then
self:ShowStep(self._currentStep)
end
end
end
end
function M:Destroy()
UpdateBeat:Remove(self.OnUpdate, self)
PlayBackView.Destroy(self)
end
return M

View File

@ -0,0 +1,425 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 16:35
---
local SuoHa_PlayerPokerInfoView = {
_view = nil,
_mainView = nil,
_mask_liangpai = nil,
}
local M = SuoHa_PlayerPokerInfoView
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._gameCtr = ControllerManager.GetController(GameController)
self.item_data = json.decode(self._view:GetChild("area_mask").text)
self.out_card_data = self.item_data["outcard_list"]
self._mask_liangpai = view:GetChild("mask_liangpai")
self.ctr_outpoker = view:GetController("output")
self.outpoker_list = view:GetChild(self.out_card_data["parent"])
self.hand_card_list = view:GetChild("hand_card_list")
self.ctr_one_card = view:GetController("one_card")
self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0")
self.text_bomb_score = view:GetChild("Score")
self.ani_bomb_score = view:GetTransition("score")
self.ani_result_score = view:GetTransition("score_1")
------------------------------lingmeng------------------------
self._view_Out = self._view:GetChild('List_Out')
--------------------------------------------------------------
end
-- function M:SetOutCardInfo(cardlist, isPass, isAnim)
-- self.outpoker_list:RemoveChildren(0, -1, true)
-- if cardlist == nil then
-- if isPass == true then
-- self.ctr_outpoker.selectedIndex = 2
-- else
-- self.ctr_outpoker.selectedIndex = 0
-- end
-- else
-- if isAnim then
-- if self.move_cor then
-- coroutine.stop(self.move_cor)
-- self.move_cor = nil
-- end
-- local time = 0.1
-- for i = 1, #cardlist do
-- local poker_item = UIPackage.CreateObject("Extend_Poker_SuoHa", "poker7")
-- local code = self:ChangeCodeByTo(cardlist[i])
-- -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/"..code)
-- -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
-- local card_code_obj
-- -- if DataManager.CurrenRoom.pai==0 then
-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/"..code)
-- -- else
-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
-- -- end
-- -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- -- body
-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/"..code.."_1")
-- -- end
-- if DataManager.CurrenRoom.pai == 0 then
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_1")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
-- end
-- else
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_2")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
-- end
-- end
-- if card_code_obj == nil then
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00")
-- end
-- poker_item:AddChild(card_code_obj)
-- --local poker = self:CreatPoker(cardlist[i],0.7)
-- self.outpoker_list:AddChild(poker_item)
-- poker_item.xy = Vector2.New(self.out_card_data["start_x"], self.out_card_data["start_y"])
-- poker_item:TweenMove(
-- self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item, self.out_card_data
-- ["maxcount_x"], 1.5), time)
-- --card_code_obj
-- -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x)
-- -- card_code_obj:SetScale(x,x)
-- -- end)
-- card_code_obj:SetScale(1.5, 1.5)
-- end
-- self.move_cor = coroutine.start(function()
-- coroutine.wait(0.1)
-- ViewUtil.PlaySound("SuoHa_PK", "extend/poker/suoha/sound/chupai.mp3")
-- end)
-- else
-- for i = 1, #cardlist do
-- local poker_item = UIPackage.CreateObject("Extend_Poker_SuoHa", "poker7")
-- local code = self:ChangeCodeByTo(cardlist[i])
-- local card_code_obj
-- if DataManager.CurrenRoom.pai == 0 then
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_1")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
-- end
-- else
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_2")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
-- end
-- end
-- if card_code_obj == nil then
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00")
-- end
-- card_code_obj:SetScale(1.5, 1.5)
-- poker_item:AddChild(card_code_obj)
-- --local poker = self:CreatPoker(cardlist[i],0.7)
-- self.outpoker_list:AddChild(poker_item)
-- poker_item.xy = self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item,
-- self.out_card_data["maxcount_x"], 1.5)
-- end
-- end
-- --self.ctr_outpoker.selectedIndex = 1
-- end
-- end
function M:SetOutCardInfo(cardlist, isPass, isAnim)
self._view_Out:RemoveChildren(0, -1, true)
if cardlist == nil then
if isPass == true then
self.ctr_outpoker.selectedIndex = 2
else
self.ctr_outpoker.selectedIndex = 0
end
else
self.ctr_outpoker.selectedIndex = 1
if isAnim then
if self.move_cor then
coroutine.stop(self.move_cor)
self.move_cor = nil
end
for i = 1, #cardlist do
local poker_item = self._view_Out:AddItemFromPool()
local code = self:ChangeCodeByTo(cardlist[i])
self:FillPoker(poker_item, "", cardlist[i])
end
self.move_cor = coroutine.start(function()
coroutine.wait(0.1)
ViewUtil.PlaySound("SuoHa_PK", "extend/poker/suoha/sound/chupai.mp3")
end)
else
for i = 1, #cardlist do
local poker_item = self._view_Out:AddItemFromPool()
local code = self:ChangeCodeByTo(cardlist[i])
self:FillPoker(poker_item, "", cardlist[i])
end
end
end
end
function M:SetOutCardBlack()
for i = 0, self.outpoker_list.numChildren - 1 do
self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7)
end
end
-- 12 -61 --11 58 --10 55 --46
function M:GetOffSet(cardLength) -- 15 -70
if cardLength > 8 then
return 52 --40
else
return -cardLength * -10 + 60
end
end
function M:GetOutCardEndFirstPokerPos(count, parent_com, poker_obj, max_count, scale)
local parent_width, parent_height = parent_com.width, parent_com.height
local poker_width, poker_height = poker_obj.width * scale, poker_obj.height * scale
local offset = self:GetOffSet(count)
local x, y = 0, 0
--local length = (count - 1) * (poker_width + offset) + poker_width
--if length <= parent_width then
-- x = (parent_width - length) / 2
-- y = (parent_height - poker_height) / 2
--end
if count <= max_count then
local length = (count - 1) * offset + poker_width
x = (parent_width - length) / 2
y = ((parent_height - poker_height) / 2)
end
return Vector2.New(x, y)
end
function M:GetOutCardEndPokerPos(index, count, parent_com, poker_obj, max_count, scale)
local offset_x, offset_y = self:GetOffSet(count), -100
local start_pos = self:GetOutCardEndFirstPokerPos(count, parent_com, poker_obj, max_count, scale)
local poker_width, poker_height = poker_obj.width * scale, poker_obj.height * scale
local parent_width, parent_height = parent_com.width, parent_com.height
local pos_x, pos_y = start_pos.x + (index - 1) * offset_x, start_pos.y
if index > max_count then
pos_x = (index - max_count - 1) * offset_x
pos_y = pos_y + poker_height + offset_y
end
return Vector2.New(pos_x, pos_y)
end
-- function M:PlayCardTypeEff(type1)
-- if type1 < 7 and type1 ~= 4 then return end
-- local eff_code = 0
-- if type1 == 10 then
-- eff_code = 2
-- elseif type1 == 11 then
-- eff_code = 3
-- elseif type1 == 4 then
-- eff_code = 4
-- else
-- eff_code = 1
-- end
-- if self.cro_type_eff ~= nil then
-- coroutine.stop(self.cro_type_eff)
-- end
-- self.cro_type_eff = nil
-- self.cro_type_eff = coroutine.start(function()
-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/eff_"..eff_code)
-- if self.type_eff_view == nil then return end
-- self._view:AddChild(self.type_eff_view)
-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y)
-- self.type_eff_view:GetTransition("t0"):Play()
-- coroutine.wait(1.5)
-- if self.type_eff_view ~= nil then
-- self.type_eff_view:Dispose()
-- self.type_eff_view = nil
-- end
-- end)
-- end
function M:PlayScore(score, isBomb, isWin)
if score == nil then
self.text_bomb_score.alpha = 0
return
end
if isBomb then
self.text_bomb_score.text = score >= 0 and "+" .. score or tostring(score)
self.text_bomb_score.grayed = score < 0
self.ani_bomb_score:Play()
else
if score < 0 then
self.text_bomb_score.text = tostring(score)
self.text_bomb_score.grayed = true
elseif score > 0 then
self.text_bomb_score.text = "+" .. score
self.text_bomb_score.grayed = false
else
local str = isWin and "+" or "-"
self.text_bomb_score.text = str .. score
self.text_bomb_score.grayed = not isWin
end
self.ani_result_score:Play()
end
end
function M:UpdateHandPoker(cardList, isPlayAni, isMing)
if self.cor_init_poker ~= nil then
coroutine.stop(self.cor_init_poker)
end
self.cor_init_poker = nil
self.card_list = {}
self.hand_card_list:RemoveChildren(0, -1, true)
local card_length
local new_card_list
if isMing == true then
new_card_list = self._gameCtr:ChangeCodeByFrom(cardList, true)
card_length = #cardList
else
card_length = cardList
end
if isPlayAni == true then
self.cor_init_poker = coroutine.start(function()
for i = card_length, 1, -1 do
local code = isMing == true and new_card_list[i] or 0
coroutine.wait(0.01)
local poker = self:CreatPoker1(code, 0.4)
self.hand_card_list:AddChild(poker)
end
end)
else
for i = card_length, 1, -1 do
local code = isMing == true and new_card_list[i] or 0
local poker = self:CreatPoker1(code, 0.4)
self.hand_card_list:AddChild(poker)
end
end
end
function M:SetRemainCardNumber(isPlay)
if isPlay then
self.ctr_one_card.selectedIndex = 1
self.eff_one_card:Play(-1, 0, nil)
else
self.ctr_one_card.selectedIndex = 0
end
--if self.card_number then
-- self.card_number.visible = show
-- self.card_number.text = string.format("剩余:%d",number)
--end
end
function M:FillPoker(poker, prefix, num)
num = self:ChangeCodeByTo(num)
local suffix = num == 310 and (DataManager.CurrenRoom.pai == 0 and "_1" or "_2") or ""
num = num == 1 and "00" or num
if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Extend_Poker_SuoHa/%s%s%s", prefix, num, suffix)
else
poker.icon = string.format("ui://Extend_Poker_SuoHa/%s%s%s", prefix, num, suffix)
end
end
function M:CreatPoker1(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_SuoHa", "poker" .. scale * 10)
local code = self:ChangeCodeByTo(poker)
local card_code_obj
if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_1")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
end
else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_2")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end
end
if card_code_obj == nil or bank == 1 then
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00")
end
card_code_obj:SetScale(scale, scale)
poker_item:AddChild(card_code_obj)
return poker_item
end
function M:CreatPoker(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_SuoHa", "poker" .. 12.5)
local code = self:ChangeCodeByTo(poker)
local card_code_obj
if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_1")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
end
else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code .. "_2")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end
end
if card_code_obj == nil or bank == 1 then
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00")
end
card_code_obj:SetScale(scale, scale)
poker_item:AddChild(card_code_obj)
return poker_item
end
function M:ChangeCodeByTo(card)
local flower = card % 10
local number = math.floor(card / 10)
if number == 15 then
number = 2
end
return flower * 100 + number
end
function M:Clear()
self:PlayScore(nil)
self:SetRemainCardNumber(false)
self:SetOutCardInfo(nil, false)
self.hand_card_list:RemoveChildren(0, -1, true)
self._mask_liangpai:RemoveChildren(0, -1, true)
self._view_Out:RemoveChildren(0, -1, true)
end
function M:Destroy()
end
return M

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:51
---
local SuoHa_Protocol = {
SuoHa_ConfirmToNextGame = "1003",
SuoHa_Send_Card = "1013",
SuoHa_Send_Guo = "1014",
SuoHa_Send_Piao = "1015",
SuoHa_Ming_Card = "2117",
SuoHa_Init_Card = "2011",
SuoHa_Options = "2004",
SuoHa_Index_Move = "2016",
SuoHa_Play_Succ = "2021",
SuoHa_Pass_Succ = "2030",
SuoHa_Put_Error = "2111",
SuoHa_Bomb_Score = "2118",
SuoHa_Result = "2007",
SuoHa_Piao_Tip = "2031",
SuoHa_Piao_Action = "2032",
SuoHa_ConfirmToNextGameSucc = "2010",
PT_GAMETUOGUAN = "2029", --托管
SEND_TUOGUAN = "1018", --托管
GAME_XIPAI = "20836",
GAME_EVENT_XIPAI = "20837",
GAME_EVENT_NOTIFY_XIPAI = "20838",
GAME_EVT_CARDINHAND = "202022",
}
return SuoHa_Protocol

View File

@ -0,0 +1,323 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/19 11:05
---
require("Game.View.ResultView")
local SuoHa_ResultView = {}
local M = SuoHa_ResultView
function SuoHa_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards)
setmetatable(M, { __index = ResultView })
local self = setmetatable({}, { __index = M })
self.class = "SuoHa_ResultView"
self._currenIndex = 0
self._close_zone = false
--self._blur_view = blur_view
self._gamectr = ControllerManager.GetController(GameController)
self:init("ui://Extend_Poker_SuoHa/clearing", data, roomid, over, win_seat, dissolve, remaincards)
return self
end
function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
ResultView.init(self, url, true)
self.xiPaiCtr = self._view:GetController("xipai")
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
--self:InitData(data,roomid)
--self:InitData(data,roomid)
printlog("aaaaaaaaaaaaaaaa1111111111111111111111111222222222222222 ", dissolve)
pt(data)
if dissolve == 1 then
-- body
self.xiPaiCtr.selectedIndex = 0
self:InitData(data, win_seat, roomid)
else
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 DataManager.CurrenRoom.xipaiScore then
--xipai.text="洗牌 积分x"..DataManager.CurrenRoom.xipaiScore
else
--xipai.text="洗牌 积分x0"
end
self:InitData_One(data, win_seat, over, roomid, remaincards)
end
end
function M:ChangeCodeByTo(card)
local flower = card % 10
local number = math.floor(card / 10)
if number == 15 then
number = 2
end
return flower * 100 + number
end
-- 小结算
function M:InitData_One(data, winseat, over, roomid, remaincards)
local room = DataManager.CurrenRoom
self._view:GetController("sdk").selectedIndex = 1
local _gamectr = ControllerManager.GetController(GameController)
local list_view = self._view:GetChild("player_list_1")
list_view:RemoveChildrenToPool()
local leftCardAll = self._view:GetChild("leftCardHand")
leftCardAll:RemoveChildrenToPool()
if remaincards and #remaincards > 0 then
table.sort(remaincards, function(a, b)
return a % 100 < b % 100
end)
for i = 1, #remaincards do
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. remaincards[i])
leftCardAll:AddChild(card_code_obj)
end
end
for i = 1, #data do
local player = data[i]
local item = list_view:AddItemFromPool("ui://Extend_Poker_SuoHa/clearing_item_1")
local leftCard = item:GetChild("leftCard")
leftCard:RemoveChildrenToPool()
-- table.sort(data[i].handCards,function (a,b)
-- return a % 100 < b % 100
-- end)
for j = 1, #data[i].handCards do
local code = data[i].handCards[j]
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
leftCard:AddChild(card_code_obj)
end
-- table.sort(data[i].outCards,function (a,b)
-- return a % 100 < b % 100
-- end)
for k = 1, #data[i].outCards do
local code = data[i].outCards[k]
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/" .. code)
print("==================================================card_code_obj", card_code_obj, code)
leftCard:AddChild(card_code_obj)
card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7)
end
local boom = item:GetChild("boom")
boom.text = player.thisboomnum
local piao = item:GetChild("piao")
if player.piao <= 0 then
piao.text = "0"
else
piao.text = "" .. player.piao
end
local nichen = item:GetChild("nichen")
if player.nick ~= nil then
-- body
nichen.text = tostring(player.nick)
else
nichen.text = tostring(player.self_user.nick_name)
end
local shengpai = item:GetChild("shengpai")
if player.cards ~= nil then
-- body
shengpai.text = tostring(#player.cards)
else
shengpai.text = tostring(#player.hand_list)
end
local rt = 1
if room.hpOnOff == 1 then
rt = room.score_times
end
local hp_nonnegative = room:checkHpNonnegative()
local roundScore = player.winscore
if hp_nonnegative then
local jifen = ""
if roundScore > 0 then
jifen = "+" .. roundScore
else
jifen = "" .. roundScore
end
local tili = ""
local limit = ""
if player.hp_info.round_actual_hp > 0 then
tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")"
if player.hp_info.upper_limit then
limit = "达到上限"
end
else
tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")"
if player.hp_info.upper_limit then
limit = "达到下限"
end
end
item:GetChild("score").text = jifen .. tili .. limit
else
local jifen = ""
if roundScore >= 0 then
jifen = "+" .. roundScore
else
jifen = "" .. roundScore
end
jifen = jifen .. " "
local tili = ""
if room.hpOnOff > 0 then
local need = roundScore * rt
tili = "("
if roundScore > 0 then
tili = tili .. "+" .. tostring(need)
else
tili = tili .. tostring(need)
end
tili = tili .. ")"
end
item:GetChild("score").text = jifen .. tili
end
if roundScore >= 0 then
if room.self_player.seat == player.seat then
-- body
self._view:GetController("result").selectedIndex = 1
end
else
if room.self_player.seat == player.seat then
self._view:GetController("result").selectedIndex = 0
end
end
end
if over == 0 then
-- body
local btn_confirm = self._view:GetChild("btn_confirm")
btn_confirm.onClick:Set(function()
self:Destroy()
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
end)
else
self.xiPaiCtr.selectedIndex = 0
local btn_confirm = self._view:GetChild("btn_confirm")
btn_confirm.onClick:Set(function()
--self:Destroy()
self:InitData(data, winseat, roomid)
-- ViewManager.ChangeView(ViewManager.View_Lobby)
end)
end
end
-- 大结算
function M:InitData(data, winseat, roomid)
self.xiPaiCtr.selectedIndex = 0
self._view:GetController("sdk").selectedIndex = 0
local room = DataManager.CurrenRoom
local rt = 1
if room.hpOnOff == 1 and room.score_times ~= 1 then
rt = room.score_times
end
-- 赋值result_info聊天室分享需要
local player_list = {}
for i = 1, #data do
player_list[i] = {}
local user = room:GetPlayerBySeat(data[i].seat).self_user
player_list[i].id = user.account_id
player_list[i].score = data[i].score
player_list[i].hp_info = data[i].hp_info
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].seat = data[i].seat
player_list[i].head_url = data[i].self_user.head_url
if data[i].entrust ~= nil then
player_list[i].entrust = data[i].entrust > 0
else
player_list[i].entrust = false
end
player_list[i].param = {}
player_list[i].param[1] = {}
player_list[i].param[1].key = "赢局数:"
player_list[i].param[1].value = tostring(data[i].settle_log.winnum)
player_list[i].param[2] = {}
player_list[i].param[2].key = "打出炸弹数:"
player_list[i].param[2].value = tostring(data[i].settle_log.boomnum)
player_list[i].param[3] = {}
player_list[i].param[3].key = "春天次数:"
player_list[i].param[3].value = tostring(data[i].settle_log.springnum)
player_list[i].param[4] = {}
player_list[i].param[4].key = "当局最高分:"
player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt)
if data[i].daniao > 0 then
player_list[i].flag = { "打鸟" }
end
end
self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time,
player_list)
self:InitBigResult(room)
local big_result = self._view:GetChild("big_result")
local lst_p = big_result:GetChild("player_list")
-- local list_param = com_p:GetChild("list_param")
for i = 1, lst_p.numChildren do
local com_p = lst_p:GetChildAt(i - 1)
local list_param = com_p:GetChild("list_param")
for j = 1, list_param.numChildren do
local tem = list_param:GetChildAt(j - 1)
tem:GetChild("txt_value").textFormat.size = 30
end
end
end
return M

View File

@ -0,0 +1,94 @@
local MainRightPanelView = require("Game.View.MainRightPanelView")
local SuoHa_RightPanelView = {}
local M = SuoHa_RightPanelView
local function __init(self, mainView, view)
local right_panel = view
local btn_setting = mainView._view:GetChild("Btn_Setting")
btn_setting.onClick:Set(function()
print("lingmengmainview", mainView.dismiss_room_cd_time)
local _settingView = mainView:NewSettingView()
_settingView:Show()
end)
-- btn_setting.onClick:Set(function()
-- local _settingView = mainView:NewSettingView()
-- _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1
-- _settingView.cd_time = mainView.dismiss_room_cd_time
-- _settingView:Show()
-- local room = DataManager.CurrenRoom
-- _settingView.onCallback:Add(function(context)
-- local _gamectr = ControllerManager.GetController(GameController)
-- if (room.CurnrenState == StateType.Ready) then
-- _gamectr:LevelRoom(function(response)
-- if (response.ReturnCode == 0) then
-- ViewManager.ChangeView(ViewManager.View_Lobby)
-- GameApplication.Instance:ShowTips("房间已解散!")
-- end
-- end)
-- else
-- -- print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time)
-- if mainView.dismiss_room_cd_time > 0 then
-- GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!")
-- else
-- _gamectr:AskDismissRoom()
-- end
-- end
-- end)
-- end)
-- self._tex_data = right_panel:GetChild("tex_data")
self._tex_time = mainView._view:GetChild("Text_Time")
self._pb_batteryLevel = mainView._view:GetChild("PB_Battery")
-- self._xinhao = right_panel:GetController("xinhao")
-- self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1")
-- self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1")
-- self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7")
-- self.ctr_log = right_panel:GetController("log")
-- local btn_log = right_panel:GetChild("btn_log")
-- btn_log.onClick:Set(function()
-- if self.onLogCallback then
-- self.onLogCallback()
-- end
-- end)
self._total_time = 0
self:__UpdateTime()
-- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true)
-- self._timer:Start()
end
function SuoHa_RightPanelView.new(mainView, view)
setmetatable(M, { __index = MainRightPanelView })
local self = setmetatable({}, { __index = M })
self.class = "SuoHa_RightPanelView"
__init(self, mainView, view)
return self
end
function M:__UpdateTime()
-- self._tex_data.text = os.date("%Y-%m-%d")
self._tex_time.text = os.date("%H:%M")
if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then
self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel()
end
-- local NetworkReachability = UnityEngine.NetworkReachability
-- local _client = ControllerManager.GameNetClinet
-- if not _client then return end
-- local ping = _client:getAveragePingTime()
-- if not ping then return end
-- ping = math.floor(ping / 2)
-- if ping > 300 then ping = 300 end
-- if ping <= 100 then
-- self.ctr_xh.selectedIndex = 0
-- elseif ping <= 300 then
-- self.ctr_xh.selectedIndex = 1
-- else
-- self.ctr_xh.selectedIndex = 2
-- end
-- self._tex_ping.text = ping .. "ms"
end
return M

View File

@ -0,0 +1,24 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/19 14:36
---
local SuoHa_Player = import(".SuoHa_Player")
local SuoHa_Room = {
}
local M = SuoHa_Room
--- Create a new EXPlayer
function M.new()
setmetatable(M, { __index = Room })
local self = setmetatable({}, { __index = M })
self:init()
return self
end
function M:NewPlayer()
return SuoHa_Player.new()
end
return M

View File

@ -0,0 +1,490 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/19 10:54
---
local M = {}
--- Create a new RoomConfig
function M.new(config)
setmetatable(M, { __index = RoomConfig })
local self = setmetatable({}, { __index = M })
RoomConfig.init(self, config)
self.class = "SuoHa_RoomConfig"
self.config = config
self.Leaf = config.leaf
self.Rule = config.rule
self.Times = config.times
self.WillBeOut = config.willBeOut
self.Heart10 = config.heartten
self.BombSpring = config.minboom
self.AA = config.aa
self.PlayerNum = config.maxPlayers
self.showlength = config.showlength
self.fourBeltThree = config.fourBeltThree
self.demolition = config.demolition
self.fangzuobi = config.fangzuobi
self.planelack = config.planelack
self.threelack = config.threelack
self.threeA = config.threeA
self.tuoguan_active_time = config.tuoguan_active_time
self.tuoguan = config.tuoguan
self.tuoguan_result_type = config.tuoguan_result_type
self.isNonnegative = config.isNonnegative
self.sandaidan = config.sandaidan
self.isHidden = config.isHidden
self.ba = config.ba
self.fs = config.fs
if config.piao ~= nil then
self.piao = config.piao
else
self.piao = 0
end
if config.daniao ~= nil then
self.daniao = config.daniao
else
self.daniao = 0
end
if self.isNonnegative == nil then
self.isNonnegative = 0
end
self.energyTab = config.energyTab
if self.energyTab == nil then
self.energyTab = 0
end
return self
end
--[[function M:GetDes(sp)
sp = sp or " "
local str = ""
-- str = str.. self.Times.."局"..sp
str = str .. RoomConfig.GetDes(self, sp).." "
local count=1
if self.Leaf == 1 then
str = str.. "15张玩法"
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
str = str.. "16张玩法"
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
end
if self.Rule == 1 then
str = str.. "第一局黑桃3先出随后赢家先出".."\n"
else
str = str.. "第一局系统随机选一张先出,随后赢家先出".."\n"
end
count=0
if self.WillBeOut == 1 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
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
end
if self.showlength == 1 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.fourBeltThree == 3 then
str = 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
elseif self.fourBeltThree == 2 then
str = 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.Heart10 == 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
end
if self.BombSpring == 1 then
str = str.. "\n4个3 或者3个A 1个2 春天\n"
end
if self.demolition == 1 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.fangzuobi == 1 and self.PlayerNum==3 then
str = 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.sandaidan == 1 then
str = str.. "\n三张飞机带单或者对子\n"
end
if self.ba == 1 then
str = str.. "炸弹分数算赢家"
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.fs == 1 then
str = 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.planelack == 1 then
str = str.. "飞机少带可接完"
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.threelack == 1 then
str = str.. "三张少带可接完"
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.threeA ==1 then
str = str.. "三张A算炸弹"
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.piao == 0 then
elseif self.piao == 1 then
str = str.. "飘123"
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
elseif self.piao == 2 then
str = str.. "飘235"
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
elseif self.piao == 3 then
str = str.. "飘258"
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.daniao == 1 then
str = str.. "打鸟+10"
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
elseif self.daniao == 2 then
str = str.. "打鸟+20"
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
elseif self.daniao == 3 then
str = str.. "打鸟+50"
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
return str
end--]]
function M:GetDes(sp)
sp = sp or " "
local str = ""
-- str = str.. self.Times.."局"..sp
str = str .. RoomConfig.GetDes(self, sp)
if self.Leaf == 1 then
str = str .. "15张玩法" .. sp
else
str = str .. "16张玩法" .. sp
end
if self.Rule == 1 then
str = str .. "第一局黑桃3先出随后赢家先出" .. sp
else
str = str .. "第一局系统随机选一张先出,随后赢家先出" .. sp
end
if self.WillBeOut == 1 then
str = str .. "能出必出" .. sp
else
str = str .. "可不必出" .. sp
end
if self.showlength == 1 then
str = str .. "显示剩余牌" .. sp
end
if self.fourBeltThree == 3 then
str = str .. "四带三" .. sp
elseif self.fourBeltThree == 2 then
str = str .. "四带二" .. sp
end
if self.Heart10 == 1 then
str = str .. "红桃10分数翻倍" .. sp
end
if self.BombSpring == 1 then
str = str .. "4个3 或者3个A 1个2 春天" .. sp
end
if self.demolition == 1 then
str = str .. "炸弹不能拆" .. sp
end
if self.fangzuobi == 1 and self.PlayerNum == 3 then
str = str .. "防作弊" .. sp
end
if self.sandaidan == 1 then
str = str .. "三张飞机带单或者对子" .. sp
end
if self.ba == 1 then
str = str .. "炸弹分数算赢家" .. sp
end
if self.fs == 1 then
str = str .. "反春天" .. sp
end
if self.planelack == 1 then
str = str .. "飞机少带可接完" .. sp
end
if self.threelack == 1 then
str = str .. "三张少带可接完" .. sp
end
if self.threeA == 1 then
str = str .. "三张A算炸弹" .. sp
end
if self.piao == 0 then
elseif self.piao == 1 then
str = str .. "飘123" .. sp
elseif self.piao == 2 then
str = str .. "飘235" .. sp
elseif self.piao == 3 then
str = str .. "飘258" .. sp
end
if self.daniao == 1 then
str = str .. "打鸟+10" .. sp
elseif self.daniao == 2 then
str = str .. "打鸟+20" .. sp
elseif self.daniao == 3 then
str = str .. "打鸟+50" .. sp
end
return str
end
function M:GetGameJS()
local gamerulepanel = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SuoHa/gamerule")
return gamerulepanel
end
function M:GetGameSMSize()
return 467, 500
end
function M:GetGameName()
return "跑得快"
end
--function M:GetIsShowCardNumber()
-- return self.ShowNumber == 1
--end
return M

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 9a88ec6b6fe8e374bb8ae76b04a071a6
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: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 3784e749d620d7e4fb77574ed8afd1d9
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: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 089d03ceb6a17fb41aba1832a843d397
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 012ac2887cff67e47b842e1ecc1154f2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 1f5461c788178fa4bb86301c7398a33b
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: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 2e00ef1a88eb7484db2fdd2420172026
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: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 0e67102bc078c724da601496eda14f8b
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: be8e4e4bd1108184ab92feceaea0878f
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 057947a069939a244afd08a89826fe20
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 43a3d70231154554f85d70c46b11acd5
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName: extend/poker/suoha/555092e5b3b7b08c957082b82f292a46
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 90b7612eae62bb949b77c5984e16ea76
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: extend/poker/suoha/1dd27af6cf16f29dd351e9912088b1d5
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c9b0f551a6d291a4bacf4811efa738b9
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName: extend/poker/suoha/1dd27af6cf16f29dd351e9912088b1d5
assetBundleVariant: