躲躲牌小结算,游戏换桌子(本地),成员管理页面初建

master
lingmeng 2026-01-04 21:54:26 +08:00
parent 7288db46be
commit a8853853ad
1594 changed files with 21457 additions and 198 deletions

View File

@ -17,6 +17,7 @@ local _LocalConfigAllGame = {
-- 90,
-- 22,
66,90
,91
}
local FilterGame = function(games)

View File

@ -1571,7 +1571,7 @@ function M:FG_StopService(group_id, ban, callback)
end)
end
function M:FG_AddPlay(group_id, game_id, config_data, name, hpData, hpOnOff, gtype, deskId, callback)
function M:FG_AddPlay(group_id, game_id, config_data, name, hpData, hpOnOff, gtype,pid, deskId, callback)
local _client = ControllerManager.GroupClient
local _data = {}
_data.id = group_id

View File

@ -22,7 +22,7 @@ end
function M:SelectedConfigData()
local data = {}
local com_editSetting = self.gl_view:GetModeData().data._config:GetChild("com_editSetting")
local com_editSetting = self._config:GetChild("com_editSetting")
self.cGps = com_editSetting:GetController("cGps")
self.cTuoguan = com_editSetting:GetController("cTuoguan")

View File

@ -66,7 +66,12 @@ function M:init(url)
--管理页面
view:GetChild('btn_manager').onClick:Set(function()
FamilyManagerView.new({})
FamilyManagerView.new({pageType=1})
end)
--成员页面
view:GetChild('btn_menber').onClick:Set(function()
FamilyManagerView.new({pageType=2})
end)
--新玩法管理
@ -141,6 +146,7 @@ function M:FamilyTableRenderer(index, obj)
obj:GetChild('text_roundNum').text = string.format("(0/%s)",
ExtendManager.GetExtendConfig(tmp.gameId):GetGameInfo():LoadConfigOneInfo(tmp.config, tmp.hpData, "maxRound") or
0)
obj.icon = string.format("ui://Family/icon_table%s", (self.localTextDesk[tmp.gameId] or 0) + 1)
end
--进入亲友圈
@ -165,6 +171,7 @@ function M:EnterFamily(index_family, only)
local view = self._view
view:GetChild('text_familyName').text = self._group.name
view:GetChild('text_familyid').text = self._group.id
view:GetChild('text_fangka').text = self._group.groupDiamo
self._viewList_familyList.selectedIndex = index_family - 1
self:UpdateRoom()
end
@ -174,8 +181,8 @@ end
--房间处理方法
function M:UpdateRoom()
local group = self._group
local playList = self._group.playList
local roomList = self._group.rooms
local playList = group.playList
local roomList = group.rooms
self._viewList_tableList.numItems = #playList + #roomList
end
@ -240,7 +247,7 @@ function M:ClickTableShowDetail(data)
end)
detailView:GetChild('btn_delRoom').onClick:Set(function(context)
self:JieSanRomm(self._group.id,data.info.id)
self:JieSanRomm(self._group.id, data.info.id)
end)
if data.type == 1 then
@ -326,8 +333,10 @@ end
-----------------
function M:FillData()
local view = self._view
local groups = DataManager.groups.groupList
self._viewList_familyList.numItems = #groups
self.localTextDesk = FamilyPlayListView:EncodeDeskType()
self:EnterFamily()
end

View File

@ -78,7 +78,7 @@ function M:ClickCreate()
_data.game_id = info.game_id
self.table_color = 0
local functionName = self._data.playInfo and fgCtr.FG_UpdatePlay or fgCtr.FG_AddPlay
functionName(fgCtr, group.id, info.game_id, _data, info.name, hpData, 1, group.type, self.table_color,
functionName(fgCtr, group.id, info.game_id, _data, info.name, hpData, 1,self._data.playInfo.id, group.type, self.table_color,
function(res)
if self._is_destroy then
return

View File

@ -1,19 +1,34 @@
local ManagerChild_GamePlayView = import(".ManagerChild_GamePlayView")
local ManagerChild_PlayerView = import(".ManagerChild_PlayerView")
--成员
local ManagerMenberChild_PlayerView = import(".ManagerMenberChild_PlayerView")
local FamilyManagerTable = {}
local M = FamilyManagerTable
M.ManagerTable = {
{id=1,title="成员管理",icon="ui://Family/成员管理",view=ManagerChild_PlayerView},
{id=2,title="快速组局",icon="ui://Family/快速组局",view=ManagerChild_GamePlayView},
{ id = 1, title = "成员管理", view = ManagerChild_PlayerView },
{ id = 2, title = "快速组局", view = ManagerChild_GamePlayView },
--成员管理页面
{ id = 3, title = "成员列表", view = ManagerMenberChild_PlayerView }
}
M.ManagerShow = {
{1,2}, --群主
{ 1, 2 }, --群主
{}, --代理
{} --用户
}
M.ManagerMenberShow = {
{ 3 }, --群主
{}, --代理
{} --用户
}
return M
M.ManagerManger = {
{id=1,url="ui://Family/FamilyManager",table = M.ManagerShow},
{id=2,url="ui://Family/FamilyManagerMenber",table = M.ManagerMenberShow},
}
return M

View File

@ -4,6 +4,8 @@ local FamilyManagerView = {}
local M = FamilyManagerView
local MangerURL = {"ui://Family/FamilyManager"}
function FamilyManagerView.new(data,callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
@ -13,12 +15,13 @@ function FamilyManagerView.new(data,callback)
self._close_destroy = true
self._full = true
self._full_offset = false
self:init("ui://Family/FamilyManager")
self:init()
return self
end
function M:init(url)
getmetatable(M).__index.init(self,url)
function M:init()
self._data.pageType = self._data.pageType or 1
getmetatable(M).__index.init(self,FamilyManagerTable.ManagerManger[self._data.pageType].url)
local view = self._view
self._viewList_left = view:GetChild('list_left')
@ -30,13 +33,13 @@ end
--管理页面函数组--
function M:ManagerItemRenderer(index,obj)
local viewInfo = FamilyManagerTable.ManagerTable[FamilyManagerTable.ManagerShow[self._data.lev][index+1]]
obj.title = viewInfo.title
obj.icon = viewInfo.icon
local viewInfo = FamilyManagerTable.ManagerTable[FamilyManagerTable.ManagerManger[self._data.pageType].table[self._data.lev][index+1]]
obj:GetChild('text_down').text = viewInfo.title
obj:GetChild('text_up').text = viewInfo.title
end
function M:ManagerClick(context)
local viewInfo = FamilyManagerTable.ManagerTable[FamilyManagerTable.ManagerShow[self._data.lev][self._viewList_left.selectedIndex+1]]
local viewInfo = FamilyManagerTable.ManagerTable[FamilyManagerTable.ManagerManger[self._data.pageType].table[self._data.lev][self._viewList_left.selectedIndex+1]]
viewInfo.view.new({root=self})
end
-----------------

View File

@ -4,7 +4,7 @@ local FamilyPlayListView = {}
local M = FamilyPlayListView
function FamilyPlayListView.new(data,callback)
function FamilyPlayListView.new(data, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "FamilyPlayListView"
@ -16,22 +16,102 @@ function FamilyPlayListView.new(data,callback)
end
function M:init(url)
getmetatable(M).__index.init(self,url)
getmetatable(M).__index.init(self, url)
local view = self._view
view:GetChild('btn_addPlay').onClick:Set(handler(self,self.AddPlayClick))
--控制器
self._ctr_page = view:GetController('page')
--跳转到玩法创建
view:GetChild('btn_addPlay').onClick:Set(handler(self, self.AddPlayClick))
--当前玩法列表
self._viewList_playList = view:GetChild('list_playList')
self._viewList_playList:SetVirtual()
self._viewList_playList.itemRenderer = handler(self, self.PlayListRenderer)
--改变桌子颜色
view:GetChild('btn_saveDesk').onClick:Set(handler(self, self.ClickSaveDesk))
--重写关闭按钮
view:GetChild('btn_close').onClick:Set(function()
if self._ctr_page.selectedIndex == 1 then
self._ctr_page.selectedIndex = 0
else
self:Destroy()
end
end)
self:FillData()
end
function M:AddPlayClick()
FamilyManagerView.new({frsitIndex=2})
FamilyManagerView.new({ pageType=1,frsitIndex = 2 })
end
--玩法列表渲染
function M:PlayListRenderer(index, obj)
local info = DataManager.CurrenGroup.playList[index + 1]
obj:GetChild('text_gameName').text = info.name
obj:GetChild('VScrollText').text = ExtendManager.GetExtendConfig(info.gameId):GetGameInfo():LoadConfigToDetail(
info.config, info.hpData)
obj:GetChild('btn_chooseDesk').onClick:Set(function()
self._ctr_page.selectedIndex = 1
self._data_clickGameId = info.gameId
self._view:GetChild('list_changeDesk').selectedIndex = self.localTextDesk[info.gameId] or 0
end)
obj.icon = string.format("ui://Family/icon_table%s", (self.localTextDesk[info.gameId] or 0) + 1)
end
--点击保存玩法
function M:ClickSaveDesk()
local index = self._view:GetChild('list_changeDesk').selectedIndex
self._ctr_page.selectedIndex = 0
if self._data_clickGameId == nil then
ViewUtil:ErrorTip("桌子信息保存失败,请重新选择!")
return
end
self.localTextDesk[self._data_clickGameId] = index
self:DecodeDeskType()
self._viewList_playList:RefreshVirtualList()
end
function M:FillData()
self.localTextDesk = self:EncodeDeskType()
self._viewList_playList.numItems = #DataManager.CurrenGroup.playList
self:Show()
end
--格式化本地桌子数据
function M:EncodeDeskType()
local text = Utils.LoadLocalFile("deskType")
local table1 = split(text, "|")
if not table1 or #table1 == 0 then
return {}
end
local table2 = {}
for i, v in ipairs(table1) do
local tmp = split(v, ",")
table2[tonumber(tmp[1])] = tonumber(tmp[2])
end
return table2
end
--存入桌子数据
function M:DecodeDeskType()
local text = ""
for k, v in pairs(self.localTextDesk) do
local text1 = string.format("%s,%s", k, v)
if text == "" then
text = text1
else
text = string.format("%s|%s", text, text1)
end
end
Utils.SaveLocalFile("deskType", text)
end
-- 打开窗口
function M:Show()
getmetatable(M).__index.Show(self)

View File

@ -0,0 +1,60 @@
local ManagerMenberChild_PlayerView = {}
local M = ManagerMenberChild_PlayerView
function ManagerMenberChild_PlayerView.new(data, callback)
local self = setmetatable({}, { __index = M })
self.class = "ManagerMenberChild_PlayerView"
self._data = data or {}
self._callback = callback
self:init("ui://Family/ManagerMenberChild_Player")
return self
end
function M:init(url)
local root = self._data.root
if not root then
ViewUtil:ErrorTip("点击太快,请重新打开页面")
return
end
local page = root._view:GetChild('page')
self:LoadPage(page, url, function(view)
self._view = view
end)
end
--确保页面加载后再渲染初始化数据
function M:LoadPage(loader, url, callback)
loader.url = url
if loader.component then
callback(loader.component)
else
FrameTimer.New(function()
if loader.component then
callback(loader.component)
end
end, 1):Start()
end
end
function M:FillData()
end
-- 打开窗口
function M:Show()
getmetatable(M).__index.Show(self)
end
-- 关闭窗口
function M:Close()
getmetatable(M).__index.Close(self)
end
-- 销毁窗口
function M:Destroy()
getmetatable(M).__index.Destroy(self)
end
return M

View File

@ -16,13 +16,13 @@ function EXGameInfo.new(blur_view)
end
function M:FillData(view, index)
getmetatable(M).__index:FillData(view, index)
getmetatable(M).__index.FillData(self,view, index)
self._maxPlayer = 2 -- 默认玩家人数
self._roundChoice = 5 -- 回合选项数
-- if oldGameVersion == 1 then
self._config = UIPackage.CreateObjectFromURL(self:GetPageURL())
-- self._config = UIPackage.CreateObjectFromURL(self:GetPageURL())
local com_editSetting = self._config:GetChild("com_editSetting")
@ -95,7 +95,7 @@ function M:LoadConfigData(data)
pt(data)
_config:GetController("round").selectedIndex = data.opt - 1
_config:GetController("handcard").selectedIndex = 2 - data.leaf
_config:GetController("peopleNum").selectedIndex = 3 - data.maxPlayers
_config:GetController("peopleNum").selectedIndex = 1
_config:GetController("showCardNum").selectedIndex = 1 - data.showlength
_config:GetController("wanfa1_1").selectedIndex = data.planeNoBelt
_config:GetController("wanfa1_2").selectedIndex = data.planelack
@ -164,7 +164,7 @@ function M:LoadConfigData(data)
end
function M:SelectedConfigData()
local _data = getmetatable(M).__index:SelectedConfigData()
local _data = getmetatable(M).__index.SelectedConfigData(self)
local _config = self._config
local round = _config:GetController("round").selectedIndex
local handcard = _config:GetController("handcard").selectedIndex

View File

@ -209,7 +209,6 @@ function M:InitView(url)
self._view:GetChild('btn_ready_inClear').onClick:Set(function()
if self.result_view and self.result_view._view then
self._ctr_inClear.selectedIndex = 0
self.result_view:ClearReady()
else
self.result_view = nil
local _gamectr = ControllerManager.GetController(GameController)
@ -998,8 +997,7 @@ function M:EventInit()
-- end
coroutine.wait(2)
self.result_view = EXResultView.new(self, info, self._room.room_id, over, win_seat, 0,
remaincards)
self.result_view = EXResultView.new(self, info, over, win_seat)
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
@ -1049,7 +1047,7 @@ function M:EventInit()
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
end
self.result_view = EXResultView.new(self, info, self._room.room_id, over, winseat, dissolve, nil)
self.result_view = EXResultView.new(self, info, over, winseat)
self.result_view:Show()
ControllerManager.ChangeController(LoddyController)
self:UnmarkSelfTuoguan()
@ -1252,8 +1250,7 @@ function M:ReconnectForClearing()
coroutine.start(function()
coroutine.wait(0.3)
self.result_view = EXResultView.new(self, self._room.player_list, self._room.room_id, 0,
win_seat, 0, remaincards)
self.result_view = EXResultView.new(self, self._room.player_list, 0, win_seat)
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]

View File

@ -285,8 +285,7 @@ function M:ShowStep(index)
coroutine.wait(2)
self.result_view = EXResultView.new(self, info, self._room.room_id, over, win_seat, 0,
remaincards)
self.result_view = EXResultView.new(self, info, over, win_seat)
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
@ -323,8 +322,7 @@ function M:ShowStep(index)
end
if step.cmd == EXRecord_Event.Evt_Result then
local Result = step.Result
self.result_view = EXResultView.new(self._root_view, Result.info, self._room.room_id, Result.type,
Result.winseat, 0, Result.remaincards)
self.result_view = EXResultView.new(self._root_view, Result.info, Result.type, Result.winseat)
local num = self._view:GetChildIndex(self._view:GetChild("panel_record"))
self._view:AddChildAt(self.result_view._view, num)
else

View File

@ -8,7 +8,7 @@ local EXResultView = {}
local M = EXResultView
function EXResultView.new(root, data, roomid, over, win_seat, dissolve, remaincards)
function EXResultView.new(root, data, over, win_seat)
setmetatable(M, { __index = ResultView })
local self = setmetatable({}, { __index = M })
@ -17,12 +17,11 @@ function EXResultView.new(root, data, roomid, over, win_seat, dissolve, remainca
self._close_zone = false
self._root_runFast = root
self._gamectr = ControllerManager.GetController(GameController)
self:init("ui://Extend_Poker_DuoDuo/clearing_new", data, roomid, over, win_seat, dissolve, remaincards)
print("=======================lingmengresult", data, roomid, over, win_seat, dissolve, remaincards)
self:init("ui://Extend_Poker_DuoDuo/clearing_new", data, over, win_seat)
return self
end
function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
function M:init(url, data, over, win_seat)
ResultView.init(self, url, true)
local room = DataManager.CurrenRoom
@ -46,36 +45,17 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
end
end
self._view:GetChild('btn_over1Close').onClick:Set(function()
if over == 0 then
self:Close()
else
self._view:GetController('over').selectedIndex = 1
end
end)
--下一局
self._view:GetChild('btn_nextRound').onClick:Set(function()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
-- self._root_runFast._ctr_inClear.selectedIndex = 0
self:Destroy()
else
self._view:GetController('over').selectedIndex = 1
end
end)
self.ClearReady = function()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
self._root_runFast:ClearOk()
self:Destroy()
else
self._view:GetController('over').selectedIndex = 1
end
end
self._view:GetChild('btn_closeRound').onClick:Set(function()
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
@ -84,21 +64,27 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
end
end)
self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat and 1 or 0
--处理win_seat
local temp_win_seat = {}
for i,v in ipairs(win_seat) do
temp_win_seat[v] = 1
end
win_seat = temp_win_seat
self._view:GetController('win').selectedIndex = win_seat[room.self_player.seat] and 1 or 0
local over0List = self._view:GetChild('list_over0')
over0List:SetVirtual()
table.sort(data,function(a,b)
return a.ranking < b.ranking
end)
over0List.itemRenderer = function(index, obj)
local info = data[index + 1]
local playerInfo = room:GetPlayerBySeat(info.seat)
obj:GetChild('name').text = playerInfo.self_user.nick_name
obj:GetChild('residue').text = #info.handCards
obj:GetChild('bomb').text = info.thisboomnum
obj:GetChild('cardScore').text = info.roundCardScore
obj:GetChild('bompScore').text = info.roundBonusScore
obj:GetChild('score').text = info.winscore > 0 and string.format("+%d", info.winscore) or info.winscore
obj:GetController('chuntian').selectedIndex = info.chuntian and 1 or 0
end
over0List.numItems = #data
-- self._root_runFast._ctr_inClear.selectedIndex = 1
if over == 1 or (over == 2 and room.curren_round > 0) then
local bigSeat = 0
@ -128,35 +114,35 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
end
local Btn_Share = self._view:GetChild('btn_shareRecord')
if Btn_Share then
Btn_Share.onClick:Set(function()
self:SaveRenderTextureToPNG()
end)
end
-- local Btn_Share = self._view:GetChild('btn_shareRecord')
-- if Btn_Share then
-- Btn_Share.onClick:Set(function()
-- self:SaveRenderTextureToPNG()
-- end)
-- end
local Btn_Copy = self._view:GetChild('btn_copyRecord')
if Btn_Copy then
Btn_Copy.onClick:Set(function()
local resultStr = ""
if room.group_id ~= 0 then
local group = DataManager.groups:get(room.group_id)
resultStr = string.format("【%s】俱乐部", group.name)
end
resultStr = string.format("%s%s\n", resultStr, room.game_info.name)
for i = 1, #data do
local info = data[i]
local playerInfo = room:GetPlayerBySeat(info.seat)
resultStr = string.format("%s%s\nID:%s【%s】\n", resultStr, playerInfo.self_user.nick_name,
playerInfo.self_user.account_id,
info.total_score)
end
resultStr = string.format("%s房号:%s 局数:%s/%s局\n结束时间:%s", resultStr, room.room_id, room.curren_round,
room.room_config.Times, os.date("%Y-%m-%d %H:%M:%S", os.time()))
ViewUtil.__openWx()
GameApplication.Instance:CopyToClipboard(resultStr)
end)
end
-- local Btn_Copy = self._view:GetChild('btn_copyRecord')
-- if Btn_Copy then
-- Btn_Copy.onClick:Set(function()
-- local resultStr = ""
-- if room.group_id ~= 0 then
-- local group = DataManager.groups:get(room.group_id)
-- resultStr = string.format("【%s】俱乐部", group.name)
-- end
-- resultStr = string.format("%s%s\n", resultStr, room.game_info.name)
-- for i = 1, #data do
-- local info = data[i]
-- local playerInfo = room:GetPlayerBySeat(info.seat)
-- resultStr = string.format("%s%s\nID:%s【%s】\n", resultStr, playerInfo.self_user.nick_name,
-- playerInfo.self_user.account_id,
-- info.total_score)
-- end
-- resultStr = string.format("%s房号:%s 局数:%s/%s局\n结束时间:%s", resultStr, room.room_id, room.curren_round,
-- room.room_config.Times, os.date("%Y-%m-%d %H:%M:%S", os.time()))
-- ViewUtil.__openWx()
-- GameApplication.Instance:CopyToClipboard(resultStr)
-- end)
-- end
end
function M:FillPlayerInfoEnd(view, info, playerInfo, bigWin)

View File

@ -146,7 +146,6 @@ function M:InitView(url)
self._view:GetChild('btn_ready_inClear').onClick:Set(function()
if self.result_view and self.result_view._view then
self._ctr_inClear.selectedIndex = 0
self.result_view:ClearReady()
else
self.result_view = nil
local _gamectr = ControllerManager.GetController(GameController)
@ -629,8 +628,7 @@ function M:EventInit()
-- end
coroutine.wait(2)
self.result_view = EXResultView.new(self, info, self._room.room_id, over, win_seat, 0,
remaincards)
self.result_view = EXResultView.new(self, info, over, win_seat)
self._ctr_inClear.selectedIndex = 0
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
@ -695,7 +693,7 @@ function M:EventInit()
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
end
self.result_view = EXResultView.new(self, info, self._room.room_id, over, winseat, dissolve, nil)
self.result_view = EXResultView.new(self, info, over, winseat)
self.result_view:Show()
ControllerManager.ChangeController(LoddyController)
self:UnmarkSelfTuoguan()

View File

@ -0,0 +1,783 @@
local CardCheck = {
cardList = {},
cardListSord = {},
cardNum = 0,
cardSize = 0,
long = false,
planeNoBelt = false,
threeNoBelt = false,
planelack = false,
threelack = false,
fourDaiThree = false,
fristCard = true,
haveRuleCard = false,
tipCardList = {},
touchCardSet = {},
touchCardMao = {}
}
local CardType = {
one = 1,
long = 2,
dui = 3,
duiLong = 10,
threeAndTwo = 4,
normolPlant = 5,
zha = 6,
onlyThree = 7,
onlyPlant = 8,
zhaAndThreee = 9,
lessThree = 11,
lessPlant = 12
}
local M = CardCheck
function M:InitFlag()
local config = DataManager.CurrenRoom.room_config.config
self.planeNoBelt = config.planeNoBelt == 1
self.threeNoBelt = config.threeNoBelt == 1
self.planelack = config.planelack == 1
self.threelack = config.threelack == 1
self.fourDaiThree = config.fourDaiThree
self.rule = config.rule
self._flag_fristCard = true
print("==============================lingmengcheckinitFlag")
pt(config)
pt(self)
return self
end
function M:InitLastCard(cardList, mustPutMaxCard)
self._flag_fristCard = false
self:Clear()
self._flag_mustMax = mustPutMaxCard
self.type = 0
self.specilCard = {}
self.lastCardNum = #cardList
self._flag_allCards = false
self._flag_checkLst = true
if #cardList == 0 then
self._flag_fristCard = true
return
end
table.sort(cardList)
pt(cardList)
self.lastMinCard = math.floor(cardList[1] / 10)
local temp_long = 0
for i = 1, #cardList do
local number = math.floor(cardList[i] / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
if math.abs(math.floor(cardList[i - 1] / 10) - number) == 1 then
temp_long = i
end
end
end
self.long = temp_long == self.cardNum and self.cardNum >= 5
print("lingmengCheckAloneOrLong2")
if self:CheckAloneOrLong() then
self.type = self:CheckAloneOrLong()
return
end
print("lingmengCheckDuiZi2")
if self:CheckDuiZi() then
self.type = self:CheckDuiZi()
return
end
print("lingmengCheckSanDai2")
if self:CheckSanDai() then
local a, b, c = self:CheckSanDai()
self.type = a
if b then
self.specilCard = b
end
if c then
self.lastMinCard = c
end
return
end
print("lingmengCheckZha2")
if self:CheckZha() then
local a, b, c = self:CheckZha()
self.type = a
if b then
self.specilCard = b
end
if c then
self.lastMinCard = c
end
return
end
if self.type == 0 then
-- ViewUtil.ErrorTip(-1, "上一份牌型判断错误")
end
end
function M:initCards(cardList, data)
print("lingmenginitCards")
pt(cardList)
local temp_long = 0
data = data or {}
self:Clear()
self._flag_allCards = data.flag_allCards or false
self._flag_ruleCard = data.flag_ruleCard or false
if data.flag then
for i = 1, #cardList do
if cardList[i].card_code_number == 34 then
self.haveRuleCard = true
end
local number = math.floor(cardList[i][1].card_code_number / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
if math.abs(math.floor(cardList[i - 1][1].card_code_number / 10) - number) == 1 then
temp_long = i
end
end
end
else
for i = 1, #cardList do
if cardList[i].card_code_number == 34 then
self.haveRuleCard = true
end
local number = math.floor(cardList[i].card_code_number / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
if math.abs(math.floor(cardList[i - 1].card_code_number / 10) - number) == 1 then
temp_long = i
end
end
end
end
print(self.cardNum, self.cardSize, temp_long)
pt(self.cardList)
self.long = temp_long == self.cardNum and self.cardNum >= 5
end
function M:CheckCards()
if self.cardNum ~= 4 and self.cardNum ~= self.lastCardNum and not self._flag_fristCard then
return
end
if self.cardNum == 1 and self._flag_mustMax and self.maxCard ~= self.cardListSord[1] then
return
end
if self.cardNum == 0 then
return
end
if self.rule == 1 and self._flag_ruleCard and DataManager.CurrenRoom.curren_round == 1 and not self.haveRuleCard then
return
end
print("lingmeng self.lastMinCard", self.lastMinCard)
print("lingmengCheckAloneOrLong")
if self:CheckAloneOrLong() then
return true
end
print("lingmengCheckDuiZi")
if self:CheckDuiZi() then
return true
end
print("lingmengCheckSanDai")
if self:CheckSanDai() then
if self._flag_fristCard then
return true
end
local a, b, c = self:CheckSanDai()
self.type = a
if b then
self.specilCard = b
end
if c then
return c > (self.lastMinCard or 0)
end
return true
end
print("lingmengCheckZha")
if self:CheckZha() then
return true
end
return false
end
function M:CheckOutCard(cardList)
print("lingmengCheckOutCard===============")
pt(cardList)
self.tipCardList = {}
self.touchCardSet = {}
self.touchCardMao = {}
local cardMap = {}
local cardSet = {}
local temp_long = 0
local temp_longList = {}
local longList = {}
local lastCard = -1
local flag_threeOrFour = false
for i = 1, #cardList do
local number = math.floor(cardList[i].card_code_number / 10)
if cardMap[number] then
cardMap[number].value = cardMap[number].value + 1
table.insert(cardMap[number].cardList, cardList[i])
else
cardMap[number] = {}
cardMap[number].value = 1
cardMap[number].cardList = {}
table.insert(cardMap[number].cardList, cardList[i])
table.insert(cardSet, number)
end
if cardMap[number].value >= 3 then
flag_threeOrFour = true
end
if lastCard ~= number then
if lastCard - number ~= 1 then
if temp_long >= 5 then
table.insert(longList, temp_longList)
end
temp_long = 1
temp_longList = {}
else
temp_long = temp_long + 1
end
lastCard = number
table.insert(temp_longList, number)
end
end
if temp_long >= 4 then
table.insert(longList, temp_longList)
end
table.sort(cardSet)
self.maxCard = cardSet[#cardSet]
if self._flag_fristCard then
if self._flag_mustMax then
self:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList)
else
self:CheckOutCardGetFristTipList(cardSet, cardMap)
end
return
end
local cardType, only, longLength = self:CheckOutCardGetType()
local tipCardSet = self:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
self:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
if cardType >= 3 and only == 0 then
self:CheckOutCardGetAllCardSetAndMap()
end
end
function M:CheckOutCardGetAllCardSetAndMap()
self.touchCardSet = {}
self.touchCardMao = {}
for i = 3, 15 do
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
end
function M:CheckOutCardGetFristTipList(cardSet, cardMap)
for i = 1, #cardSet do
local card = cardSet[i]
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
local temp = {}
table.insert(temp, cardMap[card].cardList[1])
table.insert(self.tipCardList, temp)
end
end
function M:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList)
if flag_threeOrFour then
for i = 3, 15 do
if cardMap[i] then
if i == cardSet[#cardSet] then
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
table.insert(self.tipCardList, cardMap[i].cardList)
elseif cardMap[i].value >= 2 then
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
table.insert(self.tipCardList, cardMap[i].cardList)
else
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
else
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
end
else
for i = 1, #cardSet do
local card = cardSet[i]
if i == #cardSet then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
table.insert(self.tipCardList, cardMap[card].cardList)
elseif cardMap[card].value >= 2 then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
table.insert(self.tipCardList, cardMap[card].cardList)
end
end
end
---单数顺另外添加到提示和现实
for i = 1, #longList do
local tempTipList = {}
for j = 1, #longList[i] do
local card = longList[i][j]
if not self.touchCardMao[card] then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
end
table.insert(tempTipList, cardMap[card].cardList[1])
end
table.insert(self.tipCardList, tempTipList)
end
end
function M:CheckOutCardGetType()
local cardType = 0
local only = 0
local longLength = 1
if self.type == 0 then
return cardType, only, longLength
end
if self.type == CardType.one or self.type == CardType.long then
cardType = 1
if self.type == CardType.long then
longLength = self.lastCardNum
end
elseif self.type == CardType.dui or self.type == CardType.duiLong then
cardType = 2
if self.lastCardNum > 2 then
longLength = self.lastCardNum / 2
end
elseif self.type == CardType.threeAndTwo or self.type == CardType.onlyThree or self.type == CardType.lessThree or self.type == CardType.normolPlant or self.type == CardType.onlyPlant or self.type == CardType.lessPlant then
cardType = 3
if self.type == CardType.onlyThree or self.type == CardType.onlyPlant then
only = 1
if self.type == CardType.onlyPlant then
longLength = self.lastCardNum / 3
end
end
if self.type == CardType.normolPlant then
longLength = self.lastCardNum / 5
end
elseif self.type == CardType.zha or self.type == CardType.zhaAndThreee then
cardType = 4
if self.type == CardType.zha then
only = 1
end
end
return cardType, only, longLength
end
function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
print("lingmengCheckOutCardGetTouchSet", cardType, longLength, self.lastMinCard)
pt(cardSet)
pt(cardMap)
local tempLong = 0
local lastCard = 0
local tempCardSet = {}
local tipCardSet = {}
local ZhaCardList = {}
for i = 1, #cardSet do
local card = cardSet[i]
if cardMap[card].value >= cardType and card > self.lastMinCard and cardMap[card].value ~= 4 then
if tempLong == 0 then
tempLong = 1
else
if lastCard - card == -1 then
tempLong = tempLong + 1
else
if tempLong >= longLength and (cardType ~= 1 or longLength >= 5 or not self._flag_mustMax) then
for j = 1, tempLong do
table.insert(self.touchCardSet, tempCardSet[j])
self.touchCardMao[tempCardSet[j]] = 1
end
end
table.insert(tipCardSet, tempCardSet)
tempLong = 1
tempCardSet = {}
end
end
table.insert(tempCardSet, card)
lastCard = card
end
if cardMap[card].value == 4 then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
table.insert(ZhaCardList, card)
end
end
if tempLong >= longLength then
for j = 1, tempLong do
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or j == tempLong then
table.insert(self.touchCardSet, tempCardSet[j])
self.touchCardMao[tempCardSet[j]] = 1
end
end
end
table.insert(tipCardSet, tempCardSet)
for i = 1, #ZhaCardList do
table.insert(tipCardSet, ZhaCardList[i])
end
return tipCardSet
end
function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
print("lingmengCheckOutCardSetTipList", longLength, cardMap, cardType)
pt(tipCardSet)
for i = 1, #tipCardSet do
if type(tipCardSet[i]) == 'number' then
table.insert(self.tipCardList, cardMap[tipCardSet[i]].cardList)
else
local tipCardSetLen = #tipCardSet[i]
if tipCardSetLen == longLength then
local tempList = {}
local tempSanDaiCard = {}
for j = 1, tipCardSetLen do
local card = tipCardSet[i][j]
tempSanDaiCard[card] = true
local minNum = Mathf.Min(cardMap[card].value, cardType)
for k = 1, minNum do
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then
table.insert(tempList, cardMap[card].cardList[k])
end
end
end
if #tempList > 0 then
if self.type == 4 or self.type == 5 then
local removeSanDaiList = {}
for k, v in pairs(cardMap) do
if not tempSanDaiCard[k] then
for i, v1 in ipairs(v.cardList) do
table.insert(removeSanDaiList, v1)
end
end
end
if #removeSanDaiList <= longLength * 2 then
table.insert(self.tipCardList, tempList)
else
self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList)
end
else
table.insert(self.tipCardList, tempList)
end
end
else
for j = 1, tipCardSetLen do
if j + longLength - 1 <= tipCardSetLen then
local tempList = {}
local tempSanDaiCard = {}
for k = j, j + longLength - 1 do
local card = tipCardSet[i][k]
tempSanDaiCard[card] = true
local minNum = Mathf.Min(cardMap[card].value, cardType)
for l = 1, minNum do
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then
table.insert(tempList, cardMap[card].cardList[l])
end
end
end
if #tempList > 0 then
if self.type == 4 or self.type == 5 then
local removeSanDaiList = {}
for k, v in pairs(cardMap) do
if not tempSanDaiCard[k] then
for i, v1 in ipairs(v.cardList) do
table.insert(removeSanDaiList, v1)
end
end
end
if #removeSanDaiList <= longLength * 2 then
table.insert(self.tipCardList, tempList)
else
self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList)
end
else
table.insert(self.tipCardList, tempList)
end
end
end
end
end
end
end
end
function M:GetSanDaiTips(tempList, childNum, cardList)
local childIndex = {}
local cardLen = #cardList
for i = 1, childNum do
childIndex[i] = i
end
while childIndex[1] <= cardLen - childNum do
if childIndex[childNum] == cardLen then
for i = childNum - 1, 1, -1 do
if childIndex[i] ~= cardLen + i - childNum then
childIndex[i] = childIndex[i] + 1
for j = i + 1, childNum do
childIndex[j] = childIndex[j - 1] + 1
end
end
end
else
childIndex[childNum] = childIndex[childNum] + 1
end
local tempList_copy = {}
for i, v in ipairs(tempList) do
tempList_copy[i] = v
end
for i = 1, childNum do
table.insert(tempList_copy, cardList[childIndex[i]])
end
table.insert(self.tipCardList, tempList_copy)
end
end
function M:CheckAloneOrLong()
if self.cardNum == 1 and M:CheckType(CardType.one) then
return CardType.one
end
if self.long and M:CheckType(CardType.long) then
return CardType.long
end
end
function M:CheckDuiZi()
if self.cardNum == 2 and self.cardSize == 1 and M:CheckType(CardType.dui) then
return CardType.dui
end
if self.cardNum % 2 == 0 and M:CheckType(CardType.duiLong) then
local last_k
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 2 then
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
else
return
end
end
return CardType.duiLong
end
end
--三带有着不同比大小极致,需要返回是哪些牌三带和最小的三带牌
function M:CheckSanDai()
--三张
if self.cardNum == 5 and M:CheckType(CardType.threeAndTwo) then
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
return CardType.threeAndTwo, { k }, k
end
end
end
if self.threelack and self.cardNum == 4 and self.cardSize == 2 and M:CheckType(CardType.lessThree) then
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
return CardType.lessThree, { k }, k
end
end
return CardType.lessThree
end
if self.threeNoBelt and self.cardNum == 3 and self.cardSize == 1 and M:CheckType(CardType.onlyThree) then
return CardType.onlyThree
end
--飞机
local temp_normol_feiji
if self.cardNum % 5 == 0 then
temp_normol_feiji = self.cardNum / 5
end
if temp_normol_feiji and M:CheckType(CardType.normolPlant) then
local last_k
local key_table = {}
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
table.insert(key_table, k)
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
end
end
if #key_table >= temp_normol_feiji then
return CardType.normolPlant, key_table, key_table[1]
else
return
end
end
print("liengmengCheckthreelack", self.threelack, self._flag_allCards)
if self.threelack and M:CheckType(CardType.lessPlant) then
local last_k
local key_table = {}
local num_four = 0
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
if v == 4 then
num_four = 1
end
table.insert(key_table, k)
print("liengmengCheckthreelack2", last_k, k)
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
end
end
print("liengmengCheckthreelack4", #key_table, self.cardNum - #key_table * 3 < #key_table * 2)
if self.cardNum - #key_table * 3 < #key_table * 2 and not (self.cardNum == 4 and num_four == 1) then
return CardType.lessPlant, key_table, key_table[1]
else
return
end
end
print("liengmengCheckplaneNoBelt", self.planeNoBelt, self.cardNum % 3)
if self.planeNoBelt and self.cardNum % 3 == 0 and M:CheckType(CardType.onlyPlant) then
local last_k
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 3 then
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
else
return
end
end
return CardType.onlyPlant
end
end
function M:CheckZha()
if self.cardNum == 4 and self.cardSize == 1 then
return CardType.zha
end
if self.fourDaiThree and self.cardNum == 7 and M:CheckType(CardType.zhaAndThreee) then
local flag_four
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 4 then
return CardType.zhaAndThreee, { k }, k
end
end
return
end
end
function M:CheckType(type)
if type == CardType.duiLong then
return self._flag_checkLst or self._flag_fristCard or (type == self.type and self.cardNum == self.lastCardNum)
elseif type == CardType.lessPlant or type == CardType.lessThree then
return self._flag_checkLst or (self._flag_fristCard and self._flag_allCards) or type == self.type
else
return self._flag_checkLst or self._flag_fristCard or type == self.type
end
end
function M:GetTipsList()
return self.tipCardList
end
function M:GetTouchSet()
return self.touchCardSet
end
function M:GetTouchCardMap()
return self.touchCardMao
end
function M:Clear()
self.cardList = {}
self.cardListSord = {}
self.cardNum = 0
self.cardSize = 0
self.long = false
self._flag_checkLst = false
self.haveRuleCard = false
end
return M

View File

@ -0,0 +1,24 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/18 11:30
---
local EXCardType = {
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 EXCardType

View File

@ -0,0 +1,768 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 11:28
---
local EXProtocol = import(".EXProtocol")
local EXGameEvent = import(".EXGameEvent")
local EXCardType = import(".EXCardType")
local EXPutError = {
"必须先出最小的牌",
"出牌不符合规定牌型 ",
"下家报单,请出最大的牌 ",
"炸弹不能拆"
}
local EXGameController = {}
local M = EXGameController
function M.new()
setmetatable(M, { __index = GameController })
local self = setmetatable({}, { __index = M })
self:init("跑得快")
self.class = "EXGameController"
return self
end
function M:init(name)
GameController.init(self, name)
self:RegisterEvt()
end
-- 事件注册
function M:RegisterEvt()
self._eventmap[EXProtocol.EXMing_Card] = self.OnMingCard
self._eventmap[EXProtocol.EXInit_Card] = self.OnInitCard
self._eventmap[EXProtocol.EXOptions] = self.OnOptions
self._eventmap[EXProtocol.EXJiaofen] = self.OnJiaofen
self._eventmap[EXProtocol.EXIndex_Move] = self.OnIndexMove
self._eventmap[EXProtocol.EXPlay_Succ] = self.OnPlaySucc
self._eventmap[EXProtocol.EXPut_Error] = self.OnPutError
self._eventmap[EXProtocol.EXPass_Succ] = self.OnPassSucc
self._eventmap[EXProtocol.EXResult] = self.OnResult
self._eventmap[EXProtocol.EXBomb_Score] = self.OnBombScore
self._eventmap[EXProtocol.EXPiao_Tip] = self.OnPiaoTip
self._eventmap[EXProtocol.EXPiao_Action] = self.OnPiaoAction
self._eventmap[EXProtocol.EXConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc
--self._eventmap[EXProtocol.EXOener] = self.Oener
-- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter
self._eventmap[EXProtocol.PT_GAMETUOGUAN] = self.Game_TuoGuan
self._eventmap[EXProtocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
self._eventmap[EXProtocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
self._eventmap[EXProtocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard
self._eventmap[EXProtocol.EXBomb_Score_New] = self.OnBompScoreNew
self._eventmap[EXProtocol.EXCheckCard_Succ] = self.OnCheckCard
end
-- function M:Oener(evt_data)
-- local seat = evt_data["owner"]
-- self._cacheEvent:Enqueue(function()
-- DispatchEvent(self._dispatcher,EXGameEvent.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(EXProtocol.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, EXGameEvent.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(EXProtocol.EXSend_Card, _data)
end
function M:SendCheckCard()
local _data = {}
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXCheckCard, _data)
end
function M:SendCheckCardSend(data)
local _data = {}
_data = data
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXCheckCard_Send, _data)
end
function M:SendPiao(piao)
local _data = {}
_data["id"] = piao
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXSend_Piao, _data)
end
function M:SendPass()
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXSend_Guo)
end
function M:SendInitCardEnd()
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXInit_Card_End)
end
function M:ConformToNextGame()
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXConfirmToNextGame)
end
function M:SendJiaofen(score)
local _data = {}
_data.callScore = score
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.EXJiaofen_Send, _data)
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, EXGameEvent.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"]
local bank_seat = evt_data["bank_seat"]
self._cacheEvent:Enqueue(
function()
for _, player in ipairs(self._room.player_list) do
player:Clear()
player.hand_count = #cardlist
player.hand_list = cardlist
end
self._room.curren_round = round
self._room.banker_seat = bank_seat
DispatchEvent(self._dispatcher, EXGameEvent.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, EXGameEvent.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
-- if remain ~= 0 then
self._cardCheck:InitLastCard(out_card_list)
-- end
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, EXGameEvent.OnPlaySucc, player, remain, card_type, number, otherList,
length, out_card_list)
end
)
end
function M:OnPlaySuccCheckHandCard(evt_data)
local seat = evt_data["player"]
local cards = evt_data["handCards"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.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, EXGameEvent.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, EXGameEvent.OnErrorTip, error_str)
end
)
end
function M:TuoGuan(isTuo)
local _data = {}
_data["tuoguan"] = isTuo
local _client = ControllerManager.GameNetClinet
_client:send(EXProtocol.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, EXGameEvent.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, EXGameEvent.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, EXGameEvent.OnOptions, play, cardType, cardNum, cardLength, pass,
lastCardList)
end
)
end
function M:OnJiaofen(evt_data)
local seat = evt_data["seat"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.OnJiaofen, seat)
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, EXGameEvent.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, EXGameEvent.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"])
print("lingmeng log200", info[i]["score"], p.total_score)
info[i].card_score = info[i]["score"] - p.total_score
p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user
end
DispatchEvent(self._dispatcher, EXGameEvent.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"])
print("lingmeng log200", info[i]["score"], p.total_score)
info[i].card_score = info[i]["score"] - p.total_score
p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user
end
DispatchEvent(self._dispatcher, EXGameEvent.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, EXGameEvent.OnResultByDissolve, result_type, info, winseat, dissolve)
end
end
function M:OnConfrimToNextGameSucc(evt_data)
local aid = evt_data["aid"]
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.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, EXGameEvent.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 EXPutError[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 = EXCardType.None, 0, #cardlist, 0
local card_map = self:GetCardMapByList(cardlist)
if #cardlist == 1 then
card_type = EXCardType.OneCard
card_num = math.floor(cardlist[1] / 10)
elseif #cardlist == 2 then
card_type = EXCardType.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 = EXCardType.Bomb
else
card_type = EXCardType.Three
end
elseif #cardlist == 4 then
local max_key = 0
for k, v in pairs(card_map) do
if #v == 4 then
card_type = EXCardType.Bomb
card_num = k
elseif #v == 3 then
card_type = EXCardType.ThreeAndOne
card_num = k
elseif #v == 2 then
if k > max_key then
max_key = k
end
card_type = EXCardType.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 = EXCardType.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 = EXCardType.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 = EXCardType.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 = EXCardType.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 = EXCardType.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 = EXCardType.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 = EXCardType.PlaneAndTwo
-- card_num = max_three_key
-- elseif three_count * 4 >= #cardlist then
-- card_type = EXCardType.PlaneAndOne
-- card_num = max_three_key
-- elseif three_count * 3 >= #cardlist then
-- card_type = EXCardType.Plane
-- card_num = max_three_key
-- end
plan_three_count = three_count
if three_count * 3 == #cardlist then
card_type = EXCardType.Plane
card_num = max_three_key
elseif three_count * 4 >= #cardlist and #cardlist % 4 == 0 then
card_type = EXCardType.PlaneAndOne
card_num = max_three_key
elseif three_count * 5 >= #cardlist and #cardlist % 5 == 0 then
card_type = EXCardType.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
--炸弹分显示,新协议
function M:OnBompScoreNew(evt_data)
local scoreList = evt_data["PlayerScoreList"]
self._cacheEvent:Enqueue(
function()
for i = 1, #scoreList do
local score = scoreList[i].pomSore
local player = self._room:GetPlayerBySeat(scoreList[i].seat)
player.total_score = player.total_score + score
end
DispatchEvent(self._dispatcher, EXGameEvent.OnBompScoreNew, scoreList)
end
)
end
function M:OnCheckCard(evt_data)
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.OnCheckCard, evt_data)
end
)
end
return M

View File

@ -0,0 +1,26 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:55
---
local EXGameEvent = {
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",
OnBompScoreNew = "OnBompScoreNew",
OnCheckCard = "OnCheckCard",
OnJiaofen = "OnJiaofen"
}
return EXGameEvent

View File

@ -0,0 +1,396 @@
---
--- 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/sandaha/ui/Info_Poker_SanDaHa")
return self
end
function M:FillData(view, index)
self._maxPlayer = 2 -- 默认玩家人数
self._roundChoice = 5 -- 回合选项数
-- if oldGameVersion == 1 then
-- self._config = UIPackage.CreateObjectFromURL(self:GetPageURL())
local com_editSetting = self._config:GetChild("com_editSetting")
com_editSetting:GetController("cGps").selectedIndex = 2
local ctr_round = self._config:GetController("round")
if ctr_round.selectedIndex == 0 then
com_editSetting:GetController("oneRound").selectedIndex = 1
else
com_editSetting:GetController("oneRound").selectedIndex = 0
end
self._config:GetController("round").onChanged:Set(function()
if ctr_round.selectedIndex == 0 then
com_editSetting:GetController("oneRound").selectedIndex = 1
else
com_editSetting:GetController("oneRound").selectedIndex = 0
end
end)
-- else
-- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SanDaHa/Creat_EXyueyang")
-- 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_SanDaHa/Com_help"
function M:GetHelpUrl()
return _help_url
end
local _icon_url = "ui://Info_Poker_SanDaHa/icon"
function M:GetIconUrl()
return "ui://Lobby/paodekuai2", "ui://Lobby/paodekuai1"
end
local _icon_url1 = "ui://Info_Poker_SanDaHa/icon1"
function M:GetIconUrl1()
return _icon_url1
end
function M:GetPageURL()
return "ui://Info_Poker_SanDaHa/Label_Detail_Play"
end
local _play_list = { "15张玩法", "16张玩法" }
function M:GetPlayList()
return _play_list
end
function M:LoadConfigData(data)
local _config = self._config
pt(data)
_config:GetController("round").selectedIndex = data.opt - 1
_config:GetController("handcard").selectedIndex = 2 - data.leaf
_config:GetController("peopleNum").selectedIndex = 3 - data.maxPlayers
_config:GetController("showCardNum").selectedIndex = 1 - data.showlength
_config:GetController("wanfa1_1").selectedIndex = data.planeNoBelt
_config:GetController("wanfa1_2").selectedIndex = data.planelack
_config:GetController("wanfa1_3").selectedIndex = data.fourDaiThree and 1 or 0
_config:GetController("wanfa1_4").selectedIndex = data.heartten - 1
_config:GetController("wanfa1_5").selectedIndex = 2 - data.rule
_config:GetController("wanfa2_1").selectedIndex = data.specilAdd
-- 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 4 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, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
local returnString = ""
if hpData then
returnString = string.format("%s倍,", hpData.times / 1000)
end
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
if hpData then
returnString = string.format("%s %s局", returnString, hpData.maxRound)
end
if configData.leaf then
returnString = string.format("%s,%s", returnString, configData.leaf == 1 and "15张手牌" or "16张手牌")
end
if configData.showlength then
returnString = string.format("%s,%s", returnString, configData.showlength == 0 and "不显示牌数" or "显示牌数")
end
if configData.planeNoBelt and configData.threeNoBelt then
if configData.planeNoBelt == 0 and configData.threeNoBelt == 0 then
returnString = string.format("%s,%s", returnString, "三张、飞机必带")
elseif configData.planeNoBelt == 0 then
returnString = string.format("%s,%s", returnString, "三张必带、飞机可不带")
elseif configData.threeNoBelt == 0 then
returnString = string.format("%s,%s", returnString, "三张可不带、飞机必带")
else
returnString = string.format("%s,%s", returnString, "三张、飞机可不带")
end
else
if configData.planeNoBelt then
returnString = string.format("%s%s", returnString, configData.planeNoBelt == 0 and "" or ",飞机可不带")
end
if configData.threeNoBelt then
returnString = string.format("%s%s", returnString, configData.threeNoBelt == 0 and "" or ",三张可不带")
end
end
if configData.planelack and configData.threelack then
if configData.planelack == 0 and configData.threelack == 0 then
returnString = string.format("%s,%s", returnString, "三张、飞机不可少带接完")
elseif configData.planelack == 0 then
returnString = string.format("%s,%s", returnString, "三张不可少带接完、飞机可少带接完")
elseif configData.threelack == 0 then
returnString = string.format("%s,%s", returnString, "三张可少带接完、飞机不可少带接完")
else
returnString = string.format("%s,%s", returnString, "三张、飞机可少带接完")
end
else
if configData.planelack then
returnString = string.format("%s%s", returnString, configData.planelack == 0 and "" or ",飞机可少带")
end
if configData.threelack then
returnString = string.format("%s%s", returnString, configData.threelack == 0 and "" or ",三张可少带")
end
end
if configData.fourDaiThree then
returnString = string.format("%s%s", returnString, configData.fourDaiThree and ",四带三" or "")
end
if configData.heartten then
returnString = string.format("%s%s", returnString, configData.heartten == 1 and "" or ",红桃10扎鸟")
end
if configData.rule then
returnString = string.format("%s%s", returnString,
configData.rule == 1 and ",首局黑桃三必出" or "")
end
if configData.specilAdd then
returnString = string.format("%s%s", returnString, configData.specilAdd == 0 and "" or ",只出一张加扣10分出2-3张加扣5分")
end
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end
return M

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 EXPlayer = {
-- 手牌列表
hand_count = 0,
out_card_list = {},
hand_list = {},
isOneCard= false, -- 报单
}
local M = EXPlayer
--- 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,584 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/25 13:52
---
local PKPlayBackView = require('main.poker.PKPlayBackView')
local EXPlayerCardInfoView = import('.EXPlayerPokerInfoView')
local EXPlayerSelfCardInfoView = import('.EXPlayerSelfPokerInfoView')
local PlayerInfoView = import('.EXPlayerInfoView')
local EXRightPanelView = import(".EXRightPanelView")
local EXResultView = import(".EXResultView")
local EXCardCheck = import(".CardCheck")
local M = {}
local EXRecord_Event = {
Evt_OutCard = 'OutCard',
Evt_Pass = 'pass',
Evt_NewRound = 'newindex',
Evt_result = 'result',
Evt_Result = 'Result',
Evt_Opt = 'prompt'
}
local default_bg = 1
local bg_config = {
{ id = 1, url = 'extend/poker/sandaha/bg/bg1', thumb = 'ui://Extend_Poker_SanDaHa/table_bg1' },
{ id = 2, url = 'extend/poker/sandaha/bg/bg2', thumb = 'ui://Extend_Poker_SanDaHa/table_bg2' },
{ id = 3, url = 'extend/poker/sandaha/bg/bg3', thumb = 'ui://Extend_Poker_SanDaHa/table_bg3' }
}
--- Create a new
function M.new()
setmetatable(M, { __index = PKPlayBackView })
local self = setmetatable({}, { __index = M })
self.class = 'EXPlayBackView'
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/sandaha/ui/Extend_Poker_SanDaHa')
PKPlayBackView.InitView(self, "ui://Extend_Poker_SanDaHa/EXNew_" .. 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 = EXRightPanelView.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._ctr_inClear = self._view:GetController('Inclear')
self._cardCheck = EXCardCheck:InitFlag()
self._gamectr._cardCheck = self._cardCheck
self._eventmap = {}
self._cmdmap = {}
self._cmdmap[EXRecord_Event.Evt_OutCard] = self.CmdOutCard
self._cmdmap[EXRecord_Event.Evt_Pass] = self.CmdPass
self._cmdmap[EXRecord_Event.Evt_NewRound] = self.CmdNewRound
self._cmdmap[EXRecord_Event.Evt_result] = self.Cmdresult
self._cmdmap[EXRecord_Event.Evt_Opt] = self.CmdOpt
end
function M:NewPlayerPokerInfoView(view, index)
if index == 1 then
return EXPlayerSelfCardInfoView.new(view, self)
end
return EXPlayerCardInfoView.new(view, self)
end
function M:FillRoomData(data)
-- print("hidezhanji 1111")
self._currentStep = 1
local room = DataManager.CurrenRoom
self._room = DataManager.CurrenRoom
local _player_card_info = self._player_card_info
local roominfo_panel = self._view:GetChild('roominfo_panel1')
self._room.pai = 0
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_jifen').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._room.curren_round)
self:GenerateAllStepData(data)
self:ShowStep(1)
self:Play()
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
--开始时,隐藏显示结算界面
if state then
if self.destory_win ~= nil then
coroutine.stop(self.destory_win)
end
self.destory_win = nil
if self.result_view then
self.result_view._root_view:RemoveFromParent()
self.result_view:Destroy()
self._ctr_inClear.selectedIndex = 0
end
self.result_view = nil
end
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 step.cmd == EXRecord_Event.Evt_Opt and step.seat == p.seat then
info._view:GetController('out_card_option2').selectedIndex = 1
else
info._view:GetController('out_card_option2').selectedIndex = 0
end
if p.seat ~= self._room.self_player.seat then
info:UpdateHandPoker(p.hand_list, false, true)
else
info:InitPoker(p.hand_list, false)
end
info:SetOutCardInfo(nil, false)
end
if step.cmd == EXRecord_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)
self._cardCheck:InitLastCard(card_list)
self:_Effect(self._cardCheck.type, p)
self:PlaySound(p.self_user.sex,
self:GetSoundFileName(self._cardCheck.type, num, self:GetIsNewBout(seat)
))
end
if step.cmd == EXRecord_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 == EXRecord_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 == EXRecord_Event.Evt_result then
local data = step.data
local over = 0
local info = data.win.info
local win_seat = data.win.winseat
local remaincards = {}
-- local energyTab = arg[5]
local otherpoker_list = self._view:GetChild("otherpoker_list")
local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)]
if self.dismissWin ~= nil then
self.dismissWin:Destroy()
end
self.dismissWin = nil
if self.MypokerList ~= nil then
-- body
card_info:Clear()
card_info:InitPoker(self.MypokerList, false)
self.MypokerList = nil
end
if otherpoker_list ~= nil then
-- body
otherpoker_list:RemoveChildrenToPool()
otherpoker_list.visible = true
end
if self.destory_win ~= nil then
coroutine.stop(self.destory_win)
end
self.destory_win = nil
self.destory_win = coroutine.start(function()
if win_seat == self._room.self_player.seat then
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/end_music.mp3")
else
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/lose_music.mp3")
end
coroutine.stop(self._leftClock_continue)
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
self._left_time = 0
end
for i = 1, #info do
local player = info[i]
local p = self._room:GetPlayerBySeat(player.seat)
local head_info = self._player_info[self:GetPos(player.seat)]
head_info:SetBaoDan(false)
head_info._view:GetChild('text_jifen').text = player.score
head_info:PlayScore(player.winscore, win_seat == player.seat)
end
coroutine.wait(2)
self.result_view = EXResultView.new(self, info, self._room.room_id, over, win_seat, 0,
remaincards)
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info.ctr_outpoker.selectedIndex = 0
if card_info._ctr_resultOut then
card_info._ctr_resultOut.selectedIndex = 0
end
end
end)
self.result_view:Show()
self.result_view._root_view:RemoveFromParent()
self._view:AddChildAt(self.result_view._root_view,
self._view:GetChildIndex(self._view:GetChild('mask_tips')) - 1)
if self.WinItem_view ~= nil then
self.WinItem_view:Dispose()
self.WinItem_view = nil
end
if self.rank_view ~= nil then
self.rank_view:Dispose()
self.rank_view = nil
end
if self._room.self_player.entrust == true then
local btn_confirm = self.result_view._view:GetChild("btn_confirm")
btn_confirm.onClick:Call()
end
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/end_music.mp3")
end)
if over == 1 then
-- body
self:UnmarkSelfTuoguan()
ControllerManager.ChangeController(LoddyController)
end
end
if step.cmd == EXRecord_Event.Evt_Result then
local Result = step.Result
self.result_view = EXResultView.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.data = cmd.data
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:CmdOpt(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.seat = cmd.seat
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(round)
local total_round = self._room.room_config.Times
-- self._text_round.text = string.format("%d / %d 局", round, total_round)
if not self._text_currenRound then
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
end
if not self._text_maxRound then
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
end
self._text_currenRound.text = round
self._text_maxRound.text = string.format("/%s局", total_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:_Effect(type1, player)
if type1 == 1 or type1 == 3 or type1 == 7 then
self._popEvent = true
return
end
local info = self._player_card_info[self:GetPos(player.seat)]
info:PlayEffect(type1, function()
self._popEvent = true
end)
end
function M:GetSoundFileName(type, num, isNewBout)
local fileName
if type == 1 or type == 3 or type == 7 then
local num = self._cardCheck.lastMinCard
if type == 1 then
fileName = string.format("1_%d", num)
elseif type == 3 then
fileName = string.format("2_%d", num)
elseif type == 7 then
fileName = string.format("3_%d", num)
end
else
if not isNewBout and type ~= 6 then
local r = math.random(1, 3)
fileName = "dani_" .. r
else
if type == 8 or type == 12 then
fileName = 5
else
fileName = type
end
end
end
return fileName
end
function M:PlaySound(sex, path)
local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女
local sound_path = string.format("extend/poker/sandaha/sound/%s/%s.mp3", sex_path, path)
ViewUtil.PlaySound("SanDaHa_PK", sound_path)
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: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: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,70 @@
local PlayerInfoView = require("Game.View.PlayerInfoView2")
local M = {}
function M.new(view, mainView, flag_witness)
setmetatable(M, { __index = PlayerInfoView })
local self = setmetatable({}, { __index = M })
self._view = view
self._main_view = mainView
self:init(flag_witness)
return self
end
function M:init(flag_witness)
getmetatable(M).__index.init(self)
--互动表情的父类
self._hudon = self._view:GetChild('comp_hudon')
PlayerInfoView.init(self, flag_witness)
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:SetBaoDan(flag)
self._view:GetController('baodan').selectedIndex = flag and 1 or 0
end
function M:PlayScore(score)
if score >= 0 then
self._view:GetController('piaoWin').selectedIndex = 1
self._view:GetChild('text_piaoScoreAdd').text = "+" .. score
else
self._view:GetController('piaoWin').selectedIndex = 0
self._view:GetChild('text_piaoScoreLess').text = score
end
self._view:GetTransition('piaoScore'):Play(1, 0, function()
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,541 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 16:35
---
local EXPlayerPokerInfoView = {
_view = nil,
_mainView = nil,
_mask_liangpai = nil,
}
local M = EXPlayerPokerInfoView
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.hand_card_list = view:GetChild("list_backHand")
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')
self._view_resultOut = self._view:GetChild('list_resultOut')
self._ctr_resultOut = self._view:GetController('resultOut')
self._ctr_time_clock = self._view:GetController('time_clock')
self._view_comp_clock = self._view:GetChild('Comp_Clock')
--------------------------------------------------------------
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_SanDaHa", "poker7")
-- local code = self:ChangeCodeByTo(cardlist[i])
-- -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..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_RunFast/"..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_RunFast/"..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_SanDaHa/" .. code .. "_1")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. code)
-- end
-- else
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. 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("SanDaHa_PK", "extend/poker/sandaha/sound/chupai.mp3")
-- end)
-- else
-- for i = 1, #cardlist do
-- local poker_item = UIPackage.CreateObject("Extend_Poker_SanDaHa", "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_SanDaHa/" .. code .. "_1")
-- else
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. code)
-- end
-- else
-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- -- body
-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. 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("SanDaHa_PK", "extend/poker/sandaha/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_RunFast/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 card_number_code = self:ChangeOneCodeByFrom(cardList[i])
local btn_card = self.hand_card_list:AddItemFromPool()
self:FillPoker(btn_card, "", card_number_code)
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:PlayEffect(type, callback)
Timer.New(function()
local fristCard = self._view_Out:GetChildAt(0)
local lastCard = self._view_Out:GetChildAt(self._view_Out.numItems - 1)
local fristXy = self._view_Out:GlobalToLocal(fristCard:LocalToGlobal(Vector2.New(
fristCard.width * 0,
fristCard.height * 0.5)))
local lastXy = self._view_Out:GlobalToLocal(lastCard:LocalToGlobal(
Vector2.New(lastCard.width * 1,
lastCard.height * 0.5)))
local effect = ""
local y = 0
local x = 0
local width = 0
if type == 10 then
effect = "te_liandui"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
elseif type == 4 then
effect = "te_sandaidui"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
elseif type == 11 then
effect = "te_sandaidan"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
elseif type == 2 then
effect = "te_shunzi"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
width = (lastXy.x - fristXy.x) / 1.5
elseif type == 5 or type == 8 or type == 12 then
effect = "te_feiji"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
width = (lastXy.x - fristXy.x) / 1.5
elseif type == 6 then
effect = "te_zhadan"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
elseif type == 9 then
effect = "te_sidaisab"
y = self._view_Out.y + fristXy.y
x = self._view_Out.x + (lastXy.x + fristXy.x) / 2
end
if #effect > 0 then
local obj = UIPackage.CreateObjectFromURL(string.format("ui://Extend_Poker_SanDaHa/%s", effect))
obj.visible = false
self._view:AddChild(obj)
obj:SetScale(1.3, 1.3)
if y ~= 0 then
obj.y = y
end
if x ~= 0 then
obj.x = x
end
if width ~= 0 then
obj.width = width
end
obj.visible = true
if type == 2 then
obj:GetTransition('t0'):Play(1, 0, function()
obj:GetChild('n11'):TweenMoveX(width * 1.03, 0.3):OnComplete(function()
obj:Dispose()
callback()
end)
obj:GetChild('n12'):TweenMoveX(width * 1.03 - 121, 0.3)
obj:GetChild('n11'):TweenFade(0, 0.3)
obj:GetChild('n12'):TweenFade(0, 0.3)
end)
elseif type == 5 or type == 8 or type == 12 then
obj:GetTransition('t0'):Play(1, 0, function()
obj:GetChild('n13'):TweenMoveX(width * 0.7, 0.4):OnComplete(function()
obj:Dispose()
callback()
end)
obj:GetChild('n14'):TweenMoveX(width * 0.7 - 120, 0.4)
obj:GetChild('n13'):TweenFade(1, 0.2):OnComplete(function()
obj:GetChild('n13'):TweenFade(0, 0.4)
obj:GetChild('n14'):TweenFade(0, 0.4)
end)
end)
elseif type == 6 then
obj:GetTransition('t0'):Play(1, 0, function()
obj:Dispose()
end)
callback()
else
obj:GetTransition('t0'):Play(1, 0, function()
obj:Dispose()
callback()
end)
end
else
callback()
end
end, Time.deltaTime, 1, false):Start()
end
function M:ChangeOneCodeByFrom(card)
local flower = math.floor(card / 100)
local number = card % 100
if number == 2 then
number = 15
end
return number * 10 + flower
end
function M:FillPoker(poker, prefix, num, code)
if num ~= nil then
code = self:ChangeCodeByTo(num)
end
local suffix = code == 310 and
(DataManager.CurrenRoom.pai == 0 and (DataManager.CurrenRoom.room_config.Heart10 == 2 and "_1" or "") or "_2") or
""
code = code == 1 and "00" or code
if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Main_Poker/%s%s%s", prefix, code, suffix)
else
poker.icon = string.format("ui://Main_Poker/%s%s%s", prefix, code, suffix)
end
end
function M:CreatPoker1(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_SanDaHa", "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_SanDaHa/" .. code .. "_1")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. code)
end
else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. 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_SanDaHa", "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_SanDaHa/" .. code .. "_1")
else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. code)
end
else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanDaHa/" .. 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)
self._view_resultOut: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,51 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:51
---
local EXProtocol = {
EXConfirmToNextGame = "1003",
EXSend_Card = "1013",
EXSend_Guo = "1014",
EXSend_Piao = "1015",
EXMing_Card = "2117",
EXInit_Card = "2011",
EXOptions = "2004",
EXIndex_Move = "2016",
EXPlay_Succ = "2021",
EXPass_Succ = "2030",
EXPut_Error = "2111",
EXBomb_Score = "2118",
EXBomb_Score_New = "2110",
EXResult = "2007",
EXPiao_Tip = "2031",
EXPiao_Action = "2032",
EXConfirmToNextGameSucc = "2010",
PT_GAMETUOGUAN = "2029", --托管
SEND_TUOGUAN = "1018", --托管
GAME_XIPAI = "20836",
GAME_EVENT_XIPAI = "20837",
GAME_EVENT_NOTIFY_XIPAI = "20838",
GAME_EVT_CARDINHAND = "202022",
EXCheckCard = "8881",
EXCheckCard_Succ = "8882",
EXCheckCard_Send = "888",
EXJiaofen = "2005",
EXJiaofen_Send = "1016",
}
return EXProtocol

View File

@ -0,0 +1,199 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/19 11:05
---
require("Game.View.ResultView")
local EXResultView = {}
local M = EXResultView
function EXResultView.new(root, data, roomid, over, win_seat, dissolve, remaincards)
setmetatable(M, { __index = ResultView })
local self = setmetatable({}, { __index = M })
self.class = "EXResultView"
self._currenIndex = 0
self._close_zone = false
self._root_runFast = root
self._gamectr = ControllerManager.GetController(GameController)
self:init("ui://Extend_Poker_SanDaHa/clearing_new", data, roomid, over, win_seat, dissolve, remaincards)
print("=======================lingmengresult", 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)
local room = DataManager.CurrenRoom
self._view:GetController('over').selectedIndex = 0
if over == 2 and room.curren_round <= 0 then
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewManager.ChangeView(ViewManager.View_Family)
end
end
------------------
--只有一人直接退,有两人才进正常结算
if not over and #data == 1 then
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewManager.ChangeView(ViewManager.View_Family)
end
end
self._view:GetChild('btn_over1Close').onClick:Set(function()
if over == 0 then
self:Close()
else
self._view:GetController('over').selectedIndex = 1
end
end)
self._view:GetChild('btn_nextRound').onClick:Set(function()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
self._root_runFast._ctr_inClear.selectedIndex = 0
self:Destroy()
else
self._view:GetController('over').selectedIndex = 1
end
end)
self.ClearReady = function()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
self._root_runFast:ClearOk()
self:Destroy()
else
self._view:GetController('over').selectedIndex = 1
end
end
self._view:GetChild('btn_closeRound').onClick:Set(function()
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewManager.ChangeView(ViewManager.View_Family)
end
end)
self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat and 1 or 0
local over0List = self._view:GetChild('list_over0')
over0List:SetVirtual()
over0List.itemRenderer = function(index, obj)
local info = data[index + 1]
local playerInfo = room:GetPlayerBySeat(info.seat)
obj:GetChild('name').text = playerInfo.self_user.nick_name
obj:GetChild('residue').text = #info.handCards
obj:GetChild('bomb').text = info.thisboomnum
obj:GetChild('score').text = info.winscore > 0 and string.format("+%d", info.winscore) or info.winscore
obj:GetController('chuntian').selectedIndex = info.chuntian and 1 or 0
end
over0List.numItems = #data
self._root_runFast._ctr_inClear.selectedIndex = 1
if over == 1 or (over == 2 and room.curren_round > 0) then
local bigSeat = 0
local bigScore = 0
for i = 1, #data do
if data[i].total_score > bigScore then
bigSeat = i
bigScore = data[i].total_score
end
end
self._view:GetChild('text_roomID').text = room.room_id
self._view:GetChild('text_time').text = os.date('%m-%d %H:%M', os.time())
self._view:GetChild('text_groupID').text = room.group_id or 0
self._view:GetController('num').selectedIndex = #data == 2 and 0 or 1
self._view:GetController('isgroup').selectedIndex = room.group_id ~= 0 and 1 or 0
for i = 1, #data do
local info = data[i]
local playerInfo = room:GetPlayerBySeat(info.seat)
printlog("lingmeng clear", playerInfo.nick_name, info.total_score, i == bigSeat)
self:FillPlayerInfoEnd(self._view:GetChild(string.format("comp_playerInfo%d_over1", i)), info, playerInfo,
i == bigSeat)
end
coroutine.start(function()
coroutine.wait(2)
self._view:GetController('over').selectedIndex = 1
end)
end
local Btn_Share = self._view:GetChild('btn_shareRecord')
if Btn_Share then
Btn_Share.onClick:Set(function()
self:SaveRenderTextureToPNG()
end)
end
local Btn_Copy = self._view:GetChild('btn_copyRecord')
if Btn_Copy then
Btn_Copy.onClick:Set(function()
local resultStr = ""
if room.group_id ~= 0 then
local group = DataManager.groups:get(room.group_id)
resultStr = string.format("【%s】俱乐部", group.name)
end
resultStr = string.format("%s%s\n", resultStr, room.game_info.name)
for i = 1, #data do
local info = data[i]
local playerInfo = room:GetPlayerBySeat(info.seat)
resultStr = string.format("%s%s\nID:%s【%s】\n", resultStr, playerInfo.self_user.nick_name,
playerInfo.self_user.account_id,
info.total_score)
end
resultStr = string.format("%s房号:%s 局数:%s/%s局\n结束时间:%s", resultStr, room.room_id, room.curren_round,
room.room_config.Times, os.date("%Y-%m-%d %H:%M:%S", os.time()))
ViewUtil.__openWx()
GameApplication.Instance:CopyToClipboard(resultStr)
end)
end
end
function M:FillPlayerInfoEnd(view, info, playerInfo, bigWin)
local room = DataManager.CurrenRoom
self:FillPlayerHead(view:GetChild('comp_playerInfo'), playerInfo, bigWin)
local detailList = view:GetChild('list_detail')
self:FillDetailChild(detailList:AddItemFromPool(), 0, info.settle_log.maxscore)
self:FillDetailChild(detailList:AddItemFromPool(), 1, info.settle_log.boomnum)
self:FillDetailChild(detailList:AddItemFromPool(), 2,
string.format("%d赢%d输", info.settle_log.winnum, room.room_config.Times - info.settle_log.winnum))
self:FillDetailChild(detailList:AddItemFromPool(), 3, info.total_score)
end
function M:FillPlayerHead(view, playerInfo, bigWin)
ImageLoad.Load(playerInfo.self_user.head_url, view:GetChild('btn_head')._iconObject)
view:GetChild('text_name').text = ViewUtil.stringEllipsis(playerInfo.self_user.nick_name)
view:GetChild('text|_ID').text = playerInfo.self_user.account_id
view:GetController('bigWin').selectedIndex = bigWin and 1 or 0
end
function M:FillDetailChild(view, index, value)
view:GetController('ShowTitle').selectedIndex = index
view:GetChild('text_value').text = value
end
function M:SetDestroryCallback(fct)
self._destoryCallback = fct
end
function M:Destroy()
if self._destoryCallback then
self._destoryCallback()
end
getmetatable(M).__index.Destroy(self)
end
return M

View File

@ -0,0 +1,93 @@
local MainRightPanelView = require("Game.View.MainRightPanelView")
local EXRightPanelView = {}
local M = EXRightPanelView
local function __init(self, mainView, view)
local right_panel = view
local btn_setting = mainView._view:GetChild("btn_setting")
btn_setting.onClick:Set(function()
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 EXRightPanelView.new(mainView, view)
setmetatable(M, { __index = MainRightPanelView })
local self = setmetatable({}, { __index = M })
self.class = "EXRightPanelView"
__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,26 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/19 14:36
---
local EXPlayer = import(".EXPlayer")
local EXRoom = {
}
local M = EXRoom
--- 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 EXPlayer.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 = "EXRoomConfig"
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_SanDaHa/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

View File

@ -0,0 +1,829 @@
local PKMainView = import("main.poker.PKMainView")
local EXPlayerPokerInfoView = import(".EXPlayerPokerInfoView")
local EXPlayerSelfPokerInfoView = import(".EXPlayerSelfPokerInfoView")
local EXGameEvent = import(".EXGameEvent")
local EXResultView = import(".EXResultView")
local EXRightPanelView = import(".EXRightPanelView")
local PlayerInfoView = import(".EXPlayerInfoView")
local TableBG = import('Game.Data.TableBG')
local WitnessView = require("main.poker.PKWitnessView")
local EXCardCheck = import(".CardCheck")
local M = {}
function M.new()
setmetatable(M, { __index = WitnessView })
local self = setmetatable({}, { __index = M })
self.class = "EXMJWitness"
self:init()
self._gamectr = ControllerManager.GetController(GameController)
return self
end
function M:InitView(url)
local _room = DataManager.CurrenRoom
local room = DataManager.CurrenRoom
self._full = true
UIPackage.AddPackage("extend/poker/sandaha/ui/Extend_Poker_SanDaHa")
getmetatable(M).__index.InitView(self,
"ui://Extend_Poker_SanDaHa/EXNew_" .. _room.room_config.people_num)
local user_id = DataManager.SelfUser.account_id
local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. "pai")
if json_data == nil then
local _gamectr = self._gamectr
self._room.pai = 0
else
local _data = json.decode(json_data)
local pai = _data["pai"]
self._room.pai = pai
end
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, true)
tem.visible = false
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
for i = 1, #self._room.player_list do
if self._room.self_player.seat == self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then
-- body
local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip")
local _action = self._view:AddChild(ErrorMsgTip)
_action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4)
local text = _action:GetChild("tex_message")
local btn1 = _action:GetChild("btn_connect")
local btn2 = _action:GetChild("btn_back")
text.text = "您来晚了,座位有人,请重新进牌桌"
btn1.visible = false
btn2:Center()
btn2.y = btn2.y + 50
btn2.onClick:Set(function()
-- body
ErrorMsgTip:Destroy()
ErrorMsgTip = nil
self._gamectr:LevelRoom(function(res)
ViewUtil.CloseModalWait2()
NetResetConnectWindow.CloseNetReset()
ControllerManager.ChangeController(LoddyController)
ViewManager.ChangeView(ViewManager.View_Lobby)
end)
end)
end
end
self.ctr_state = self._view:GetController("state")
self._ctr_action = self._view:GetController("action")
self.ctr_time = self._view:GetController("time")
self.ctr_card_eff = self._view:GetController("card_eff")
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)
_player_card_info[i] = self:NewPlayerCardInfoView(tem, i)
end
if not _room.self_player.ready then
local round = DataManager.CurrenRoom.room_config.config.times or 1
local xpconfig = DataManager.CurrenRoom.room_config.config.xi_pai
if xpconfig then
if round > 1 then
self._ctr_action.selectedIndex = 1
else
self._ctr_action.selectedIndex = 2
end
else
self._ctr_action.selectedIndex = 1
end
else
self._ctr_action.selectedIndex = 0
end
self._left_time = 0
self.bgm_index = 1
self._state.selectedIndex = 4
self._view:GetChild("btn_back_jiesan").onClick:Set(function()
if self.dismiss_room_cd_time > 0 then
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:AskDismissRoom()
end
end)
self:ChangeBgmMusic()
self:EventInit()
UpdateBeat:Add(self.OnUpdate, self)
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
self._cardCheck = EXCardCheck:InitFlag()
self._gamectr._cardCheck = self._cardCheck
self:UpdateRound(0)
--按钮功能全部未开放
-- self._view:GetChild('Btn_Spectator').onClick:Set(function()
-- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
-- end)
self._view:GetChild('btn_invite').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
self._view:GetChild('text_roomId').text = self._room.room_id
self._ctr_inClear = self._view:GetController('Inclear')
self._view:GetChild('btn_ready_inClear').onClick:Set(function()
if self.result_view and self.result_view._view then
self._ctr_inClear.selectedIndex = 0
self.result_view:ClearReady()
else
self.result_view = nil
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame()
end
end)
----------------------------------------------------
--闹钟倒计时报时
self._leftTime_xiangling = 5
self._leftTime_bianhong = true
-----------如果进入观战时,已经开始游戏,则渲染画面------------
if _room.curren_round > 0 then
self:UpdateRound(_room.curren_round)
local list = _room.player_list
for i = 1, #list do
local p = list[i]
local head_info = self._player_info[self:GetPos(p.seat)]
if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then
-- body
if self._room.room_config.showlength == 1 then
-- body
head_info._view:GetController("shengyu").selectedIndex = 1
else
head_info._view:GetController("shengyu").selectedIndex = 0
end
-- body
head_info._view:GetChild("shengyu").text = p.hand_count
end
p:Clear()
head_info:MarkBank(p.seat == _room.banker_seat)
head_info:FillData(p)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
head_info:Ready(false)
end
end
-----------
local rightpanel = self._view:GetChild("right_panel")
if self._rightPanelView ~= nil then
self._rightPanelView:Destroy()
end
self._rightPanelView = EXRightPanelView.new(self, rightpanel)
local viewList_witness = self._view:GetChild('comp_witness'):GetChild('list_players')
viewList_witness:SetVirtual()
viewList_witness.itemRenderer = function(index, obj)
obj:GetChild('title').text = room.witness_player_list[index + 1].nick
ImageLoad.Load(room.witness_player_list[index + 1].portrait, obj:GetChild('btn_head')._iconObject)
end
local btn_witness = self._view:GetChild('btn_pangGuang')
if btn_witness then
btn_witness.onClick:Set(function()
self._view:GetController('witness').selectedIndex = 1
end)
end
--直接渲染观战人员
if room.witness_player_list then
if viewList_witness.numItems == #room.witness_player_list then
viewList_witness:RefreshVirtualList()
else
viewList_witness.numItems = #room.witness_player_list
end
end
end
function M:ChangeBgmMusic(bgm_index)
if bgm_index == nil then
bgm_index = self.bgm_index
else
self.bgm_index = bgm_index
end
ViewUtil.PlayMuisc("SanDaHa_PK", string.format("extend/poker/sandaha/sound/bgm%d.mp3", 1))
end
function M:EventInit()
local _gamectr = ControllerManager.GetController(GameController)
getmetatable(M).__index.EventInit(self)
local _player_info = self._player_info
local _player_card_info = self._player_card_info
local _room = self._room
_gamectr:AddEventListener(EXGameEvent.EventXiPai, function(...)
printlog("lingmeng pkwitness EventXiPai")
end)
_gamectr:AddEventListener(EXGameEvent.OnMingCard, function(...)
printlog("lingmeng pkwitness OnMingCard")
end)
_gamectr:AddEventListener(EXGameEvent.OnInitCard, function(...)
local arg = { ... }
local round = arg[1]
local cardlist = arg[2]
if self.result_view ~= nil then
self.result_view:Destroy()
self.result_view = nil
end
self._player_card_info[1]:HidePiao()
if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then
-- body
self.MypokerList = cardlist
end
local otherpoker_list = self._view:GetChild("otherpoker_list")
if otherpoker_list ~= nil then
-- body
otherpoker_list.visible = false
otherpoker_list:RemoveChildrenToPool()
end
self.ctr_card_eff.selectedIndex = 0
if self.rank_view ~= nil then
self.rank_view:Dispose()
self.rank_view = nil
end
self._ctr_inClear.selectedIndex = 0
self:UpdateRound(round)
-- ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/fapai.mp3")
local list = _room.player_list
for i = 1, #list do
local p = list[i]
local head_info = self._player_info[self:GetPos(p.seat)]
if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then
-- body
if self._room.room_config.showlength == 1 then
-- body
head_info._view:GetController("shengyu").selectedIndex = 1
else
head_info._view:GetController("shengyu").selectedIndex = 0
end
-- body
head_info._view:GetChild("shengyu").text = p.hand_count
end
p:Clear()
head_info:MarkBank(p.seat == _room.banker_seat)
head_info:FillData(p)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
head_info:Ready(false)
end
end)
_gamectr:AddEventListener(EXGameEvent.OnIndexMove, function(...)
local arg = { ... }
local seat = arg[1]
local isNewBout = arg[2]
local index = self:GetPos(seat)
self.ctr_time.selectedIndex = index
-- for i = 1, #self._player_info do
-- if index == i then
-- -- body
-- local head_info = self._player_info[index]
-- head_info:MarkBank(true)
-- else
-- local head_info = self._player_info[i]
-- head_info:MarkBank(false)
-- end
-- end
-- if index == 1 then
local card_info = self._player_card_info[index]
-- if self.MypokerList ~= nil then
-- -- body
-- card_info:Clear()
-- card_info:InitPoker(self.MypokerList, false)
-- self.MypokerList = nil
-- end
-- end
self._leftClock_continue = coroutine.start(function()
coroutine.wait(0.02)
card_info:SetOutCardInfo(nil, false)
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
if i == index then
card_info._ctr_time_clock.selectedIndex = 1
self._tex_leftTime = card_info._view_comp_clock
else
card_info._ctr_time_clock.selectedIndex = 0
end
-- if self._room.is_new_bout then
-- card_info.ctr_outpoker.selectedIndex = 0
-- end
end
if self._left_time and self._left_time < 15 then
self._left_time = 15
end
end)
if self._room.ming_card ~= nil then
self._view:GetTransition("t" .. index):Play()
self._room.ming_card = nil
if self.tween ~= nil then
TweenUtils.Kill(self.tween)
self.tween = nil
end
end
end)
_gamectr:AddEventListener(EXGameEvent.OnBombScore, function(...)
printlog("lingmeng pkwitness OnBombScore")
end)
_gamectr:AddEventListener(EXGameEvent.OnPlaySucc, function(...)
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/playcard_chup.mp3")
-- self._popEvent = false
local arg = { ... }
local p = arg[1]
local card_number = arg[2]
local cardstype = arg[3]
local num = arg[4]
local otherList = arg[5]
local length = arg[6]
local lastCardList = arg[7]
self.ctr_time.selectedIndex = 0
local index = self:GetPos(p.seat)
if index == 1 then
self.caozuo = 0
end
local head_info = self._player_info[index]
if head_info._view:GetChild("shengyu") ~= nil then
-- body
-- body
if card_number ~= nil then
-- body
head_info._view:GetChild("shengyu").text = card_number
end
end
head_info:SetBaoDan(card_number == 1)
local card_info = self._player_card_info[index]
card_info:SetOutCardInfo(p.out_card_list, false, true)
card_info._ctr_time_clock.selectedIndex = 0
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
if index == 1 then
card_info:DeleteHandCards(p.out_card_list)
else
-- card_info:SetRemainCardNumber(card_number == 1)
--card_info:UpdateHandPoker(card_number,false,false) -- todo
end
-- if self._room.is_new_bout == true then
-- for i = 1, #self._room.player_list do
-- local player = self._room.player_list[i]
-- local card_info_i = self._player_card_info[self:GetPos(player.seat)]
-- if p.seat ~= player.seat then
-- card_info_i:SetOutCardInfo(nil, false)
-- end
-- end
-- self:_Effect(cardstype, p)
-- else
-- if cardstype == 11 and cardstype ~= 12 then
-- self:_Effect(cardstype, p)
-- end
-- end
self:_Effect(self._cardCheck.type, p)
self:PlaySound(p.self_user.sex,
self:GetSoundFileName(self._cardCheck.type, num, self._room.is_new_bout))
-- self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout))
if card_number == 1 then
--self:ChangeBgmMusic(2)
self:ChangeBgmMusic(1)
if self._cor_sound ~= nil then
coroutine.stop(self._cor_sound)
end
self._cor_sound = nil
self._cor_sound = coroutine.start(function()
self:PlaySound(p.self_user.sex, "card_1")
end)
end
end)
_gamectr:AddEventListener(EXGameEvent.OnPassSuccCheckCard, function(...)
self._popEvent = false
local arg = { ... }
local seat = arg[1]
local cards = arg[2]
--self.MypokerList=cards
self.ctr_time.selectedIndex = 0
local card_info = self._player_card_info[self:GetPos(seat)]
if seat == self._room.self_player.seat then
card_info:ClearCheck()
card_info:InitPoker(cards, false)
end
self._popEvent = true
end)
_gamectr:AddEventListener(EXGameEvent.OnPassSucc, function(...)
self._popEvent = false
local arg = { ... }
local p = arg[1]
self.ctr_time.selectedIndex = 0
local card_info = self._player_card_info[self:GetPos(p.seat)]
--card_info:SetOutCardInfo(nil, false)
if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then
-- body
card_info:Clear()
card_info:InitPoker(self.MypokerList, false)
self.MypokerList = nil
end
coroutine.stop(self._leftClock_continue)
card_info._ctr_time_clock.selectedIndex = 0
card_info:SetOutCardInfo(nil, true)
self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4))
coroutine.start(function()
coroutine.wait(1)
self._popEvent = true
end)
end)
_gamectr:AddEventListener(EXGameEvent.OnErrorTip, function(...)
local arg = { ... }
local error_str = arg[1]
self._player_card_info[1]:ErrorTip(error_str)
end)
_gamectr:AddEventListener(EXGameEvent.OnPiaoTips, function(...)
printlog("lingmeng pkwitness OnPiaoTips")
end)
_gamectr:AddEventListener(EXGameEvent.OnPiaoAction, function(...)
printlog("lingmeng pkwitness OnPiaoAction")
end)
_gamectr:AddEventListener(EXGameEvent.OnOptions, function(...)
printlog("lingmeng pkwitness OnOptions")
end)
-- 托管
_gamectr:AddEventListener(EXGameEvent.Game_TuoGuan, function(...)
printlog("lingmeng pkwitness Game_TuoGuan")
end)
_gamectr:AddEventListener(EXGameEvent.OnResult, function(...)
local arg = { ... }
local over = arg[1]
local info = arg[2]
local win_seat = arg[3]
local remaincards = arg[4]
-- local energyTab = arg[5]
local otherpoker_list = self._view:GetChild("otherpoker_list")
local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)]
if self.dismissWin ~= nil then
self.dismissWin:Destroy()
end
self.dismissWin = nil
if self.MypokerList ~= nil then
-- body
card_info:Clear()
card_info:InitPoker(self.MypokerList, false)
self.MypokerList = nil
end
if otherpoker_list ~= nil then
-- body
otherpoker_list:RemoveChildrenToPool()
otherpoker_list.visible = true
end
if self._cor_sound ~= nil then
coroutine.stop(self._cor_sound)
self._cor_sound = nil
end
if self.destory_win ~= nil then
coroutine.stop(self.destory_win)
end
self.destory_win = nil
self.destory_win = coroutine.start(function()
if win_seat == self._room.self_player.seat then
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/end_music.mp3")
else
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/lose_music.mp3")
end
coroutine.stop(self._leftClock_continue)
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
self._left_time = 0
end
-- -- print("11111111111111")
-- coroutine.wait(1)
-- if self._room.self_player.seat == win_seat then
-- local sprint_seat_list = self:GetSpringSeats(info)
-- if #sprint_seat_list > 0 then
-- local url = "ui://Extend_Poker_SanDaHa/Spring"
-- self.WinItem_view = UIPackage.CreateObjectFromURL(url)
-- self._view:AddChild(self.WinItem_view)
-- self.WinItem_view:Center()
-- self.WinItem_view:GetTransition("t0"):Play()
-- ViewUtil.PlaySound("SanDaHa_PK", "base/common/sound/win new.mp3")
-- end
-- -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_SanDaHa/Spring" or "ui://Extend_Poker_SanDaHa/Win_Mine"
-- else
-- local beigang = false
-- if #self:GetSpringSeats(info) > 0 then
-- for i = 1, #self:GetSpringSeats(info) do
-- if self:GetSpringSeats(info)[i] == self._room.self_player.seat then
-- local url = "ui://Extend_Poker_SanDaHa/spring2"
-- self.WinItem_view = UIPackage.CreateObjectFromURL(url)
-- self._view:AddChild(self.WinItem_view)
-- self.WinItem_view:Center()
-- self.WinItem_view:GetTransition("t0"):Play()
-- beigang = true
-- end
-- end
-- end
-- -- if beigang == false then
-- -- self:CreateRankEff()
-- -- end
-- end
for i = 1, #info do
local player = info[i]
local p = self._room:GetPlayerBySeat(player.seat)
local head_info = self._player_info[self:GetPos(player.seat)]
head_info:SetBaoDan(false)
head_info._view:GetChild('text_jifen').text = player.score
-- head_info:PlayScore(player.winscore, win_seat == player.seat)
head_info:PlayScore(player.card_score, win_seat == player.seat)
end
for i = 1, #info do
local player = info[i]
local p = self._room:GetPlayerBySeat(player.seat)
local head_info = self._player_info[self:GetPos(player.seat)]
local card_info = self._player_card_info[self:GetPos(player.seat)]
if player.seat ~= win_seat then
card_info.ctr_outpoker.selectedIndex = 0
end
if player.seat ~= self._room.self_player.seat then
local oneTime = 7 / 60
-- card_info:UpdateHandPoker(player.cards, false, true)
card_info._view_resultOut:RemoveChildrenToPool()
card_info._ctr_resultOut.selectedIndex = 1
for i = 1, #player.handCards do
local child_card = card_info._view_resultOut:AddItemFromPool()
card_info:FillPoker(child_card, "", nil, player.handCards[i])
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/fanCard.mp3")
printlog("lingmeng oneTime", oneTime)
coroutine.wait(oneTime)
end
end
end
self:ChangeBgmMusic(1)
-- if over == 0 then
-- if #self:GetSpringSeats(info) > 0 then
-- -- -- print("222222222222222222")
-- coroutine.wait(1)
-- else
-- -- -- print("333333333333333333")
-- -- coroutine.wait(2)
-- end
coroutine.wait(2)
self.result_view = EXResultView.new(self, info, self._room.room_id, over, win_seat, 0,
remaincards)
self._ctr_inClear.selectedIndex = 0
self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info.ctr_outpoker.selectedIndex = 0
if card_info._ctr_resultOut then
card_info._ctr_resultOut.selectedIndex = 0
end
end
end)
self.result_view:Show()
if self.WinItem_view ~= nil then
self.WinItem_view:Dispose()
self.WinItem_view = nil
end
if self.rank_view ~= nil then
self.rank_view:Dispose()
self.rank_view = nil
end
if self._room.self_player.entrust == true then
local btn_confirm = self.result_view._view:GetChild("btn_confirm")
btn_confirm.onClick:Call()
end
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/end_music.mp3")
-- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow")
-- _actionView.icon = "ui://Common/btn_comfirm"
-- _actionView.onClick:Set(function ()
-- --local _gamectr = ControllerManager.GetController(GameController)
-- _gamectr:ConformToNextGame()
-- _actionView:Dispose()
-- end)
-- _actionView.xy = Vector2(900, 625)
-- self._view:AddChild(_actionView)
-- else
-- coroutine.wait(4)
-- self.result_view = EXResultView.new(self._root_view,info,self._room.room_id)
-- self.result_view:Show()
-- end
end)
if over == 1 then
-- body
self:UnmarkSelfTuoguan()
ControllerManager.ChangeController(LoddyController)
end
end)
_gamectr:AddEventListener(EXGameEvent.OnResultByDissolve, function(...)
local arg = { ... }
local over = arg[1]
local info = arg[2]
local winseat = arg[3]
local dissolve = arg[4]
if self.dismissWin ~= nil then
self.dismissWin:Destroy()
end
self.dismissWin = nil
if _room.curren_round > 0 then
ViewUtil.PlaySound("SanDaHa_PK", "extend/poker/sandaha/sound/end_music.mp3")
end
for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i]
card_info._ctr_time_clock.selectedIndex = 0
end
self.result_view = EXResultView.new(self, info, self._room.room_id, over, winseat, dissolve, nil)
self.result_view:Show()
ControllerManager.ChangeController(LoddyController)
self:UnmarkSelfTuoguan()
end)
-- 确定开始下一局 成功
_gamectr:AddEventListener(EXGameEvent.OnConfrimToNextGameSucc, function(...)
local arg = { ... }
local aid = arg[1]
local p = self._room:GetPlayerById(aid)
if p.seat == self._room.self_player.seat then
if self.rank_view ~= nil then
self.rank_view:Dispose()
self.rank_view = nil
end
if self.destory_win ~= nil then
coroutine.stop(self.destory_win)
self.destory_win = nil
end
for _, player in ipairs(self._room.player_list) do
local player_card_info = self._player_card_info[self:GetPos(player.seat)]
local player_head = self._player_info[self:GetPos(player.seat)]
player_card_info:Clear()
local otherpoker_list = self._view:GetChild("otherpoker_list")
if otherpoker_list ~= nil then
-- body
otherpoker_list.visible = false
otherpoker_list:RemoveChildrenToPool()
end
--player_head._view:GetController("Oener").selectedIndex=0
end
end
local player_info = self._player_info[self:GetPos(p.seat)]
player_info:Ready(true)
end)
_gamectr:AddEventListener(EXGameEvent.OnBompScoreNew, function(...)
local arg = { ... }
local scoreList = arg[1]
for i = 1, #scoreList do
local score = scoreList[i].pomSore
local player = self._room:GetPlayerBySeat(scoreList[i].seat)
local head_info = self._player_info[self:GetPos(scoreList[i].seat)]
head_info:PlayScore(score, true)
head_info:UpdateScore(player.total_score)
end
end)
--覆盖原始闹钟,原始闹钟仅限麻将使用
_gamectr:AddEventListener(
GameEvent.TupGuanOpen,
function(...)
---- print("刷新托管数据=====")
local arg = { ... }
local p = arg[1]
local player_card_info = self._player_card_info[self:GetPos(p.seat)]
self._tex_leftTime = player_card_info._view_comp_clock
self._left_time = tonumber(arg[3]) or 0
end
)
end
function M:NewPlayerCardInfoView(tem, index)
if index == 1 then
return EXPlayerSelfPokerInfoView.new(tem, self)
end
return EXPlayerPokerInfoView.new(tem, self)
end
function M:GetPos(seat)
return ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num)
end
function M:UpdateRound(round)
local total_round = self._room.room_config.Times
-- self._text_round.text = string.format("%d / %d 局", round, total_round)
if not self._text_currenRound then
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
end
if not self._text_maxRound then
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
end
self._text_currenRound.text = round
self._text_maxRound.text = string.format("/%s局", total_round)
end
function M:_Effect(type1, player)
if type1 == 1 or type1 == 3 or type1 == 7 then
self._popEvent = true
return
end
local info = self._player_card_info[self:GetPos(player.seat)]
info:PlayEffect(type1, function()
self._popEvent = true
end)
end
function M:GetSoundFileName(type, num, isNewBout)
local fileName
if type == 1 or type == 3 or type == 7 then
local num = self._cardCheck.lastMinCard
if type == 1 then
fileName = string.format("1_%d", num)
elseif type == 3 then
fileName = string.format("2_%d", num)
elseif type == 7 then
fileName = string.format("3_%d", num)
end
else
if not isNewBout and type ~= 6 then
local r = math.random(1, 3)
fileName = "dani_" .. r
else
if type == 8 or type == 12 then
fileName = 5
else
fileName = type
end
end
end
return fileName
end
function M:PlaySound(sex, path)
local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女
local sound_path = string.format("extend/poker/sandaha/sound/%s/%s.mp3", sex_path, path)
ViewUtil.PlaySound("SanDaHa_PK", sound_path)
end
return M

View File

@ -0,0 +1,318 @@
---
--- Created by 谌建军.
--- DateTime: 2017/12/13 10:57
---
local EXTEND_MODEL_NAME = ...
local EXGameInfo = import(".EXGameInfo")
local EXMainView = import(".EXMainView")
local EXGameController = import(".EXGameController")
local EXRoomConfig = import(".EXRoomConfig")
local EXPlayer = import(".EXPlayer")
local EXRoom = import(".EXRoom")
local EXPlayerBackView = import(".EXPlayerBackView")
local EXWitnessView = import(".EXWitnessView")
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] = EXMainView
self._viewMap[ViewManager.View_PlayBack] = EXPlayerBackView
self._viewMap[ViewManager.View_Witness] = EXWitnessView
return self
end
--卸载资源
function M:UnAllAssets()
UIPackage.RemovePackage("extend/poker/sandaha/ui/Info_Poker_SanDaHa")
self:UnAssets()
end
function M:UnAssets()
UIPackage.RemovePackage("extend/poker/sandaha/ui/Extend_Poker_SanDaHa")
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 = EXGameController.new()
end
return _ctr_game
end
function M:NewRoom()
return EXRoom.new()
end
function M:GetGameRule()
return EXRuleView.new()
end
function M:GetIconUrl()
return "ui://Lobby/paodekuai2", "ui://Lobby/paodekuai1"
end
function M:FillRoomConfig(room, _config)
room.room_config = EXRoomConfig.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 = EXRoomConfig.new(_config)
room.curren_round = _tableInfo["round"]
if room.curren_round == 0 and reload then
room.curren_round = 1
end
room.witness_player_list = _tableInfo["playerSpectatorData"]
room._flag_updateWitness = true
local playerList = _tableInfo["playerData"]
for i = 1, #playerList do
local _jp = playerList[i]
local p = EXPlayer.new()
p.seat = _jp["seat"]
local online = _jp["online"]
p.line_state = online
p.ready = _jp["ready"] == 1 and true or false
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 bank_seat = reloadInfo["banker_seat"]
room.banker_seat = bank_seat
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 = EXRoomConfig.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 = EXPlayer.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:FillWitnessData(pd_data)
print("==========================FillWitnessData1")
local room = DataManager.CurrenRoom
pt(room)
if _ctr_game == nil then
self:GetGameController()
end
local _tableInfo = pd_data["tableInfo"]
room.xipaiScore = _tableInfo["xipai_score"]
local _config = _tableInfo["config"]
room.room_config = EXRoomConfig.new(_config)
room.curren_round = _tableInfo["round"]
room.witness_player_list = _tableInfo["playerSpectatorData"]
local playerList = _tableInfo["playerData"]
for i = 1, #playerList do
local _jp = playerList[i]
local p = EXPlayer.new()
p.seat = _jp["seat"]
local online = _jp["online"]
p.line_state = online
p.ready = _jp["ready"] == 1 and true or false
local pid = _jp["aid"]
if p.seat == 1 then room.self_player = p end
local u = User.new()
u.account_id = pid
p.self_user = u
u.nick_name = _jp["nick"]
u.head_url = _jp["portrait"]
u.sex = _jp["sex"]
p.self_user.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 = pd_data["owner"]
room.owner_id = owner
room.game_status = 0
end
function M:LoadConfigToDetail(data)
return data
end
return M

View File

@ -5,7 +5,7 @@
<image id="n10_hmu5" name="n10" src="hmu5b7jha" fileName="images/btn_withText1.png" xy="-5,0" size="272,145">
<relation target="" sidePair="width-width,height-height"/>
</image>
<text id="n11_hmu5" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#984732" text="">
<text id="n11_hmu5" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#324a98" text="">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<loader id="n12_hmu5" name="n12" xy="1,61" size="262,84" url="ui://27vd145bhmu5b7jhd" vAlign="middle" fill="scale">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -2244,7 +2244,7 @@
<image id="hmu5b7jhe" name="bg_huabian1_1.png" path="/images/"/>
<image id="hmu5b7jhf" name="bt_huabian_1.png" path="/images/"/>
<component id="cl8pb7jhg" name="Btn_ScrollText.xml" path="/buttons/" exported="true"/>
<image id="cl8pb7jhh" name="btn_bg1WithText.png" path="/images/" scale="9grid" scale9grid="50,17,100,34"/>
<image id="cl8pb7jhh" name="btn_bg1WithText.png" path="/images/" scale="9grid" scale9grid="50,17,234,84"/>
<image id="cl8pb7jhi" name="btn_bg1WithText1.png" path="/images/" scale="9grid" scale9grid="50,17,100,34"/>
<component id="cl8pb7jhj" name="Btn_Bg1WithText1.xml" path="/buttons/" exported="true"/>
<component id="cl8pb7jhk" name="Btn_Bg2WithText.xml" path="/buttons/" exported="true"/>

View File

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="1117,105">
<controller name="chuntian" pages="0,,1," selected="1"/>
<displayList>
<image id="n6_n9qr" name="n6" src="g6uw3" fileName="Clearing/Image/矩形 1.png" xy="0,0" size="1117,105">
<relation target="" sidePair="width-width,height-height"/>
</image>
<text id="n7_n9qr" name="name" xy="12,19" size="287,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" vAlign="middle" letterSpacing="6" autoSize="none" text="你好">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n8_n9qr" name="residue" xy="423,19" pivot="0.5,0.5" size="161,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" singleLine="true" text="0">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n9_n9qr" name="bomb" xy="639,19" pivot="0.5,0.5" size="155,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" text="0">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n10_n9qr" name="score" xy="838,19" pivot="0.5,0.5" size="225,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" text="+10">
<relation target="" sidePair="center-center%"/>
</text>
<image id="n11_11k4t" name="n11" src="g6uw4" fileName="Clearing/Image/tag_chuntian.png" xy="273,9" pivot="0.5,0.5" size="172,87">
<gearDisplay controller="chuntian" pages="1"/>
</image>
<text id="n12_b9zt" name="name" xy="-25,17" size="344,64" group="n16_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" autoSize="none" text="名称"/>
<text id="n13_b9zt" name="cardScore" xy="358,17" pivot="0.5,0.5" size="148,64" group="n16_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="牌局分"/>
<text id="n14_b9zt" name="bompScore" xy="649,17" pivot="0.5,0.5" size="148,64" group="n16_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="炸弹分"/>
<text id="n15_b9zt" name="score" xy="940,17" pivot="0.5,0.5" size="100,64" group="n16_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="积分"/>
<group id="n16_b9zt" name="n16" xy="-25,17" size="1065,64" advanced="true"/>
</displayList>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

View File

@ -1,29 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170">
<controller name="over" pages="0,,1,,9," selected="1"/>
<controller name="over" pages="0,,1,,9," selected="0"/>
<controller name="win" pages="0,,1," selected="0"/>
<controller name="num" pages="1,,2,,3," selected="1"/>
<controller name="isgroup" pages="0,,1," selected="0"/>
<displayList>
<image id="n33_n9qr" name="n33" src="g6uw3" fileName="Clearing/Image/矩形 1.png" xy="0,0" size="2532,1170" group="n4_ckvb">
<relation target="" sidePair="width-width,height-height"/>
</image>
<component id="n8_ckvb" name="n8" src="g6uw5" fileName="Clearing/Component/Comp_over0Title.xml" xy="723,319" size="1086,78" group="n4_ckvb"/>
<list id="n9_ckvb" name="list_over0" xy="721,386" size="1115,554" group="n4_ckvb" overflow="scroll" lineGap="33" defaultItem="ui://kvku0fu4g6uw2">
<image id="n60_b9zt" name="n60" src="b9zt17s" fileName="Clearing/Image/bg_over0.png" xy="638,353" group="n4_ckvb"/>
<image id="n58_b9zt" name="n58" src="b9zt17w" fileName="Clearing/Image/icon_poker_lab_win.png" xy="825,0" group="n4_ckvb">
<gearDisplay controller="win" pages="1"/>
</image>
<image id="n59_b9zt" name="n59" src="b9zt17v" fileName="Clearing/Image/icon_poker_lab_lose.png" xy="825,0" group="n4_ckvb">
<gearDisplay controller="win" pages="0"/>
</image>
<text id="n61_b9zt" name="n61" xy="741,385" size="100,64" group="n65_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="名称"/>
<text id="n62_b9zt" name="n62" xy="1094,385" size="148,64" group="n65_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="牌局分"/>
<text id="n63_b9zt" name="n63" xy="1385,385" size="148,64" group="n65_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="炸弹分"/>
<text id="n64_b9zt" name="n64" xy="1676,385" size="100,64" group="n65_b9zt" font="ui://27vd145bej1ib7jgl" fontSize="48" color="#fff68e" text="积分"/>
<group id="n65_b9zt" name="n65" xy="741,385" size="1035,64" group="n4_ckvb" advanced="true"/>
<list id="n9_ckvb" name="list_over0" xy="733,467" size="1106,414" group="n4_ckvb" defaultItem="ui://kvku0fu4g6uw2">
<item/>
<item/>
<item/>
<item/>
</list>
<component id="n10_ckvb" name="btn_nextRound" src="g6uw0" fileName="Clearing/Component/btn_nextRound.xml" xy="1077,947" size="375,127" group="n4_ckvb"/>
<image id="n35_n9qr" name="n35" src="g6uw15" fileName="Clearing/Image/bg_img_win.png" xy="574,-59" size="1382,1000" group="n4_ckvb">
<gearDisplay controller="win" pages="1"/>
</image>
<image id="n36_n9qr" name="n36" src="g6uw14" fileName="Clearing/Image/bg_img_lost.png" xy="574,-59" size="1382,1134" group="n4_ckvb">
<gearDisplay controller="win" pages="0"/>
</image>
<component id="n46_n9qr" name="btn_over1Close" src="g6uwo" fileName="Clearing/Component/btn_over1Close.xml" xy="1803,111" size="170,130" group="n4_ckvb"/>
<group id="n4_ckvb" name="over0" xy="0,-59" size="2532,1229" advanced="true">
<component id="n66_b9zt" name="btn_nextRound" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="1101,932" size="330,135" group="n4_ckvb">
<Button icon="ui://kvku0fu4b9zt17t"/>
</component>
<group id="n4_ckvb" name="over0" xy="0,0" size="2532,1170" advanced="true">
<gearDisplay controller="over" pages="0"/>
</group>
<image id="n56_n9qr" name="n56" src="g6uw3" fileName="Clearing/Image/矩形 1.png" xy="0,0" size="2532,1170" group="n25_ckvb">
@ -37,20 +42,10 @@
<component id="n17_ckvb" name="btn_closeRound" src="g6uw6" fileName="Clearing/Component/btn_closeRound.xml" xy="114,54" size="188,122" group="n25_ckvb"/>
<component id="n18_ckvb" name="btn_shareRecord" src="g6uw8" fileName="Clearing/Component/btn_shareRecord.xml" xy="1076,995" size="380,128" group="n25_ckvb"/>
<component id="n19_ckvb" name="btn_copyRecord" src="g6uwa" fileName="Clearing/Component/btn_copyRecord.xml" xy="1553,994" size="380,128" group="n25_ckvb"/>
<component id="n21_ckvb" name="comp_playerInfo1_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="248,250" group="n25_ckvb">
<gearXY controller="num" pages="1,2" values="489,249|248,250" default="489,249"/>
</component>
<component id="n22_ckvb" name="comp_playerInfo2_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="978,249" group="n25_ckvb">
<gearXY controller="num" pages="1,2" values="1454,247|978,249" default="1454,247"/>
</component>
<component id="n23_ckvb" name="comp_playerInfo3_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="1697,245" group="n25_ckvb">
<gearDisplay controller="num" pages="2"/>
<gearXY controller="num" pages="2" values="1697,245" default="1734,203"/>
</component>
<component id="n57_l8fn" name="comp_playerInfo4_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="1697,245" group="n25_ckvb">
<gearDisplay controller="num" pages="2"/>
<gearXY controller="num" pages="1,2" values="1526,1455|1697,245" default="1734,203"/>
</component>
<component id="n21_ckvb" name="comp_playerInfo1_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="489,249" group="n25_ckvb"/>
<component id="n22_ckvb" name="comp_playerInfo2_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="1454,247" group="n25_ckvb"/>
<component id="n23_ckvb" name="comp_playerInfo3_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="1734,203" group="n25_ckvb"/>
<component id="n57_l8fn" name="comp_playerInfo4_over1" src="g6uwc" fileName="Clearing/Component/Comp_playerOver1Info.xml" xy="1526,1455" group="n25_ckvb"/>
<text id="n24_ckvb" name="n24" xy="843,897" size="840,51" group="n25_ckvb" font="FZCuYuan-M03" fontSize="38" color="#ffffff" letterSpacing="4" text="游戏结果仅限娱乐用途,禁止用于赌博行为!">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
@ -74,7 +69,7 @@
<gearDisplay controller="isgroup" pages="1"/>
<relation target="n30_ckvb" sidePair="left-right,top-top"/>
</text>
<group id="n25_ckvb" name="over1" xy="0,0" size="2532,1170" advanced="true">
<group id="n25_ckvb" name="over1" xy="0,0" size="2532,2097" advanced="true">
<gearDisplay controller="over" pages="1"/>
</group>
</displayList>

View File

@ -1044,6 +1044,11 @@
<component id="l8fn17p" name="415.xml" path="/newcard/4/" exported="true"/>
<component id="l8fn17q" name="415_z.xml" path="/newcard/4/" exported="true"/>
<component id="l8fn17r" name="Btn_ListOneCardMove.xml" path="/Main_New/Component/"/>
<image id="b9zt17s" name="bg_over0.png" path="/Clearing/Image/"/>
<image id="b9zt17t" name="btn_confirm_poker.png" path="/Clearing/Image/"/>
<image id="b9zt17u" name="btn_return_poker.png" path="/Clearing/Image/"/>
<image id="b9zt17v" name="icon_poker_lab_lose.png" path="/Clearing/Image/"/>
<image id="b9zt17w" name="icon_poker_lab_win.png" path="/Clearing/Image/"/>
</resources>
<publish name="Extend_Poker_DuoDuo" path="..\wb_unity_pro\Assets\ART\extend\poker\duoduo\ui" packageCount="2"/>
</packageDescription>

View File

@ -6,7 +6,7 @@
<controller name="piao" pages="0,,1,,2,,3," selected="0"/>
<controller name="piao_value" pages="0,0,1,1,2,2,3,3,4,5,5,8" selected="0"/>
<controller name="time_clock" pages="0,,1," selected="0"/>
<controller name="out_card_option2" pages="0,,1," selected="1"/>
<controller name="out_card_option2" pages="0,,1," selected="0"/>
<displayList>
<component id="n47_g618" name="hand_poker_c" src="prgz89" fileName="component/poker/hand_poker_con.xml" xy="-218,-1283" size="2565,190" visible="false">
<relation target="" sidePair="bottom-bottom,width-width"/>
@ -62,7 +62,7 @@
<Button icon="ui://9n9stu2ei3h6gv" selectedIcon="ui://9n9stu2ei3h6gv" controller="piao_value" page="5"/>
</component>
<group id="n63_i3h6" name="piao" xy="66,-185" size="1250,103"/>
<list id="n69_ckvb" name="List_HandCard" xy="-72,-1" size="2426,328" layout="row" selectionMode="none" colGap="-135" defaultItem="ui://9n9stu2eckvbcjp" align="center" vAlign="middle" autoClearItems="true">
<list id="n69_ckvb" name="List_HandCard" xy="0,0" size="2278,328" layout="row" selectionMode="none" colGap="-135" defaultItem="ui://9n9stu2eckvbcjp" vAlign="middle" autoClearItems="true">
<relation target="" sidePair="width-width,height-height"/>
<item/>
<item/>
@ -79,9 +79,6 @@
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
</list>
<list id="n70_ckvb" name="List_Out" xy="260,-311" pivot="0.5,0.5" size="1760,210" layout="row" selectionMode="none" colGap="-101" defaultItem="ui://9n9stu2eckvbcjn" align="center" vAlign="middle">
<gearDisplay controller="output" pages="1"/>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="74,74" extention="Button">
<controller name="button" pages="0,up,1,down" selected="0"/>
<controller name="ban" exported="true" pages="0,,1,,2," selected="2"/>
<displayList>
<loader id="n3_h1uu" name="icon" xy="0,0" size="74,74" url="ui://9a4y35xkrj0bil" align="center" vAlign="middle">
<gearIcon controller="ban" pages="1,2" values="ui://9a4y35xkrj0bim|ui://9a4y35xkrj0bil" default="ui://9a4y35xkrj0bin"/>
</loader>
</displayList>
<Button downEffect="dark" downEffectValue="0.80"/>
</component>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="191,156">
<controller name="room_owner" pages="0,,1," selected="0"/>
<controller name="bigWin" pages="0,,1," selected="1"/>
<displayList>
<component id="n0_ckvb" name="btn_head" src="rj0bf" fileName="Clearing/Component/btn_head.xml" xy="0,0" size="191,156">
<relation target="" sidePair="width-width,height-height"/>
</component>
<text id="n2_ckvb" name="text_name" xy="210,12" size="105,64" font="Arial" fontSize="48" color="#ffa522" align="center" vAlign="middle" leading="0" letterSpacing="5" text="你好">
<relation target="" sidePair="left-right,top-top"/>
</text>
<text id="n5_n9qr" name="text|_ID" xy="303,71" size="174,64" font="FZCuYuan-M03" fontSize="48" color="#ffffff" leading="0" singleLine="true" text="1375108">
<relation target="n3_ckvb" sidePair="left-right,top-top"/>
</text>
<text id="n3_ckvb" name="text|_ID_Title" xy="208,70" size="95,64" font="FZCuYuan-M03" fontSize="48" color="#ffffff" leading="0" singleLine="true" text="ID">
<relation target="" sidePair="left-right,bottom-bottom"/>
</text>
<image id="n6_n9qr" name="fangzhu" src="rj0bg" fileName="font/images/head/owner.png" xy="3,111" size="100,44">
<gearDisplay controller="room_owner" pages="1"/>
<relation target="" sidePair="left-left%,bottom-bottom%"/>
</image>
<image id="n7_n9qr" name="n7" src="rj0bh" fileName="Clearing/Image/over_win.png" xy="-11,-13" size="171,146">
<gearDisplay controller="bigWin" pages="1"/>
</image>
</displayList>
</component>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="1086,105">
<displayList>
<text id="n5_n9qr" name="n5" xy="61,16" size="115,72" font="FZCuYuan-M03" fontSize="54" color="#f7a82f" align="center" vAlign="middle" letterSpacing="3" text="昵称">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<text id="n6_n9qr" name="n6" xy="451,16" size="115,72" font="FZCuYuan-M03" fontSize="54" color="#f7a82f" align="center" letterSpacing="3" singleLine="true" text="剩牌">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<text id="n7_n9qr" name="n7" xy="629,16" size="172,72" font="FZCuYuan-M03" fontSize="54" color="#f7a82f" align="center" letterSpacing="3" text="炸弹数">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<text id="n8_n9qr" name="n8" xy="887,16" size="115,72" font="FZCuYuan-M03" fontSize="54" color="#f7a82f" align="center" letterSpacing="3" text="分数">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
</displayList>
</component>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="1117,105">
<controller name="chuntian" pages="0,,1," selected="1"/>
<displayList>
<image id="n6_n9qr" name="n6" src="rj0b3" fileName="Clearing/Image/矩形 1.png" xy="0,0" size="1117,105">
<relation target="" sidePair="width-width,height-height"/>
</image>
<text id="n7_n9qr" name="name" xy="12,19" size="287,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" vAlign="middle" letterSpacing="6" autoSize="none" text="你好">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n8_n9qr" name="residue" xy="423,19" pivot="0.5,0.5" size="161,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" singleLine="true" text="0">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n9_n9qr" name="bomb" xy="639,19" pivot="0.5,0.5" size="155,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" text="0">
<relation target="" sidePair="center-center%"/>
</text>
<text id="n10_n9qr" name="score" xy="838,19" pivot="0.5,0.5" size="225,66" font="FZCuYuan-M03" fontSize="50" color="#ffffff" align="center" letterSpacing="6" autoSize="none" text="+10">
<relation target="" sidePair="center-center%"/>
</text>
<image id="n11_11k4t" name="n11" src="rj0b4" fileName="Clearing/Image/tag_chuntian.png" xy="273,9" pivot="0.5,0.5" size="172,87">
<gearDisplay controller="chuntian" pages="1"/>
</image>
</displayList>
</component>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="558,642">
<displayList>
<image id="n4_n9qr" name="n4" src="rj0bd" fileName="Clearing/Image/bg_player.png" xy="2,1" size="568,652"/>
<component id="n1_ckvb" name="comp_playerInfo" src="rj0be" fileName="Clearing/Component/Com_PlayerInfoClear.xml" xy="27,24" size="191,156"/>
<list id="n2_ckvb" name="list_detail" xy="15,222" size="521,403" overflow="scroll" lineGap="32" defaultItem="ui://9a4y35xkrj0bi" autoClearItems="true">
<item/>
<item/>
<item/>
<item/>
</list>
</displayList>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="166,105" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n4_n9qr" name="n4" src="rj0b7" fileName="Clearing/Image/btn_back_0.png" xy="0,0" size="166,105">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,126" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n4_n9qr" name="n4" src="rj0bb" fileName="Clearing/Image/copy_2.png" xy="0,0" size="360,126">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.2"/>
</component>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="132,132" extention="Button" mask="n2_pkx5">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<graph id="n2_pkx5" name="mask" xy="0,0" size="132,132" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc" corner="12">
<relation target="" sidePair="width-width,height-height"/>
</graph>
<loader id="n3_pkx5" name="icon" xy="1,1" size="130,130" fill="scaleFree" useResize="true">
<relation target="" sidePair="center-center,middle-middle"/>
</loader>
<graph id="n1_pkx5" name="border" xy="0,0" size="132,132" visible="false" touchable="false" type="rect" lineSize="2" lineColor="#ff804b2e" fillColor="#00fafafa" corner="12">
<relation target="" sidePair="width-width,height-height"/>
</graph>
</displayList>
<Button/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,126" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b1" fileName="Clearing/Image/kaishiyouxi.png" xy="0,0" size="360,126">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="dark" downEffectValue="0.8"/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="86,86" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n0_n9qr" name="n0" src="rj0bp" fileName="Clearing/Image/btn_close1.png" xy="0,0">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.1"/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,126" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n4_n9qr" name="n4" src="rj0b9" fileName="Clearing/Image/over_xuanyao.png" xy="0,0" size="360,126">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.2"/>
</component>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="523,70">
<controller name="ShowTitle" pages="0,,1,,5,,6,,7,,8," selected="0">
<remark page="0" value="单局最高分"/>
<remark page="1" value="打出炸弹数"/>
<remark page="2" value="胜负局数"/>
<remark page="3" value="总积分"/>
</controller>
<displayList>
<image id="n3_n9qr" name="n3" src="rj0bj" fileName="Clearing/Image/cell_bg.png" xy="0,0" size="523,70"/>
<text id="n4_n9qr" name="text_value" xy="322,4" size="198,62" font="FZCuYuan-M03" fontSize="46" color="#ffffff" align="center" vAlign="middle" letterSpacing="2" autoSize="none" text="6">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<image id="n5_n9qr" name="n5" src="rj0bk" fileName="Clearing/Image/single_max_score.png" xy="19,14" size="281,42">
<gearDisplay controller="ShowTitle" pages="0"/>
</image>
<image id="n6_n9qr" name="n6" src="rj0bl" fileName="Clearing/Image/pk_win_lose.png" xy="66,13" size="186,45">
<gearDisplay controller="ShowTitle" pages="5"/>
</image>
<image id="n7_n9qr" name="n7" src="rj0bm" fileName="Clearing/Image/totle_score.png" xy="89,15" size="141,40">
<gearDisplay controller="ShowTitle" pages="6"/>
</image>
<image id="n8_n9qr" name="n8" src="rj0bn" fileName="Clearing/Image/bomb_count.png" xy="42,14" size="234,43">
<gearDisplay controller="ShowTitle" pages="1"/>
</image>
</displayList>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,324 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" designImageAlpha="100" designImageLayer="1">
<controller name="state" pages="0,准备状态,1,游戏状态,2,,3,回放,4,观战" selected="1"/>
<controller name="sdk" pages="0,,1," selected="0"/>
<controller name="action" pages="2,空,0,准备,1,开始" selected="1"/>
<controller name="time" pages="0,,1,,2,,3,,4," selected="4"/>
<controller name="card_eff" pages="0,,1," selected="0"/>
<controller name="zidongtishi" pages="0,,1," selected="0"/>
<controller name="voice" pages="0,,1," selected="0"/>
<controller name="Inclear" pages="0,,1," selected="0"/>
<controller name="witness" pages="0,,1," selected="0"/>
<displayList>
<graph id="n141_ckvb" name="bg_mask" xy="-514,11" size="2532,751" type="rect" lineSize="0" fillColor="#00ffffff"/>
<component id="n76_rqeb" name="mask" src="rj0bht" fileName="component/mask.xml" xy="14,1962" alpha="0">
<gearDisplay controller="state" pages="1"/>
<gearLook controller="state" pages="0,2,3" values="0,0,0,1|0,0,0,1|0,0,0,1" default="0,0,0,1"/>
</component>
<component id="n164_if10" name="com_logo" src="rj0b91" fileName="Main_new/Component/com_logo.xml" xy="1265,372" size="400,61">
<relation target="" sidePair="center-center"/>
</component>
<component id="n12" name="btn_wxyqhy" src="rj0bhu" fileName="component/Btn_wxyq.xml" xy="1188,2161" group="n13">
<gearDisplay controller="sdk" pages="0"/>
</component>
<group id="n13" name="n13" xy="1188,2161" size="297,89" advanced="true">
<gearDisplay controller="state" pages="0"/>
<relation target="" sidePair="center-center"/>
</group>
<image id="n110_rnez" name="n110" src="rj0bbt" fileName="component/image/images/mtdk_img.png" xy="859,2008" size="703,36" group="n112_rnez" scale="1.5,1.5" visible="false"/>
<component id="n111_rnez" name="info_text" src="rj0bcb" fileName="component/Main/component/zhuomian/gray_bg_btn.xml" xy="873,2009" size="670,36" group="n112_rnez" scale="1.5,1.5" visible="false"/>
<image id="n113_rnez" name="n113" src="rj0bcc" fileName="component/Main/component/zhuomian/hw_img.png" xy="1140,2113" size="31,14" group="n116_rnez" scale="1.5,1.5" rotation="1.5" flip="hz">
<relation target="n114_rnez" sidePair="right-right"/>
</image>
<text id="n114_rnez" name="wanfa_text" xy="1188,2090" size="214,41" group="n116_rnez" scale="1.5,1.5" fontSize="30" color="#31434f" vAlign="middle" text="十五张三人玩法">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<image id="n115_rnez" name="n115" src="rj0bcc" fileName="component/Main/component/zhuomian/hw_img.png" xy="1511,2113" size="31,14" group="n116_rnez" scale="1.5,1.5">
<relation target="n114_rnez" sidePair="left-left"/>
</image>
<group id="n116_rnez" name="n116" xy="1140,2090" size="402,42" group="n112_rnez"/>
<group id="n112_rnez" name="n112" xy="859,2008" size="703,124" advanced="true">
<gearDisplay controller="state" pages="0,1,2"/>
<relation target="" sidePair="center-center"/>
</group>
<component id="n67_qfrg" name="time" src="rj0bi5" fileName="component/Clock.xml" xy="625,198" scale="1.5,1.5" visible="false" touchable="false">
<gearDisplay controller="time" pages="1,2,3"/>
<gearXY controller="time" pages="1,2" values="-296,2199|2797,1976" default="625,198"/>
</component>
<component id="n34_k3io" name="btn_ready--" src="rj0b83" fileName="component/Btn_Yellow.xml" xy="-6495,-9900" size="227,73" group="n36_k3io" scale="1.5,1.5">
<gearDisplay controller="action" pages="0,1"/>
<gearXY controller="action" pages="2,0,1" values="5554,3710|-6495,-9900|1738,4382"/>
<Button icon="ui://9a4y35xkrj0bhp"/>
</component>
<component id="n35_k3io" name="btn_start" src="rj0bi7" fileName="buttons/Btn_Yellow.xml" xy="-295,-3108" group="n36_k3io" visible="false">
<gearDisplay controller="action" pages="1"/>
<Button icon="ui://9a4y35xkrj0bi8"/>
</component>
<component id="n118_mncc" name="btn_xipai" src="rj0bi7" fileName="buttons/Btn_Yellow.xml" xy="-73,-3094" group="n36_k3io" scale="1,0.9">
<gearDisplay controller="action" pages="1"/>
<Button icon="ui://9a4y35xkrj0b9l"/>
</component>
<group id="n36_k3io" name="n36" xy="-6495,-9900" size="6606,6891" advanced="true">
<gearDisplay controller="state" pages="0"/>
<relation target="" sidePair="bottom-bottom,center-center"/>
</group>
<text id="n61_agtp" name="tex_version" xy="1225,2164" size="130,38" scale="1.5,1.5" fontSize="30" color="#ffffff" align="center" autoSize="none" text="V2.0.2">
<gearDisplay controller="state" pages="0,1,2"/>
</text>
<component id="n77_ij2y" name="gcm_chat" src="rj0bij" fileName="Gcm_chat.xml" xy="2294,1604" visible="false"/>
<component id="n79_roef" name="btn_distance" src="rj0bhy" fileName="component/gps/btn_distance_new.xml" xy="655,1848" visible="false" touchable="false">
<gearDisplay controller="state" pages="0,1,2"/>
<relation target="n86_q50p" sidePair="right-right"/>
</component>
<component id="n82_q50p" name="right_panel" src="rj0bi1" fileName="component/RightPanel.xml" xy="124,2441" size="1334,108" group="n86_q50p" scale="1.5,1.5">
<gearDisplay controller="state" pages="0,1,2,3"/>
</component>
<component id="n83_q50p" name="roominfo_panel1" src="rj0bi4" fileName="component/RoomInfoPanel1.xml" xy="974,1930" size="274,41" group="n86_q50p" scale="1.5,1.5" touchable="false"/>
<component id="n84_q50p" name="btn_back_lobby__" src="rj0bf6" fileName="component/poker/Btn_back_lobby.xml" xy="510,1878" size="58,75" group="n86_q50p" scale="1.5,1.5">
<gearDisplay controller="state" pages="0,3"/>
</component>
<component id="n85_q50p" name="btn_rule--" src="rj0bf9" fileName="component/poker/Btn_log.xml" xy="332,1878" group="n86_q50p" scale="1.5,1.5"/>
<component id="n87_q50p" name="roominfo_panel" src="rj0bi4" fileName="component/RoomInfoPanel1.xml" xy="732,1734" size="150,77" group="n86_q50p" scale="1.5,1.5" touchable="false"/>
<component id="n120_r1z9" name="btn_leave_lobby" src="rj0bff" fileName="component/poker/Btn_leave_lobby.xml" xy="631,1878" group="n86_q50p" scale="1.5,1.5">
<gearDisplay controller="state" pages="0,3"/>
</component>
<group id="n86_q50p" name="n86" xy="124,1734" size="1334,815" advanced="true">
<relation target="" sidePair="center-center"/>
</group>
<component id="n75_jmab" name="poker_eff" src="rj0bad" fileName="component/effect/poker/poker_eff.xml" xy="1197,469" touchable="false">
<gearDisplay controller="card_eff" pages="1"/>
<gearXY controller="card_eff" pages="0,1" values="1197,469|618,10"/>
<gearLook controller="card_eff" default="1,0,0,0"/>
</component>
<image id="n90_j7ij" name="n90" src="rj0bfa" fileName="component/poker/card.png" xy="227,2039" size="169,233" group="n93_eclw" scale="0.6,0.6">
<gearDisplay controller="state" pages="1"/>
</image>
<image id="n92_eclw" name="n92" src="rj0beq" fileName="component/newcard/00.png" xy="241,2053" size="72,100" group="n93_eclw"/>
<component id="n94_eclw" name="shengyu" src="rj0bbf" fileName="component/head/shengyu.xml" xy="230,2167" size="120,40" group="n93_eclw"/>
<group id="n93_eclw" name="n93" xy="227,2039" size="169,233" visible="false" advanced="true">
<gearDisplay controller="state" pages="1"/>
</group>
<list id="n88_j7ij" name="otherpoker_list" xy="62,1939" size="448,201" touchable="false" layout="pagination" selectionMode="none" overflow="scroll" lineGap="-39" colGap="-25" defaultItem="ui://9a4y35xkrj0b8l">
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
<item url="ui://9a4y35xkrj0bf1"/>
</list>
<text id="n74_bzpj" name="round" xy="1404,2343" size="101,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" autoSize="none" text=" 1/10局">
<gearDisplay controller="state" pages="1,3"/>
</text>
<component id="n100_n6fs" name="btn_back_jiesan" src="rj0bfb" fileName="component/poker/Btn_back_jiesan.xml" xy="844,1976" size="110,75" scale="1.5,1.5">
<gearDisplay controller="state" pages="1"/>
</component>
<graph id="n102_t2e2" name="n109" xy="342,-1343" size="1670,834" visible="false" type="rect" lineSize="0" fillColor="#80000000"/>
<component id="n101_t2e2" name="tuoguanzhong" src="rj0bip" fileName="component/tuoguanzhong.xml" xy="996,2338" visible="false"/>
<component id="n18" name="player_info2" src="rj0b74" fileName="Main_New/PlayerHead_1.xml" xy="2219,277" size="156,126" group="n121_ckvb">
<gearXY controller="state" pages="0,1,2,3" values="2219,277|2219,277|2336,32|2372,4" default="2359,17"/>
<relation target="" sidePair="right-right,middle-middle"/>
</component>
<component id="n7" name="player_info1" src="rj0b74" fileName="Main_New/PlayerHead_1.xml" xy="18,906" size="157,131" group="n121_ckvb">
<gearXY controller="state" pages="0,1,2,3" values="18,906|18,906|80,495|9,721" default="18,586"/>
<relation target="" sidePair="left-left,bottom-bottom"/>
</component>
<component id="n156_11k4t" name="player_info3" src="rj0b74" fileName="Main_New/PlayerHead_1.xml" xy="1688,42" size="156,126" group="n121_ckvb">
<gearXY controller="state" pages="0,1,2,3" values="1688,62|1688,42|2336,32|21,16" default="18,17"/>
<relation target="" sidePair="right-right,middle-middle"/>
</component>
<component id="n174_lnjn" name="player_info4" src="rj0b74" fileName="Main_New/PlayerHead_1.xml" xy="18,277" size="156,126" group="n121_ckvb">
<gearXY controller="state" pages="0,1,2,3" values="88,277|18,277|2336,32|21,16" default="18,17"/>
<relation target="" sidePair="right-right,middle-middle"/>
</component>
<group id="n121_ckvb" name="playiinfo" xy="18,42" size="2357,995"/>
<component id="n69_sdax" name="player_card_info_1" src="rj0b81" fileName="Main_New/Player_card_info_1.xml" xy="126,841" group="n122_ckvb">
<gearDisplay controller="state" pages="1,3,4"/>
<gearLook controller="state" pages="3" values="1,0,0,1" default="1,0,0,1"/>
<relation target="" sidePair="bottom-bottom"/>
</component>
<component id="n71_sdax" name="player_card_info_2" src="rj0b8k" fileName="Main_New/Player_card_info_2.xml" xy="395,335" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/>
</component>
<component id="n157_11k4t" name="player_card_info_4" src="rj0b8r" fileName="Main_New/Player_card_info_3.xml" xy="449,265" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/>
</component>
<component id="n175_lnjn" name="player_card_info_3" src="rj0b8k" fileName="Main_New/Player_card_info_2.xml" xy="-100,82" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/>
</component>
<group id="n122_ckvb" name="playCardInfo" xy="-100,82" size="2506,1087"/>
<component id="n152_n9qr" name="btn_inviteFamily" src="rj0b8y" fileName="Main_new/Main/Component/btn_normol.xml" xy="2404,264" size="129,243" visible="false">
<gearDisplay controller="state" pages="0"/>
<relation target="" sidePair="right-right"/>
<Button icon="ui://9a4y35xkrj0b8w"/>
</component>
<component id="n123_ckvb" name="btn_closeRoom" src="rj0b1x" fileName="Main_New/Component/Btn_CloseRoom.xml" xy="1319,488" size="378,127" group="n126_ckvb">
<relation target="" sidePair="width-width%,height-height%,left-center%,top-top%"/>
</component>
<component id="n124_ckvb" name="btn_invite" src="rj0b1v" fileName="Main_New/Component/Btn_Invite.xml" xy="831,488" size="378,127" group="n126_ckvb">
<relation target="" sidePair="width-width%,height-height%,right-center%,top-top%"/>
</component>
<component id="n125_ckvb" name="btn_ready" src="rj0b1t" fileName="Main_New/Component/Btn_Ready.xml" xy="1078,714" size="378,127" group="n126_ckvb">
<gearDisplay controller="action" pages="0,1"/>
<relation target="" sidePair="width-width%,height-height%,center-center,top-middle%"/>
</component>
<component id="n148_n9qr" name="btn_back_lobby__" src="rj0b1x" fileName="Main_New/Component/Btn_CloseRoom.xml" xy="1300,481" group="n126_ckvb" visible="false">
<relation target="" sidePair="right-right,top-middle"/>
</component>
<group id="n126_ckvb" name="readyBtn" xy="831,481" size="866,360" advanced="true">
<gearDisplay controller="state" pages="0,2"/>
</group>
<component id="n127_ckvb" name="btn_sendText" src="rj0b1r" fileName="Main_New/Component/Btn_Message.xml" xy="2337,507" size="135,116" group="n129_ckvb" visible="false">
<relation target="" sidePair="right-right,top-top%"/>
</component>
<component id="n142_eqmd" name="btn_sendTalk" src="rj0b2h" fileName="Main_New/Component/Btn_MessageTalk.xml" xy="2335,642" size="135,120" group="n129_ckvb">
<relation target="" sidePair="right-right,top-top%"/>
</component>
<group id="n129_ckvb" name="left" xy="2335,507" size="137,255"/>
<component id="n153_n9qr" name="btn_ready_inClear" src="rj0b1t" fileName="Main_New/Component/Btn_Ready.xml" xy="1078,712" size="378,127">
<gearDisplay controller="Inclear" pages="1"/>
<relation target="" sidePair="width-width%,height-height%,center-center,top-middle%"/>
</component>
<component id="n140_ckvb" name="Comp_Clock" src="rj0b1i" fileName="Main_New/Component/Comp_Clock.xml" xy="388,492" visible="false">
<gearDisplay controller="time" pages="1,2,3"/>
<gearXY controller="time" pages="1,2" values="729,667|2133,159" default="388,492"/>
</component>
<component id="n166_f11o" name="n166" src="rj0bad" fileName="component/effect/poker/poker_eff.xml" xy="1201,489" visible="false"/>
<component id="n130_ckvb" name="btn_pangGuang" src="rj0b20" fileName="Main_New/Component/Btn_Spectator.xml" xy="77,23" size="90,76" group="n131_ckvb">
<relation target="" sidePair="right-center%,top-top"/>
</component>
<component id="n132_ckvb" name="PB_Battery" src="rj0b22" fileName="Main_New/Component/PB_Battery.xml" xy="199,24" size="110,42" group="n131_ckvb">
<relation target="" sidePair="right-center%,top-top"/>
<ProgressBar value="100" max="100"/>
</component>
<text id="n133_ckvb" name="Text_Time" xy="200,58" size="117,57" group="n131_ckvb" font="FZCuYuan-M03" fontSize="42" color="#ffffff" letterSpacing="2" singleLine="true" text="18:18">
<relation target="n132_ckvb" sidePair="center-center,top-bottom"/>
</text>
<component id="n128_ckvb" name="btn_setting" src="rj0b1p" fileName="Main_New/Component/Btn_Setting.xml" xy="1312,22" size="90,78" group="n131_ckvb">
<relation target="" sidePair="left-center%,top-top"/>
</component>
<image id="n134_ckvb" name="n134" src="rj0b3u" fileName="Main_New/Image/gamexzmj_68.png" xy="334,27" size="203,62" group="n131_ckvb">
<relation target="" sidePair="right-center%,top-top"/>
</image>
<text id="n137_ckvb" name="text_roomIdName" xy="560,26" size="117,61" group="n131_ckvb" font="FZCuYuan-M03" fontSize="46" color="#ffffff" letterSpacing="4" singleLine="true" text="房间:&#xA;">
<relation target="" sidePair="right-center%,top-top"/>
</text>
<text id="n151_n9qr" name="text_roomId" xy="679,24" size="187,67" group="n131_ckvb" font="FZCuYuan-M03" fontSize="50" color="#ece7b9" letterSpacing="3" singleLine="true" text="372507">
<relation target="n137_ckvb" sidePair="left-right,top-top"/>
</text>
<component id="n138_ckvb" name="btn_rule" src="rj0b25" fileName="Main_New/Component/Btn_GamePlay.xml" xy="886,27" size="138,67" group="n131_ckvb">
<relation target="" sidePair="left-center%,top-top"/>
</component>
<component id="n139_ckvb" name="Btn_Check" src="rj0b27" fileName="Main_New/Component/Btn_Check.xml" xy="1040,15" size="250,87" group="n131_ckvb">
<relation target="" sidePair="left-center%,top-top"/>
</component>
<text id="n135_ckvb" name="Text_CurrenRound" xy="367,30" size="29,59" group="n155_diqo" font="FZCuYuan-M03" fontSize="44" color="#ffe26d" singleLine="true" text="0">
<relation target="" sidePair="top-top"/>
<relation target="n136_ckvb" sidePair="right-left"/>
</text>
<text id="n136_ckvb" name="Text_MaxMaxRound" xy="394,29" size="115,59" group="n155_diqo" font="FZCuYuan-M03" fontSize="44" color="#ffffff" letterSpacing="2" singleLine="true" text="/10局">
<relation target="" sidePair="top-top"/>
</text>
<group id="n155_diqo" name="n155" xy="367,29" size="140,60" group="n131_ckvb" advanced="true">
<relation target="n134_ckvb" sidePair="center-center,middle-middle"/>
</group>
<group id="n131_ckvb" name="top" xy="77,15" size="1325,99" advanced="true">
<relation target="" sidePair="top-top"/>
</group>
<graph id="n143_cksh" name="n143" xy="0,0" size="2532,1170" group="n144_cksh" type="rect" lineSize="0" fillColor="#73000000"/>
<image id="n146_cksh" name="n146" src="rj0b3k" fileName="Main_New/Image/Group 205.png" xy="1203,522" group="n144_cksh"/>
<text id="n147_cksh" name="n147" xy="1024,667" size="484,79" group="n144_cksh" fontSize="60" color="#ffffff" text="松开按钮发送语音"/>
<group id="n144_cksh" name="chatTalk" xy="0,0" size="2532,1170" visible="false" advanced="true"/>
<component id="n163_bm7d" name="com_notice" src="rj0b92" fileName="Main_new/com_notice.xml" xy="681,164" size="1169,62">
<relation target="" sidePair="top-top"/>
</component>
<component id="n149_n9qr" name="comp_voice" src="rj0b8u" fileName="Main_new/Chat/Component/Comp_VoiceBegin.xml" xy="0,0">
<gearDisplay controller="voice" pages="1"/>
<relation target="" sidePair="width-width,height-height"/>
</component>
<graph id="n159_ukp7" name="n159" xy="886,999" size="760,92" type="rect" lineSize="0" fillColor="#4c000000">
<gearDisplay controller="state" pages="4"/>
<relation target="" sidePair="center-center,bottom-bottom"/>
</graph>
<text id="n160_ukp7" name="n160" xy="1103,1004" size="326,81" font="FZCuYuan-M03" fontSize="62" color="#ffffff" letterSpacing="3" text="正在旁观中">
<gearDisplay controller="state" pages="4"/>
<relation target="" sidePair="center-center,bottom-bottom"/>
</text>
<component id="n161_ukp7" name="n161" src="rj0b36" fileName="Main_New/Component/btn_bg.xml" xy="0,0" size="2532,1170">
<gearDisplay controller="witness" pages="1"/>
<relation target="" sidePair="width-width,height-height"/>
<Button controller="witness" page="0"/>
</component>
<component id="n162_ukp7" name="comp_witness" src="rj0b2z" fileName="Main_New/Component/comp_witness.xml" xy="2537,30">
<gearDisplay controller="witness" pages="1"/>
<gearXY controller="witness" pages="0" values="2537,30" default="2097,30" tween="true" ease="Linear" duration=".5"/>
</component>
<component id="n167_o2zr" name="mask_tips" src="rj0blt" fileName="Main_style_2/Component1.xml" xy="1260,910" group="n173_o2zr">
<relation target="" sidePair="center-center"/>
</component>
<graph id="n168_o2zr" name="bg_playback" xy="0,0" size="2532,1170" group="n173_o2zr" type="rect" lineSize="0" fillColor="#00ffffff">
<gearDisplay controller="state" pages="3"/>
</graph>
<component id="n169_o2zr" name="btn_rule_back" src="rj0b8z" fileName="Main_new/Main/Component/btn_normol(1).xml" xy="215,35" size="115,111" group="n172_o2zr">
<gearDisplay controller="state" pages="3"/>
<Button icon="ui://9a4y35xkrj0b8x"/>
</component>
<component id="n170_o2zr" name="btn_back_lobby" src="rj0b93" fileName="Main_style_2/poker/Btn_back_lobby.xml" xy="87,59" size="81,75" group="n172_o2zr" scale="2,2">
<gearDisplay controller="state" pages="3"/>
</component>
<component id="n171_o2zr" name="panel_record" src="rj0blu" fileName="component/record/Record_New.xml" xy="0,854" group="n172_o2zr">
<gearDisplay controller="state" pages="3"/>
</component>
<group id="n172_o2zr" name="huifang" xy="0,35" size="2532,984" group="n173_o2zr" advanced="true"/>
<group id="n173_o2zr" name="playback" xy="0,0" size="2532,1170"/>
</displayList>
<transition name="t1">
<item time="0" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="1" duration="18"/>
<item time="0" type="XY" target="n75_jmab" tween="true" startValue="618,0" endValue="618,497" duration="18"/>
<item time="18" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="0" duration="6"/>
</transition>
<transition name="t2">
<item time="0" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="1" duration="18"/>
<item time="0" type="XY" target="n75_jmab" tween="true" startValue="618,0" endValue="1100,250" duration="18"/>
<item time="18" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="0" duration="6"/>
</transition>
<transition name="t3">
<item time="0" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="1" duration="18"/>
<item time="0" type="XY" target="n75_jmab" tween="true" startValue="618,0" endValue="150,250" duration="18"/>
<item time="18" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="0" duration="6"/>
</transition>
<transition name="to_1">
<item time="0" type="Rotation" target="n166_f11o" value="0"/>
<item time="0" type="Visible" target="n166_f11o" value="true"/>
<item time="0" type="XY" target="n166_f11o" value="1201,489"/>
<item time="6" type="XY" target="n166_f11o" tween="true" startValue="1201,489" endValue="1201,909" duration="18" ease="Linear"/>
<item time="24" type="Visible" target="n166_f11o" value="false"/>
</transition>
<transition name="to_2">
<item time="0" type="Rotation" target="n166_f11o" value="0"/>
<item time="0" type="Visible" target="n166_f11o" value="true"/>
<item time="0" type="XY" target="n166_f11o" value="1201,489"/>
<item time="6" type="Rotation" target="n166_f11o" value="-90"/>
<item time="6" type="XY" target="n166_f11o" tween="true" startValue="1201,669" endValue="2276,213" duration="18" ease="Linear"/>
<item time="24" type="Visible" target="n166_f11o" value="false"/>
</transition>
<transition name="to_3">
<item time="0" type="Rotation" target="n166_f11o" value="0"/>
<item time="0" type="Visible" target="n166_f11o" value="true"/>
<item time="0" type="XY" target="n166_f11o" value="1201,489"/>
<item time="6" type="Rotation" target="n166_f11o" value="90"/>
<item time="6" type="XY" target="n166_f11o" tween="true" startValue="1401,489" endValue="251,77" duration="18" ease="Linear"/>
<item time="24" type="Visible" target="n166_f11o" value="false"/>
</transition>
</component>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="84,161">
<controller name="voice" pages="0,,1," selected="0"/>
<controller name="sdk" pages="0,,1," selected="0"/>
<displayList>
<component id="n1_h1uu" name="n1" src="rj0bik" fileName="Btn_chat.xml" xy="8,87" controller="ban,0">
<Button icon="ui://9a4y35xkrj0bil"/>
</component>
<component id="n2_h1uu" name="n2" src="rj0bb9" fileName="component/VoiceMask(1).xml" xy="7,-47">
<gearDisplay controller="voice" pages="1"/>
</component>
<component id="n3_h1uu" name="btn_record" src="rj0bik" fileName="Btn_chat.xml" xy="8,0" controller="ban,0">
<gearDisplay controller="sdk" pages="0"/>
<Button icon="ui://9a4y35xkrj0bio"/>
</component>
</displayList>
</component>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" extention="Button">
<controller name="ctr_cancel" pages="0,,1," selected="1"/>
<displayList>
<graph id="n0_dlc4" name="n0" xy="0,0" size="2532,1170" type="rect" lineSize="0" fillColor="#73000000">
<relation target="" sidePair="width-width,height-height"/>
</graph>
<image id="n1_dlc4" name="n1" src="rj0b1c" fileName="Main_new/Chat/Image/GameCommon54.png" xy="1175,469" size="181,172">
<relation target="n2_dlc4" sidePair="center-center,bottom-top"/>
</image>
<text id="n2_dlc4" name="n2" xy="1018,667" size="496,79" font="ui://9a4y35xkrj0b1d" fontSize="60" color="#bc1016" text="手指松开,取消发送">
<gearColor controller="ctr_cancel" pages="1" values="#bc1016,#000000" default="#ffffff,#000000"/>
<gearText controller="ctr_cancel" pages="0,1" values="手指上划,取消发送|手指松开,取消发送"/>
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<text id="n3_dlc4" name="title" xy="1355,449" size="64,79" font="ui://9a4y35xkrj0b1d" fontSize="60" color="#ffffff" text="0&quot;">
<relation target="n1_dlc4" sidePair="left-right,top-top"/>
</text>
</displayList>
<Button/>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="189,69" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b28" fileName="Main_New/Image/button_checkWaiGua.png" xy="0,0" size="189,69">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.1"/>
</component>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,126" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<controller name="cStyle" pages="0,,1," selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b1y" fileName="Main_New/Image/button_02.png" xy="0,0" size="360,126">
<gearDisplay controller="cStyle" pages="0"/>
<relation target="" sidePair="width-width,height-height"/>
</image>
<image id="n4_n9qr" name="n4" src="rj0b1z" fileName="Main_New/Image/button_01.png" xy="0,0" size="360,126">
<gearDisplay controller="cStyle" pages="1"/>
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="dark" downEffectValue="0.8"/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="112,67" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b26" fileName="Main_New/Image/button_wanfa.png" xy="0,0" size="112,67">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.1"/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,126" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b1w" fileName="Main_New/Image/button_03.png" xy="0,0" size="360,126">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="dark" downEffectValue="0.8"/>
</component>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="120,120" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ckvb" name="n3" src="rj0b1s" fileName="Main_New/Image/button_chat.png" xy="0,0" size="120,120">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="scale" downEffectValue="1.1"/>
</component>

Some files were not shown because too many files have changed in this diff Show More