跺跺牌基本测试通过

master
lingmeng 2026-01-20 18:46:16 +08:00
parent e5549e1cc3
commit 2270a9f6df
317 changed files with 5710 additions and 2678 deletions

View File

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

View File

@ -126,9 +126,20 @@ end
local join_room_frame = 0 local join_room_frame = 0
function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) -- function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
printlog("公共进入房间接口=============PublicJoinRoom")
print("test,亲友圈ID是", group_id) function M:PublicJoinRoom(data, callback)
data = data or {}
local cmd = data.cmd
local roomid = data.roomid
local is_null = data.is_null or false
local group_id = data.group_id
local pid = data.pid
local selectSeat = data.selectSeat
if not cmd or not group_id then
ViewUtil:ErrorTip("加入房间方法调用失败")
return
end
-- 同一帧不重复调用 -- 同一帧不重复调用
local last_frame = join_room_frame local last_frame = join_room_frame
join_room_frame = Time.frameCount join_room_frame = Time.frameCount
@ -140,7 +151,7 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
local _data = {} local _data = {}
if cmd == Protocol.WEB_FG_MATCH_ROOM then if cmd == Protocol.WEB_FG_MATCH_ROOM then
_data["is_null"] = tem _data["is_null"] = is_null
--获得玩法配置定位信息,如果开启了配置则必须强制有定位才能进入房间 --获得玩法配置定位信息,如果开启了配置则必须强制有定位才能进入房间
local play = DataManager.groups:get(group_id):getPlay(pid) local play = DataManager.groups:get(group_id):getPlay(pid)
local pos = "" local pos = ""
@ -151,7 +162,14 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
get_gps(nil, { get_gps(nil, {
_callback_lad = function(flag) _callback_lad = function(flag)
if flag then if flag then
self:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) self:PublicJoinRoom({
cmd = cmd,
roomid = roomid,
is_null = is_null,
group_id = group_id,
pid = pid,
selectSeat = selectSeat
}, callback)
return return
end end
ViewUtil.ErrorMsg(nil, 55, "未开启gps定位不能创建gps定位房") ViewUtil.ErrorMsg(nil, 55, "未开启gps定位不能创建gps定位房")
@ -189,7 +207,14 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
-- res.ReturnCode = -2 -- res.ReturnCode = -2
-- callback(res) -- callback(res)
self:PublicJoinRoom(Protocol.WEB_FG_JOIN_ROOM, json["room_id"], tem, callback, group_id, pid) self:PublicJoinRoom({
cmd = Protocol.WEB_FG_JOIN_ROOM,
roomid = json["room_id"],
is_null = is_null,
group_id = group_id,
pid = pid,
selectSeat = selectSeat
}, callback)
end) end)
return return
end end
@ -224,6 +249,7 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
DataManager.SelfUser.location = Location.new() DataManager.SelfUser.location = Location.new()
end end
j_data["pos"] = DataManager.SelfUser.location:Location2String() j_data["pos"] = DataManager.SelfUser.location:Location2String()
j_data.selectSeat = selectSeat
printlog("++++++++++++++++++++++++++++++++++++++++++") printlog("++++++++++++++++++++++++++++++++++++++++++")
__ConntectGameServer(Protocol.GAME_JOIN_ROOM, room, room.server_host, j_data, function(res1) __ConntectGameServer(Protocol.GAME_JOIN_ROOM, room, room.server_host, j_data, function(res1)
printlog("===============================-------------") printlog("===============================-------------")

View File

@ -26,7 +26,7 @@ BaseWindow = {
--全屏偏移 --全屏偏移
_full_offset = true, _full_offset = true,
--新窗口隐藏队列 --新窗口隐藏队列
_new_hide = true, _new_hide = false,
--模糊组件对象 --模糊组件对象
_put_map = true _put_map = true
} }

View File

@ -33,6 +33,7 @@ function M:init(url)
--亲友圈列表 --亲友圈列表
self._viewList_familyList = view:GetChild('familyList') self._viewList_familyList = view:GetChild('familyList')
self._viewList_familyList.itemRenderer = handler(self, self.FamilyListRenderer) self._viewList_familyList.itemRenderer = handler(self, self.FamilyListRenderer)
self._viewList_familyList.onClickItem:Set(handler(self,self.ClickFamilyList))
view:GetController('showList').onChanged:Set(function(context) view:GetController('showList').onChanged:Set(function(context)
if context.sender.selectedIndex == 0 then if context.sender.selectedIndex == 0 then
@ -71,12 +72,12 @@ function M:init(url)
--管理页面 --管理页面
view:GetChild('btn_manager').onClick:Set(function() view:GetChild('btn_manager').onClick:Set(function()
FamilyManagerView.new({pageType=1}) FamilyManagerView.new({ pageType = 1 })
end) end)
--成员页面 --成员页面
view:GetChild('btn_menber').onClick:Set(function() view:GetChild('btn_menber').onClick:Set(function()
FamilyManagerView.new({pageType=2}) FamilyManagerView.new({ pageType = 2 })
end) end)
--新玩法管理 --新玩法管理
@ -111,7 +112,7 @@ function M:FamilyTableRenderer(index, obj)
local head = obj:GetChild(string.format("head%s", i)) local head = obj:GetChild(string.format("head%s", i))
head:GetChild('btn_head').icon = "" head:GetChild('btn_head').icon = ""
head.onClick:Set(function(context) head.onClick:Set(function(context)
self:ClickMachRoom(context, tmp) self:ClickMachRoom(context, tmp, i)
end) end)
end end
obj:GetChild('icon').onClick:Set(function(context) obj:GetChild('icon').onClick:Set(function(context)
@ -120,6 +121,9 @@ function M:FamilyTableRenderer(index, obj)
if self._view:GetController('showPlayDetail').selectedIndex == 1 then if self._view:GetController('showPlayDetail').selectedIndex == 1 then
self:ClickTableShowDetail({ type = 1, info = tmp, index = index }) self:ClickTableShowDetail({ type = 1, info = tmp, index = index })
end end
obj:GetChild('text_roundNum').text = string.format("(0/%s)",
ExtendManager.GetExtendConfig(tmp.gameId):GetGameInfo():LoadConfigOneInfo(tmp.config, tmp.hpData, "maxRound") or
0)
elseif index - #playList < #roomList then --存在的桌子 elseif index - #playList < #roomList then --存在的桌子
local roomInfo = roomList[index - #playList + 1] local roomInfo = roomList[index - #playList + 1]
tmp = self._group:getPlay(roomInfo.pid) tmp = self._group:getPlay(roomInfo.pid)
@ -135,7 +139,7 @@ function M:FamilyTableRenderer(index, obj)
btn:GetController('zuo').selectedIndex = 0 btn:GetController('zuo').selectedIndex = 0
btn:GetChild("btn_head").icon = "ui://Family/icon_luozuo" btn:GetChild("btn_head").icon = "ui://Family/icon_luozuo"
btn.onClick:Set(function(context) btn.onClick:Set(function(context)
self:ClickJoinRoom(context, roomInfo) self:ClickJoinRoom(context, roomInfo, i)
end) end)
end end
end end
@ -145,15 +149,19 @@ function M:FamilyTableRenderer(index, obj)
if self._view:GetController('showPlayDetail').selectedIndex == 1 then if self._view:GetController('showPlayDetail').selectedIndex == 1 then
self:ClickTableShowDetail({ type = 2, info = roomInfo, index = index }) self:ClickTableShowDetail({ type = 2, info = roomInfo, index = index })
end end
obj:GetChild('text_roundNum').text = string.format("(%s/%s)", roomInfo.round, roomInfo.times)
end end
obj:GetController('playerNum').selectedIndex = tmp.maxPlayers - 2 obj:GetController('playerNum').selectedIndex = tmp.maxPlayers - 2
obj:GetChild('text_playName').text = tmp.name obj:GetChild('text_playName').text = tmp.name
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) obj.icon = string.format("ui://Family/icon_table%s", (self.localTextDesk[tmp.gameId] or 0) + 1)
end end
--点击切换亲友圈
function M:ClickFamilyList(context)
local index = context.sender.selectedIndex
self:EnterFamily(index+1)
end
--进入亲友圈 --进入亲友圈
function M:EnterFamily(index_family, only) function M:EnterFamily(index_family, only)
local groups = DataManager.groups.groupList local groups = DataManager.groups.groupList
@ -192,13 +200,17 @@ function M:UpdateRoom()
end end
--点击玩法创建桌子 --点击玩法创建桌子
function M:ClickMachRoom(context, playinfo) function M:ClickMachRoom(context, playinfo, selectSeat)
local group = DataManager.CurrenGroup local group = DataManager.CurrenGroup
local roomCtr = ControllerManager.GetController(RoomController) local roomCtr = ControllerManager.GetController(RoomController)
roomCtr:PublicJoinRoom( roomCtr:PublicJoinRoom({
Protocol.WEB_FG_MATCH_ROOM, cmd = Protocol.WEB_FG_MATCH_ROOM,
"", roomid = "",
true, is_null = true,
group_id = group.id,
pid = playinfo.id,
selectSeat = selectSeat
},
function(response) function(response)
if (response.ReturnCode == -1) then if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2() ViewUtil.CloseModalWait2()
@ -221,9 +233,9 @@ function M:ClickMachRoom(context, playinfo)
{ _flag_showTip = true }) { _flag_showTip = true })
ViewUtil.CloseModalWait2() ViewUtil.CloseModalWait2()
end end
end, end
group.id,
playinfo.id
) )
end end
@ -240,11 +252,11 @@ function M:ClickTableShowDetail(data)
local playinfo = data.info local playinfo = data.info
detailView:GetChild('btn_createRoom').onClick:Set(function(context) detailView:GetChild('btn_createRoom').onClick:Set(function(context)
self:ClickMachRoom(context, data.info) self:ClickMachRoom(context, data.info, 0)
end) end)
detailView:GetChild('btn_joinRoom').onClick:Set(function(context) detailView:GetChild('btn_joinRoom').onClick:Set(function(context)
self:ClickJoinRoom(context, data.info) self:ClickJoinRoom(context, data.info, 0)
end) end)
detailView:GetChild('btn_inviteRoom').onClick:Set(function(context) detailView:GetChild('btn_inviteRoom').onClick:Set(function(context)
@ -303,13 +315,19 @@ function M:JieSanRomm(groupId, roomId)
end end
--点击桌子进入游戏 --点击桌子进入游戏
function M:ClickJoinRoom(context, room) function M:ClickJoinRoom(context, room, selectSeat)
local group = DataManager.CurrenGroup local group = DataManager.CurrenGroup
local roomCtr = ControllerManager.GetController(RoomController) local roomCtr = ControllerManager.GetController(RoomController)
roomCtr:PublicJoinRoom( roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM, {
room.id, cmd = Protocol.WEB_FG_JOIN_ROOM,
true, roomid = room.id,
is_null = true,
group_id = group.id,
pid = room.pid,
selectSeat = selectSeat
},
function(response) function(response)
if (response.ReturnCode == -1) then if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2() ViewUtil.CloseModalWait2()
@ -329,9 +347,7 @@ function M:ClickJoinRoom(context, room)
{ _flag_showTip = true }) { _flag_showTip = true })
ViewUtil.CloseModalWait2() ViewUtil.CloseModalWait2()
end end
end, end
group.id,
room.pid
) )
end end

View File

@ -0,0 +1,121 @@
local FamilyChooseTimeView = {}
local M = FamilyChooseTimeView
function FamilyChooseTimeView.new(data, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "FamilyChooseTimeView"
self._data = data
self._callback = callback
self._close_destroy = true
self:init("ui://Family/FamilyChooseTime")
return self
end
function M:init(url)
getmetatable(M).__index.init(self, url)
local view = self._view
self._viewList = view:GetChild('list')
self._viewList:SetVirtual()
self._viewList.itemRenderer = handler(self, self.ListRenderer)
self._viewList.onClickItem:Set(handler(self, self.ClickListItem))
view:GetChild('btn_confirm').onClick:Set(function()
self._callback(self._data_times[self._left_Index], self._data_times[self._right_Index])
self:Destroy()
end)
view:GetChild('btn_cancel').onClick:Set(function()
self:Destroy()
end)
self:FillData()
end
function M:InitTime()
local dataTable = os.date("*t")
dataTable.hour = 0
dataTable.min = 0
dataTable.sec = 0
local timeStasmp = os.time(dataTable)
return timeStasmp
end
function M:ClickListItem(context)
local item = context.data
local index = self._viewList:GetChildIndex(item) + 1
if index > self._selectedIndex then
self._left_Index = self._selectedIndex
self._right_Index = index
else
self._right_Index = self._selectedIndex
self._left_Index = index
end
self._selectedIndex = index
self._viewList:RefreshVirtualList()
end
function M:ListRenderer(index, obj)
if index >= self._left_Index - 1 and index < self._right_Index then
obj.selected = true
else
obj.selected = false
end
if index == 0 then
obj.text = "今天"
return
end
if index == 1 then
obj.text = "昨天"
return
end
obj.text = os.date("%d", self._data_times[index + 1])
end
function M:FillData()
local data = self._data
local days = data.days or 7
self._data_times = {}
local dataTable = os.date("*t")
dataTable.hour = 0
dataTable.min = 0
dataTable.sec = 0
local timeStasmp = os.time(dataTable)
local leftTime = data.left or timeStasmp
local rightTime = data.right or timeStasmp
for i = 1, days do
local thisTimeStamp = timeStasmp - (i - 1) * 86400
if leftTime == thisTimeStamp then
self._left_Index = i
end
if rightTime == thisTimeStamp then
self._right_Index = i
end
table.insert(self._data_times, thisTimeStamp)
end
self._selectedIndex = self._left_Index
self._viewList.numItems = days
self:Show()
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

@ -0,0 +1,113 @@
local FamilyUtilInput = import(".FamilyUtilInput")
local FamilyDissolveByRoomView = {}
local M = FamilyDissolveByRoomView
function FamilyDissolveByRoomView.new(data, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "FamilyDissolveByRoomView"
self._data = data
self._callback = callback
self._close_destroy = true
self:init("ui://Family/FamilyDissolveByRoom")
return self
end
function M:init(url)
getmetatable(M).__index.init(self, url)
local view = self._view
self._input = view:GetChild('input_text')
FamilyUtilInput:init(self._input, view:GetChild('comp_input'))
self._ctr_page = view:GetController('page')
view:GetChild('btn_search').onClick:Set(handler(self, self.ClickSearch))
view:GetChild('btn_returnPage0').onClick:Set(handler(self,self.ClickReturnPage0))
view:GetChild('btn_confirmDissolve').onClick:Set(handler(self, self.ClickDissolve))
self:FillData()
end
function M:ClickDissolve()
local _curren_msg =
MsgWindow.new(
self._root_view,
'确定要解散该房间吗?',
MsgWindow.MsgMode.OkAndCancel
)
_curren_msg.onOk:Add(
function()
ViewUtil.ShowModalWait2(self._root_view)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_RemoveRoom(
DataManager.CurrenGroup.id,
self._searchRoom.id,
function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!')
return
else
ViewUtil:ErrorTip('删除房间成功!')
self:ClickReturnPage0()
end
end
)
end
)
_curren_msg:Show()
end
function M:ClickSearch()
local group = DataManager.CurrenGroup
local view = self._view
for i, v in ipairs(group.rooms) do
if v.id == self._input.text then
local playInfo = group:getPlay(v.pid)
self._searchRoom = v
self._ctr_page.selectedIndex = 1
view:GetChild('text_roomType').text = string.format("%s/%s局", v.round, v.times)
view:GetChild('text_roomName').text = playInfo.name
view:GetChild('list_player'):RemoveChildrenToPool()
for i, v1 in ipairs(v.plist) do
local obj = view:GetChild('list_player'):AddItemFromPool()
obj:GetChild('text_name').text = v1.nick
ImageLoad.Load(v1.portrait, obj:GetChild('btn_head')._iconObject)
end
return
end
end
ViewUtil:ErrorTip("没有该房间号。")
end
function M:ClickReturnPage0()
self._searchRoom = nil
self._input.text = ""
self._ctr_page.selectedIndex = 0
end
function M:FillData()
self:Show()
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

@ -0,0 +1,448 @@
local FamilyEventView = {}
local M = FamilyEventView
function FamilyEventView.new(root)
setmetatable(M, { __index = root })
local self = setmetatable({}, { __index = M })
return self
end
function M:AddListener()
local mgr_ctr = self._mgr_ctr
mgr_ctr._cacheEvent:Clear()
mgr_ctr:AddEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay))
mgr_ctr:AddEventListener(GroupMgrEvent.DelPlay, handler(self, self._evtDelPlay))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlay, handler(self, self._evtUpdatePlay))
mgr_ctr:AddEventListener(GroupMgrEvent.AddRoom, handler(self, self._evtAddRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo))
--mgr_ctr:AddEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited))
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup))
mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip))
mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse))
mgr_ctr:AddEventListener(GroupMgrEvent.IsOpenChatRoom, handler(self, self._evtIsOpenChatRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData))
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply))
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord))
mgr_ctr:AddEventListener(GroupMgrEvent.Onpush_assistant, handler(self, self._evtOnPush_assistant))
mgr_ctr:AddEventListener(GroupMgrEvent.OnMemberState, handler(self, self._evtOnMemberState))
mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyReflash, handler(self, self._evtOnFamilyReflash))
mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyRoomReflash, handler(self, self._evtOnFamilyRoomReflash))
mgr_ctr:AddEventListener(GroupMgrEvent.OnFamilyMemberOut, handler(self, self._evtOnFamilyMemberOut))
mgr_ctr:AddEventListener(GroupMgrEvent.OnRefShowStartRoom, handler(self, self._evtOnRefShowStartRoom))
mgr_ctr:AddEventListener(GroupMgrEvent.OnRefNotice, handler(self, self._evtOnRefNotice))
print("家族添加监听")
end
function M:RemoveAll()
local mgr_ctr = self._mgr_ctr
mgr_ctr:RemoveEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay))
mgr_ctr:RemoveEventListener(GroupMgrEvent.DelPlay, handler(self, self._evtDelPlay))
mgr_ctr:RemoveEventListener(GroupMgrEvent.UpdatePlay, handler(self, self._evtUpdatePlay))
mgr_ctr:RemoveEventListener(GroupMgrEvent.AddRoom, handler(self, self._evtAddRoom))
mgr_ctr:RemoveEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom))
mgr_ctr:RemoveEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom))
mgr_ctr:RemoveEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo))
--mgr_ctr:RemoveEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited))
mgr_ctr:RemoveEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup))
mgr_ctr:RemoveEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip))
mgr_ctr:RemoveEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse))
mgr_ctr:RemoveEventListener(GroupMgrEvent.IsOpenChatRoom, handler(self, self._evtIsOpenChatRoom))
mgr_ctr:RemoveEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord))
mgr_ctr:RemoveEventListener(GroupMgrEvent.Onpush_assistant, handler(self, self._evtOnPush_assistant))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnMemberState, handler(self, self._evtOnMemberState))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnFamilyRoomReflash, handler(self, self._evtOnFamilyRoomReflash))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnFamilyMemberOut, handler(self, self._evtOnFamilyMemberOut))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnRefNotice, handler(self, self._evtOnRefShowStartRoom))
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnRefNotice, handler(self, self._evtOnRefNotice))
print("家族去除监听")
end
function M:_evtAddPlay(...)
local arg = { ... }
print("family event _evtAddPlay")
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view:UpdateFamilyRoom(nil, view._group.id)
end
function M:_evtDelPlay(...)
local arg = { ... }
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view:UpdateFamilyRoom(nil, view._group.id)
end
function M:_evtUpdatePlay(...)
local arg = { ... }
print("family event _evtUpdatePlay")
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view:UpdateFamilyRoom(nil, view._group.id)
end
function M:_evtAddRoom(...)
local arg = { ... }
print("family event _evtAddRoom")
end
function M:_evtDelRoom(...)
local arg = { ... }
print("family event _evtDelRoom")
end
function M:_evtUpdateRoom(...)
local arg = { ... }
print("family event _evtUpdateRoom")
end
function M:_evtUpdatePlayerInfo(...)
local arg = { ... }
print("family event _evtUpdatePlayerInfo")
end
function M:_evtInvited(...)
local arg = { ... }
print("family event _evtInvited")
end
function M:_evtUpdateGroup(...)
local arg = { ... }
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
-- 刷新名字
view:ReflashFamilyList()
-- 刷新打烊
view:ReflashBan()
print("family event _evtUpdateGroup")
end
function M:_evtNewMailTip(...)
local arg = { ... }
print("family event _evtNewMailTip")
end
function M:_evtOnNewApply(...)
print("_evtOnNewApply")
local arg = { ... }
pt(arg)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view:ChangeOther()
local AuditNumber = BaseView.FindView("FamilyAuditNumber")
if AuditNumber then
AuditNumber:OnNewApply(arg)
end
end
function M:_evtInviteResponse(...)
local arg = { ... }
local evt_data = arg[1]
local invite_id = evt_data.invite_id
local nik = evt_data.nik
local g_name = evt_data.g_name
local roomid = evt_data.roomid
local pid = evt_data.pid
local groupid = evt_data.groupId
local playInfo = evt_data.pinfo
local roomCtr = ControllerManager.GetController(RoomController)
UIPackage.AddPackage('base/newgroup/ui/FGAssist')
local imv =
FGInvitedMsgView.new(
self._root_view,
groupid,
playInfo,
nik,
function()
roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM,
roomid,
groupid,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1')
-- RestartGame()
return
end
if response.ReturnCode ~= 0 then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
-- ViewManager.ChangeView(ViewManager.View_Lobby)
return
else
UpdateBeat:Remove(self.OnUpdate, self)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id,
{ _flag_showTip = true })
end
end,
groupid,
pid
)
end
)
-- imv:FillData(data)
imv:Show()
end
function M:_evtIsOpenChatRoom(...)
local arg = { ... }
self:ReflashChatRoomBtn()
print("_evtIsOpenChatRoom")
pt(arg)
end
function M:_evtChatRoomData(...)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view.com_FamilyChatRoom:Refalsh()
ViewUtil.CloseModalWait2()
end
function M:_evtOnNewRecord(...)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
local arg = { ... }
view.com_FamilyChatRoom:OnNewChatRefalsh(arg[1])
view:ReflashChatRoomRedPoint()
end
function M:_evtOnMemberState(...)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
view:ReflashMember(...)
--[[
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
local arg = { ... }
local group = DataManager.groups:get(view._group.id)
for _, player in pairs(arg[1].offlineUserId) do
group.memberMap[player].online = 0
end
for _, player in pairs(arg[1].onlineUserId) do
group.memberMap[player].online = 0
end
for _, player in pairs(arg[1].playingUserId) do
group.memberMap[player].playing = "startPlaying"
end
]]
end
function M:_evtOnPush_assistant(...)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
local arg = { ... }
local groupId = arg[1].id
local lev = arg[1].lev
if view._group == nil or groupId ~= view._group.id then
return
end
view:ChangeOther()
end
-- reflashType == "joinFamily" 成功加入了亲友圈
-- reflashType == "outFamily" 成员退出了亲友圈
-- reflashType == "kickoutFamily" 成员被踢出了亲友圈
-- reflashType == "changeJoins" 修改了申请信息
function M:_evtOnFamilyReflash(...)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
local gMgr = ControllerManager.GetController(GroupMgrController)
local group = DataManager.groups:get(gMgr.groupId)
local arg = { ... }
local reflashType = arg[1].reflashType
if reflashType == "joinFamily" then
local uid = arg[1].uid
if DataManager.SelfUser.account_id == uid then
group.lev = 3
view:Reflash()
local tips = "成功加入【%s(%s)】"
tips = string.format(tips, arg[1].name, arg[1].groupId)
local win = MsgWindow.new(view._view, tips, MsgWindow.MsgMode.OnlyOk)
win:Show()
return
end
--新加入的成员没带权限
arg[1].usersDetail.lev = 3
group:addMember(arg[1].usersDetail)
Broadcast.Send(Broadcast.OnMemberChange)
end
if reflashType == "outFamily" then
--local player = DataManager.
--local tips = "成员 【%s(%s)】退出了【%s(%s)】亲友圈"
--string.format(tips, )
--MsgWindow.new(self._root_view, "确定要点过吗?")
end
if reflashType == "changeJoins" then
local uid = arg[1].uid
local joins = arg[1].joins
group.joins = joins
if not group.joinsData or #group.joinsData < 1 then
return
end
for _, data in pairs(group.joinsData) do
if data.id == uid then
table.remove(group.joinsData, _)
end
end
Broadcast.Send(BroadcastEvent.OnJoinsChange)
--[[
view:ChangeOther()
local win = BaseWindow.FindWindow("FamilyAuditNumber")
if win then
win:Reflash()
end
]]
end
end
-- 刷新房间和成员
function M:_evtOnFamilyRoomReflash(...)
local arg = { ... }
print("_evtOnFamilyRoomReflash")
pt(arg)
local groupId = arg[1]
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
if view._group == nil or groupId ~= view._group.id then
return
end
view:UpdateFamilyRoom(nil, groupId)
view:ReflashMember()
end
function M:_evtOnFamilyMemberOut(...)
local arg = { ... }
local arg = arg[1]
local uid = arg.uid
local groupId = arg.groupId
local name = arg.name
local reflashType = arg.reflashType
local group = DataManager.groups:get(groupId)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" or not group then
return
end
local tips = ""
if name == group.name then
tips = "【%s(%s)】亲友圈已解散"
tips = string.format(tips, group.name, groupId)
else
tips = "成员 【%s(%s)】退出了【%s(%s)】亲友圈"
tips = string.format(tips, DataManager.SelfUser.nick_name, DataManager.SelfUser.account_id, group.name, groupId)
end
if uid == DataManager.SelfUser.account_id then
DataManager.groups:del(groupId)
if #DataManager.groups.groupList == 0 then
view._close_destroy = true
ViewManager.ChangeView(ViewManager.View_Lobby)
else
if view._group.id == groupId then
view:Reflash()
end
end
end
local win = MsgWindow.new(view._view, tips, MsgWindow.MsgMode.OnlyOk)
win:Show()
end
function M:_evtOnRefShowStartRoom(...)
local arg = { ... }
local evt_data = arg[1]
-- local view = ViewManager.GetCurrenView()
-- if view.class ~= "FamilyMainView" then
-- return
-- end
printlog("lingmeng _evtOnRefShowStartRoom", self._group.id, evt_data.groupId)
if self._group.id == nil or evt_data.groupId ~= self._group.id then
return
end
self:UpdateFamilyRoom(nil, self._group.id)
end
function M:_evtOnRefNotice(...)
local arg = { ... }
local evt_data = arg[1]
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then
return
end
printlog("lingmeng _evtOnRefShowStartRoom", self._group.id, evt_data.groupId)
if self._group.id == nil or evt_data.groupId ~= self._group.id then
return
end
self:RefNotice(self._group.id)
end
return M

View File

@ -2,6 +2,9 @@
local ManagerChild_GamePlayView = import(".ManagerChild_GamePlayView") local ManagerChild_GamePlayView = import(".ManagerChild_GamePlayView")
local ManagerChild_PlayerView = import(".ManagerChild_PlayerView") local ManagerChild_PlayerView = import(".ManagerChild_PlayerView")
local ManagerChild_SettingView = import(".ManagerChild_SettingView") local ManagerChild_SettingView = import(".ManagerChild_SettingView")
local ManagerChild_BlackView = import(".ManagerChild_BlackView")
local ManagerChild_ForbidSameTableView = import(".ManagerChild_ForbidSameTableView")
local ManagerChild_RecordView = import(".ManagerChild_RecordView")
--成员 --成员
local ManagerMenberChild_PlayerView = import(".ManagerMenberChild_PlayerView") local ManagerMenberChild_PlayerView = import(".ManagerMenberChild_PlayerView")
local ManagerMenberChild_JoinsView = import(".ManagerMenberChild_JoinsView") local ManagerMenberChild_JoinsView = import(".ManagerMenberChild_JoinsView")
@ -17,6 +20,9 @@ M.ManagerTable = {
{ id = 1, title = "基本设置", view = ManagerChild_SettingView }, { id = 1, title = "基本设置", view = ManagerChild_SettingView },
{ id = 2, title = "成员管理", view = ManagerChild_PlayerView }, { id = 2, title = "成员管理", view = ManagerChild_PlayerView },
{ id = 3, title = "快速组局", view = ManagerChild_GamePlayView }, { id = 3, title = "快速组局", view = ManagerChild_GamePlayView },
{ id = 4, title = "小黑屋管理", view = ManagerChild_BlackView },
{ id = 4, title = "禁止同桌", view = ManagerChild_ForbidSameTableView},
{ id = 4, title = "战绩统计", view = ManagerChild_RecordView},
--成员管理页面 --成员管理页面
{ id = 4, title = "成员列表", view = ManagerMenberChild_PlayerView }, { id = 4, title = "成员列表", view = ManagerMenberChild_PlayerView },
{ id = 5, title = "进驻申请", view = ManagerMenberChild_JoinsView }, { id = 5, title = "进驻申请", view = ManagerMenberChild_JoinsView },
@ -26,13 +32,13 @@ M.ManagerTable = {
} }
M.ManagerShow = { M.ManagerShow = {
{ 1,2, 3 }, --群主 { 1,2, 3,4,5,6}, --群主
{}, --代理 {}, --代理
{} --用户 {} --用户
} }
M.ManagerMenberShow = { M.ManagerMenberShow = {
{ 3,4,5,6,7 }, --群主 { 6,6,7,8,9 }, --群主
{}, --代理 {}, --代理
{} --用户 {} --用户
} }

View File

@ -17,15 +17,16 @@ end
function M:init(url) function M:init(url)
getmetatable(M).__index.init(self, url) getmetatable(M).__index.init(self, url)
self._data.type = self._data.type or 1 self._data.type = self._data.type or 0
local view = self._view local view = self._view
self._viewList_player = view:GetChild('list_player') self._viewList_player = view:GetChild('list_player')
self._viewList_player:SetVirtual()
self._viewList_player.itemRenderer = handler(self, self.PlayerRenderer) self._viewList_player.itemRenderer = handler(self, self.PlayerRenderer)
self._viewText_search = self._view:GetChild('input_search') self._viewText_search = self._view:GetChild('input_search')
view:GetChild('btn_search').onClick:Set(handler(self,self.ClickSearch)) view:GetChild('btn_search').onClick:Set(handler(self, self.ClickSearch))
view:GetChild('btn_return').onClick:Set(handler(self,self.ShowAllMenber)) view:GetChild('btn_return').onClick:Set(handler(self, self.ShowAllMenber))
self:FillData() self:FillData()
end end
@ -33,12 +34,12 @@ function M:ClickSearch()
local text = self._viewText_search.text local text = self._viewText_search.text
local tmpTable = self._fillData local tmpTable = self._fillData
local searchData = {} local searchData = {}
for i,v in ipairs(tmpTable) do for i, v in ipairs(tmpTable) do
if v.uid == tonumber(text) or string.find(v.nick,text) then if v.uid == tonumber(text) or string.find(v.nick, text) then
table.insert(searchData,v) table.insert(searchData, v)
end end
end end
self._fillData= searchData self._fillData = searchData
self._viewList_player.numItems = #self._fillData self._viewList_player.numItems = #self._fillData
self._view:GetController('search').selectedIndex = 1 self._view:GetController('search').selectedIndex = 1
end end
@ -49,14 +50,24 @@ function M:PlayerRenderer(index, obj)
ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject) ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject)
obj:GetChild('text_name').text = info.nick obj:GetChild('text_name').text = info.nick
obj:GetChild('text_id').text = string.format("标识:%s", info.uid) obj:GetChild('text_id').text = string.format("标识:%s", info.uid)
obj:GetChild('btn_add').onClick:Set(function() --根据不同type决定控制器的显示和添加按钮的功能
ViewUtil:ErrorTip("暂时还未开放此功能。") if self._data.type == 2 then
end) local uidData = self._data.uidData or {}
obj:GetController('added').selectedIndex = info._flag_add or 0
obj:GetChild('btn_add').onClick:Set(function()
table.insert(uidData, info.uid)
self._callback(uidData)
obj:GetController('added').selectedIndex = 1
if #uidData == 1 then
self:Destroy()
end
end)
end
end end
function M:ShowAllMenber() function M:ShowAllMenber()
self._viewText_search.text = "" self._viewText_search.text = ""
self._fillData = DataManager.CurrenGroup.members self._fillData = self._data.menberTable or DataManager.CurrenGroup.members
self._viewList_player.numItems = #self._fillData self._viewList_player.numItems = #self._fillData
end end

View File

@ -0,0 +1,45 @@
local ManagerChild_BlackView = {}
local M = ManagerChild_BlackView
function ManagerChild_BlackView.new(data, callback)
local self = setmetatable({}, { __index = M })
self.class = "ManagerChild_BlackView"
self._data = data or {}
self._callback = callback
self:init("ui://Family/ManagerChild_Black")
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')
ViewUtil.LoadPage(page, url, function(view)
self._view = view
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

@ -0,0 +1,168 @@
local FamilyMenberManagerDisDetailView = import(".FamilyMenberManagerDisDetailView")
local ManagerChild_ForbidSameTableView = {}
local M = ManagerChild_ForbidSameTableView
function ManagerChild_ForbidSameTableView.new(data, callback)
local self = setmetatable({}, { __index = M })
self.class = "ManagerChild_ForbidSameTableView"
self._data = data or {}
self._callback = callback
self:init("ui://Family/ManagerChild_ForbidSameTable")
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')
ViewUtil.LoadPage(page, url, function(view)
self._view = view
self._viewList_list = view:GetChild('list_menber')
self._viewList_list:SetVirtual()
self._viewList_list.itemRenderer = handler(self, self.ListRenderer)
self:FillData()
end)
end
function M:ListRenderer(index, obj)
obj.text = string.format("限制组(%s)", index + 1)
local list = obj:GetChild('list')
list:RemoveChildrenToPool()
local uidData = {}
local uidMap = {}
local deskId = -1
if index < #self._resList then
deskId = self._resList[index + 1].deskId
for i, v in ipairs(self._resList[index + 1].deskList) do
local obj1 = list:AddItemFromPool()
obj1:GetController('head').selectedIndex = 1
ImageLoad.Load(v.portrait, obj1._iconObject)
obj1:GetChild('text_name').text = v.nick
obj1:GetChild('text_id').text = v.uid
table.insert(uidData, v.uid)
uidMap[v.uid] = 1
obj1:GetChild('btn_remove').onClick:Set(function()
for i = 1, #uidData do
table.remove(uidData, i)
self:SetForbid(deskId, uidData, obj.text)
return
end
end)
end
end
local obj1 = list:AddItemFromPool()
obj1:GetChild('btn_add').onClick:Set(function()
if #uidData > 0 then
self:GetAllMember(function()
local tempMenbers = {}
for i, v in ipairs(DataManager.CurrenGroup.members) do
local tempMenber = {}
for k, v in pairs(v) do
tempMenber[k] = v
end
tempMenber._flag_add = uidMap[v.uid] or 0
table.insert(tempMenbers, tempMenber)
end
FamilyMenberManagerDisDetailView.new({ menberTable = tempMenbers, type = 2, uidData = uidData },
function(uidData)
self:SetForbid(deskId, uidData, obj.text)
end)
end)
else
FamilyMenberManagerDisDetailView.new({ type = 2 }, function(uidData)
self:SetForbid(deskId, uidData, obj.text)
end)
end
end)
obj1:GetController('head').selectedIndex = 0
list:ResizeToFit(list.numItems)
obj:GetChild('btn_delete').onClick:Set(function()
if deskId == -1 then
ViewUtil:ErrorTip("该限制组不能删除")
else
self:SetForbid(deskId, {}, obj.text)
end
end)
end
function M:SetForbid(id, banList, name)
ViewUtil.ShowModalWait2()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_SetBanTable1(DataManager.CurrenGroup.id, id, banList, name, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil:ErrorTip(res.ReturnCode, "禁止同桌设置失败")
else
self:GetForbidSameDesk()
end
end)
end
function M:GetForbidSameDesk()
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_GetBanTable1(DataManager.CurrenGroup.id, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取禁止同桌列表")
return
end
self._resList = res.Data.ban_list or {}
if self._viewList_list.numItems == #self._resList + 1 then
self._viewList_list:RefreshVirtualList()
else
self._viewList_list.numItems = #self._resList + 1
end
end)
end
function M:GetAllMember(callback)
local group = DataManager.CurrenGroup
if #group.members == 0 then
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupMembers(group.id, 0, group.total_member_num, false, 1, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
return
end
if callback then
callback()
end
end)
return
end
if callback then
callback()
end
end
function M:FillData()
self:GetForbidSameDesk()
self:GetAllMember()
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

@ -0,0 +1,45 @@
local ManagerChild_RecordOperationView = {}
local M = ManagerChild_RecordOperationView
function ManagerChild_RecordOperationView.new(data, callback)
local self = setmetatable({}, { __index = M })
self.class = "ManagerChild_RecordOperationView"
self._data = data or {}
self._callback = callback
self:init("ui://Family/ManagerChild_RecordOperation")
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')
ViewUtil.LoadPage(page, url, function(view)
self._view = view
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

@ -0,0 +1,85 @@
local FamilyUtilInput = import(".FamilyUtilInput")
local FamilyChooseTimeView = import(".FamilyChooseTimeView")
local ManagerChild_RecordView = {}
local M = ManagerChild_RecordView
function ManagerChild_RecordView.new(data, callback)
local self = setmetatable({}, { __index = M })
self.class = "ManagerChild_RecordView"
self._data = data or {}
self._callback = callback
self:init("ui://Family/ManagerChild_Record")
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')
ViewUtil.LoadPage(page, url, function(view)
self._view = view
self._ctr_serch = view:GetController('search')
view:GetChild('btn_search').onClick:Set(function()
self._ctr_serch.selectedIndex = 1
end)
self._viewInput = view:GetChild('input_id')
FamilyUtilInput:init(self._viewInput, view:GetChild('comp_input'))
view:GetChild('btn_find').onClick:Set(handler(self, self.ClickFind))
view:GetChild('btn_time').onClick:Set(function()
FamilyChooseTimeView.new({left=self._left_time,right=self._right_time}, function(lef, rig)
self._left_time = lef
self._right_time = rig
self:RefenTime()
end)
end)
self:FillData()
end)
end
function M:ClickFind()
if #self._viewInput.text == 0 then
ViewUtil:ErrorTip("请输出标识id")
return
end
ViewUtil:ErrorTip("此id暂无战绩")
end
function M:RefenTime()
self._view:GetChild('btn_time').text = string.format("%s-%s", os.date("%m月%d号", self._right_time),
os.date("%m月%d号", self._left_time))
end
function M:FillData()
local view = self._view
local timeStamp = FamilyChooseTimeView:InitTime()
self._left_time = timeStamp
self._right_time = timeStamp
self:RefenTime()
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

@ -1,3 +1,5 @@
local FamilyDissolveByRoomView = import(".FamilyDissolveByRoomView")
local FamilyRoomCardView = import(".FamilyRoomCardView") local FamilyRoomCardView = import(".FamilyRoomCardView")
local ManagerChild_SettingView = {} local ManagerChild_SettingView = {}
@ -24,7 +26,7 @@ function M:init(url)
self._view = view self._view = view
view:GetChild('btn_dissolveRoom').onClick:Set(function() view:GetChild('btn_dissolveRoom').onClick:Set(function()
FamilyDissolveByRoomView.new()
end) end)
view:GetChild('btn_add').onClick:Set(function() view:GetChild('btn_add').onClick:Set(function()
@ -32,9 +34,12 @@ function M:init(url)
end) end)
view:GetChild('btn_record').onClick:Set(function() view:GetChild('btn_record').onClick:Set(function()
ViewUtil:ErrorTip("页面缺失")
end)
view:GetChild('btn_copy').onClick:Set(function()
ViewUtil:ErrorTip("复制成功")
GameApplication.Instance:CopyToClipboard(view:GetChild('text_id').text)
end) end)
view:GetChild('btn_dissolveRoomDetail').onClick:Set(handler(self, self.ClickDissolveDetail)) view:GetChild('btn_dissolveRoomDetail').onClick:Set(handler(self, self.ClickDissolveDetail))
view:GetChild('btn_witness').onClick:Set(handler(self, self.ClickWitnessDetail)) view:GetChild('btn_witness').onClick:Set(handler(self, self.ClickWitnessDetail))
@ -56,13 +61,13 @@ function M:ClickWitnessDetail()
end end
function M:ClickCheckHideDesk() function M:ClickCheckHideDesk(context)
local mgr_ctr = ControllerManager.GetController(GroupMgrController) local mgr_ctr = ControllerManager.GetController(GroupMgrController)
mgr_ctr:FG_SetShowStartRoom(DataManager.CurrenGroup.id, self._viewCheck_hideDesk.selected and 1 or 0, function(res) mgr_ctr:FG_SetShowStartRoom(DataManager.CurrenGroup.id, context.sender.selected and 1 or 0, function(res)
--因为没有回调,这边先把值设置好 --因为没有回调,这边先把值设置好
if res.ReturnCode ~= 0 then if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode,"设置失败") ViewUtil.ErrorTip(res.ReturnCode, "设置失败")
self._viewCheck_hideDesk.selected = not self._viewCheck_hideDesk.selected context.sender.selected = not context.sender.selected
return return
else else
ViewUtil:ErrorTip("设置成功") ViewUtil:ErrorTip("设置成功")
@ -70,12 +75,22 @@ function M:ClickCheckHideDesk()
end) end)
end end
function M:ClickCheckDissolveRoom() function M:ClickCheckDissolveRoom(context)
ViewUtil:ErrorTip("协议缺失")
context.sender.selected = not context.sender.selected
end end
function M:ClickCheckWitness() function M:ClickCheckWitness(context)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:SetCanWatch(DataManager.CurrenGroup.id, context.sender.selected and 1 or 0, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
context.sender.selected = not context.sender.selected
return
else
ViewUtil:ErrorTip("设置成功")
end
end)
end end
function M:FillData() function M:FillData()
@ -87,8 +102,8 @@ function M:FillData()
view:GetChild('text_id').text = group.id view:GetChild('text_id').text = group.id
view:GetChild('text_fangka').text = group.groupDiamo view:GetChild('text_fangka').text = group.groupDiamo
self._viewCheck_hideDesk.selected = group.isOpenStartRoom == 1 self._viewCheck_hideDesk.selected = group.isOpenStartRoom == 1
self._viewCheck_witness.selected = group.isWatch == 1 self._viewCheck_witness.selected = group.isWatch == 1
end end
-- 打开窗口 -- 打开窗口

View File

@ -419,9 +419,14 @@ function M:ReconnectRoom(groupId)
if roomId and #roomId > 0 then if roomId and #roomId > 0 then
local roomCtr = ControllerManager.GetController(RoomController) local roomCtr = ControllerManager.GetController(RoomController)
roomCtr:PublicJoinRoom( roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM, {
roomId, cmd = Protocol.WEB_FG_JOIN_ROOM,
false, roomid = roomId,
is_null = false,
group_id = groupId,
pid = 0,
selectSeat = 0
},
function(response) function(response)
if (response.ReturnCode == -1) then if (response.ReturnCode == -1) then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1') ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1')
@ -439,8 +444,7 @@ function M:ReconnectRoom(groupId)
DataManager.SelfUser.room_id = "" DataManager.SelfUser.room_id = ""
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
end end
end, end
groupId
) )
end end
end end

View File

@ -333,9 +333,13 @@ function M:ReconnectRoom(groupId, times)
if roomId and #roomId > 0 then if roomId and #roomId > 0 then
local roomCtr = ControllerManager.GetController(RoomController) local roomCtr = ControllerManager.GetController(RoomController)
roomCtr:PublicJoinRoom( roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM, {
roomId, cmd = Protocol.WEB_FG_JOIN_ROOM,
false, roomid = roomId,
is_null = false,
group_id = groupId,
selectSeat = 0
},
function(response) function(response)
if (response.ReturnCode == -1) then if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2() ViewUtil.CloseModalWait2()
@ -370,8 +374,7 @@ function M:ReconnectRoom(groupId, times)
end) end)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
end end
end, end
groupId
) )
end end
end end

View File

@ -18,13 +18,15 @@ end
local function RefalshBtnClose(self) local function RefalshBtnClose(self)
local btn_close = self._view:GetChild("btn_closeRoom") local btn_close = self._view:GetChild("btn_closeRoom")
local btn_close_cSytle = btn_close:GetController("cStyle") if btn_close then
local roomOwner = self._room.player_list[1].self_user.account_id local btn_close_cSytle = btn_close:GetController("cStyle")
local roomOwner = self._room.player_list[1].self_user.account_id
if roomOwner == DataManager.SelfUser.account_id then if roomOwner == DataManager.SelfUser.account_id then
btn_close_cSytle.selectedIndex = 0 btn_close_cSytle.selectedIndex = 0
else else
btn_close_cSytle.selectedIndex = 1 btn_close_cSytle.selectedIndex = 1
end
end end
end end
@ -544,7 +546,11 @@ function M:InitView(url, isHideIpAdds)
end end
end--]] end--]]
-------------------------lingmeng--------------------------- -------------------------lingmeng---------------------------
_view:GetChild('text_roomId').text = string.format("房间:%s", self._room.room_id) local text_roomId = _view:GetChild('text_roomId')
if text_roomId then
text_roomId.text = string.format("房间:%s", self._room.room_id)
end
local btn_inviteFamily = self._view:GetChild('btn_inviteFamily') local btn_inviteFamily = self._view:GetChild('btn_inviteFamily')
if btn_inviteFamily then if btn_inviteFamily then

View File

@ -445,3 +445,52 @@ function ViewUtil.LoadPage(loader, url, callback)
end, 1):Start() end, 1):Start()
end end
end end
local function RecursionBinarySearch(table, num, type, left, right)
if not table then
return nil
end
if #table == 0 then
return 1
end
left = left or 1
right = right or #table
if left == right then
if type == 0 then
return num >= table[left] and left + 1 or left
else
return num <= table[left] and left + 1 or left
end
end
if type == 0 then
local index = math.ceil((left + right) / 2)
if num >= table[index] then
left = index
else
right = index - 1
end
else
local index = math.floor((left + right) / 2)
if num <= table[index] then
left = index + 1
else
right = index
end
end
return RecursionBinarySearch(table, num, type or 0, left, right)
end
---comment 二分法查找下标
---@param table 查询表
---@param num 当前值
---@param type 类型 0为升序1为降序
---@return integer|nil
function ViewUtil.BinarySearch(table, num, type)
return RecursionBinarySearch(table, num, type)
end

View File

@ -0,0 +1,47 @@
local CS_Win_Type = {
"点炮",
"自摸",
"十三烂",
"七星十三烂",
"碰碰胡",
"碰碰胡清一色",
"碰碰胡字一色",
"七小对",
"七小对清一色",
"七小对字一色",
"清一色真胡",
"清一色假胡",
"字一色真胡",
"字一色假胡",
"天胡",
"地胡",
"平胡",
"抢杠胡",
"杠上花",
"烧庄",
"四归一",
"八归一",
"十二归一",
"清一色假胡四归一",
"清一色真胡四归一",
"清一色假胡八归一",
"清一色真胡八归一",
"清一色假胡十二归一",
"清一色真胡十二归一",
"字一色假胡四归一",
"字一色真胡四归一",
"字一色假胡八归一",
"字一色真胡八归一",
"字一色假胡十二归一",
"字一色真胡十二归一",
"清一色七对四归一",
"清一色七对八归一",
"清一色七对十二归一",
"字一色七对四归一",
"字一色七对八归一",
"字一色七对十二归一",
"七对四归一",
"七对八归一",
"七对十二归一"
}
return CS_Win_Type

View File

@ -1,11 +1,11 @@
-- 检测牌是否存在 -- 检测牌是否存在
local function checkCard(eventCard,cardList,num) local function checkCard(eventCard, cardList, num)
num = num == nil and 1 or num num = num == nil and 1 or num
local result = 0 local result = 0
for i = 1,#cardList do for i = 1, #cardList do
if (cardList[i] == eventCard) then if (cardList[i] == eventCard) then
result = result + 1 result = result + 1
if(result ==num) then if (result == num) then
return true return true
end end
end end
@ -14,24 +14,24 @@ local function checkCard(eventCard,cardList,num)
end end
-- 移除指定数量的牌 -- 移除指定数量的牌
local function removeCard(cardList, card,count) local function removeCard(cardList, card, count)
for i=1,count do for i = 1, count do
list_remove(cardList,card) list_remove(cardList, card)
end end
end end
local function checkCardAndRomve(eventCard,cardList,num) local function checkCardAndRomve(eventCard, cardList, num)
if(checkCard(eventCard,cardList,num)) then if (checkCard(eventCard, cardList, num)) then
removeCard(cardList,eventCard,num) removeCard(cardList, eventCard, num)
return true return true
end end
return false return false
end end
-- 获取列表中牌数量 -- 获取列表中牌数量
local function cardNum(eventCard,cardList) local function cardNum(eventCard, cardList)
local result = 0 local result = 0
for i=1,#cardList do for i = 1, #cardList do
local card = cardList[i] local card = cardList[i]
if (card == eventCard) then if (card == eventCard) then
result = result + 1 result = result + 1
@ -40,7 +40,7 @@ local function cardNum(eventCard,cardList)
return result return result
end end
local zhongid = 412 local zhongid = 0
local M = { local M = {
@ -55,15 +55,15 @@ local M = {
function M:push(cardGroup) function M:push(cardGroup)
self.stack[#self.stack+1] = cardGroup self.stack[#self.stack + 1] = cardGroup
end end
function M:rollBack() function M:rollBack()
local cardGroup = self.stack[#self.stack] local cardGroup = self.stack[#self.stack]
table.remove(self.stack,#self.stack) table.remove(self.stack, #self.stack)
for _,card in ipairs(cardGroup) do for _, card in ipairs(cardGroup) do
if (card == zhongid) then if (card == zhongid) then
self.zhong_count = self.zhong_count +1 self.zhong_count = self.zhong_count + 1
else else
self.cardList[#self.cardList + 1] = card self.cardList[#self.cardList + 1] = card
end end
@ -72,14 +72,53 @@ function M:rollBack()
end end
function M:tryShunzi(card) function M:tryShunzi(card)
if (card < 400 and card % 100 > 7) then if card > 400 or card % 100 > 7 then
return false return false
end end
if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then
removeCard(self.cardList, card, 1) removeCard(self.cardList, card, 1)
removeCard(self.cardList, card + 1, 1) removeCard(self.cardList, card + 1, 1)
removeCard(self.cardList, card + 2, 1) removeCard(self.cardList, card + 2, 1)
local cardGroup = {card,card+1,card+2} local cardGroup = { card, card + 1, card + 2 }
self:push(cardGroup)
return true
end
return false
end
--特殊牌,风牌也就是东南西北的成顺逻辑,中发白逻辑在普通顺子里
function M:tryFengShunzi(card)
--只有牌里有东南风的时候才能成顺401东风402南方
if self._flag_zikechengshun ~= 0 then
return false
end
local canShunziFeng = { 401, 402 }
for i = 1, #canShunziFeng do
if card == canShunziFeng[i] then
local tempFengList = {}
for j = 1, 4 - i do
if checkCard(405 - j, self.cardList) then
table.insert(tempFengList, 405 - j)
end
end
if #tempFengList >= 2 then
removeCard(self.cardList, card, 1)
removeCard(self.cardList, tempFengList[1], 1)
removeCard(self.cardList, tempFengList[2], 1)
local cardGroup = { card, tempFengList[1], tempFengList[2] }
self:push(cardGroup)
return true
end
end
end
if card < 500 then
return false
end
if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then
removeCard(self.cardList, card, 1)
removeCard(self.cardList, card + 1, 1)
removeCard(self.cardList, card + 2, 1)
local cardGroup = { card, card + 1, card + 2 }
self:push(cardGroup) self:push(cardGroup)
return true return true
end end
@ -88,7 +127,7 @@ end
function M:tryKezi(card) function M:tryKezi(card)
if (checkCardAndRomve(card, self.cardList, 3)) then if (checkCardAndRomve(card, self.cardList, 3)) then
local cardGroup = {card,card,card} local cardGroup = { card, card, card }
self:push(cardGroup) self:push(cardGroup)
return true return true
end end
@ -100,7 +139,7 @@ function M:tryPair(card)
return false return false
end end
if (checkCardAndRomve(card, self.cardList, 2)) then if (checkCardAndRomve(card, self.cardList, 2)) then
local cardGroup = {card,card} local cardGroup = { card, card }
self:push(cardGroup) self:push(cardGroup)
self.pair_count = 1 self.pair_count = 1
return true return true
@ -108,22 +147,21 @@ function M:tryPair(card)
return false return false
end end
function M:tryKezi1Zhong(card) function M:tryKezi1Zhong(card)
if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList, 2)) then
local cardGroup = {card,card,zhongid} local cardGroup = { card, card, zhongid }
self:push(cardGroup) self:push(cardGroup)
self.zhong_count = self.zhong_count -1 self.zhong_count = self.zhong_count - 1
return true return true
end end
return false return false
end end
function M:tryKezi2Zhong(card) function M:tryKezi2Zhong(card)
if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList, 1)) then
local cardGroup = {card,zhongid,zhongid} local cardGroup = { card, zhongid, zhongid }
self:push(cardGroup) self:push(cardGroup)
self.zhong_count = self.zhong_count -2 self.zhong_count = self.zhong_count - 2
return true return true
end end
return false return false
@ -141,8 +179,8 @@ function M:tryShunzi1Zhong(card)
if (checkCard(card + 1, self.cardList)) then if (checkCard(card + 1, self.cardList)) then
removeCard(self.cardList, card, 1) removeCard(self.cardList, card, 1)
removeCard(self.cardList, card + 1, 1) removeCard(self.cardList, card + 1, 1)
self.zhong_count = self.zhong_count -1 self.zhong_count = self.zhong_count - 1
local cardGroup = {card,card+1,zhongid} local cardGroup = { card, card + 1, zhongid }
self:push(cardGroup) self:push(cardGroup)
return true return true
end end
@ -150,8 +188,8 @@ function M:tryShunzi1Zhong(card)
if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then
removeCard(self.cardList, card, 1) removeCard(self.cardList, card, 1)
removeCard(self.cardList, card + 2, 1) removeCard(self.cardList, card + 2, 1)
self.zhong_count = self.zhong_count -1 self.zhong_count = self.zhong_count - 1
local cardGroup = {card,zhongid,card+2} local cardGroup = { card, zhongid, card + 2 }
self:push(cardGroup) self:push(cardGroup)
return true return true
end end
@ -166,9 +204,9 @@ function M:tryPair1Zhong(card)
return false return false
end end
removeCard(self.cardList, card, 1) removeCard(self.cardList, card, 1)
local cardGroup = {card,zhongid} local cardGroup = { card, zhongid }
self:push(cardGroup) self:push(cardGroup)
self.zhong_count = self.zhong_count -1 self.zhong_count = self.zhong_count - 1
self.pair_count = 1 self.pair_count = 1
return true return true
end end
@ -180,9 +218,9 @@ function M:tryPair2Zhong()
if (self.zhong_count < 2) then if (self.zhong_count < 2) then
return false return false
end end
local cardGroup = {zhongid,zhongid} local cardGroup = { zhongid, zhongid }
self:push(cardGroup) self:push(cardGroup)
self.zhong_count = self.zhong_count -2 self.zhong_count = self.zhong_count - 2
self.pair_count = 1 self.pair_count = 1
return true return true
end end
@ -225,6 +263,13 @@ function M:tryWin()
self:rollBack() self:rollBack()
end end
if (self:tryFengShunzi(activeCard)) then
if (self:tryWin()) then
return true
end
self:rollBack()
end
if (self:tryKezi1Zhong(activeCard)) then if (self:tryKezi1Zhong(activeCard)) then
if (self:tryWin()) then if (self:tryWin()) then
return true return true
@ -233,7 +278,6 @@ function M:tryWin()
end end
if (self:tryKezi2Zhong(activeCard)) then if (self:tryKezi2Zhong(activeCard)) then
if (self:tryWin()) then if (self:tryWin()) then
return true return true
end end
@ -271,16 +315,16 @@ function M:checkQidui()
end end
function M:isQdPari(cardList) function M:isQdPari(cardList)
if(self.qidui_pari_count == 7) then if (self.qidui_pari_count == 7) then
return true return true
end end
if (#cardList== 0) then if (#cardList == 0) then
return true return true
end end
local card = cardList[1] local card = cardList[1]
if (cardNum(card, cardList) >= 2) then if (cardNum(card, cardList) >= 2) then
removeCard(cardList, card, 2) removeCard(cardList, card, 2)
self.qidui_pari_count = self.qidui_pari_count +1 self.qidui_pari_count = self.qidui_pari_count + 1
if (self:isQdPari(cardList)) then if (self:isQdPari(cardList)) then
return true return true
end end
@ -289,7 +333,7 @@ function M:isQdPari(cardList)
if (self.hongzhong_count > 0) then if (self.hongzhong_count > 0) then
removeCard(cardList, card, 1) removeCard(cardList, card, 1)
self.hongzhong_count = self.hongzhong_count - 1 self.hongzhong_count = self.hongzhong_count - 1
self.qidui_pari_count = self.qidui_pari_count +1 self.qidui_pari_count = self.qidui_pari_count + 1
if (self:isQdPari(cardList)) then if (self:isQdPari(cardList)) then
return true return true
end end
@ -297,37 +341,110 @@ function M:isQdPari(cardList)
return false return false
end end
local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) function M:checkshisanlan()
if (not self.shisanlan) then
return false
end
if ((#self.cardList + self.zhong_count) ~= 14) then
return false
end
local cardList = membe_clone(self.cardList)
self.hongzhong_count = self.zhong_count
return self:isShiSanLan(cardList, table.remove(cardList, 1))
end
function M:isShiSanLan(cardList, card)
if (#cardList == 0) then
return true
end
if card < 400 then
if not (checkCard(card, cardList) or checkCard(card + 1, cardList) or checkCard(card + 2, cardList)) then
return self:isShiSanLan(cardList, table.remove(cardList, 1))
end
else
if not checkCard(card, cardList) then
return self:isShiSanLan(cardList, table.remove(cardList, 1))
end
end
return false
end
--._flag_haveLaizi, data._hu_qidui, data._data_laizi
local function init(self, cardInhand, addCard, data)
self.stack = {} self.stack = {}
self.pair_count = 0 self.pair_count = 0
self.cardList = membe_clone(cardInhand) self.cardList = membe_clone(cardInhand)
self.qidui = qidui self.qidui = data._hu_qidui
self.eight_laizi = eightLaizi self.shisanlan = data._hu_shisanlan
self.cardList[#self.cardList+1] = addCard self.eight_laizi = nil
if (isZhong) then self.cardList[#self.cardList + 1] = addCard
if (data._flag_haveLaizi) then
self.zhong_count = cardNum(zhongid, self.cardList) self.zhong_count = cardNum(zhongid, self.cardList)
removeCard(self.cardList, zhongid, self.zhong_count) removeCard(self.cardList, zhongid, self.zhong_count)
end end
table.sort(self.cardList) table.sort(self.cardList)
return self:checkQidui() or self:tryWin() --printlog("添加排序====>>>")
--pt(self.cardList)
return self:checkQidui() or self:checkshisanlan() or self:tryWin()
end end
function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) local specialCardList = { 401, 402, 403, 404, 501, 502, 503 }
local self = setmetatable({}, {__index = M}) function M.tingPai(cardInhand, data)
data = data or {}
local self = setmetatable({}, { __index = M })
local tingList = {} local tingList = {}
if not cardInhand or #cardInhand == 0 then if not cardInhand or #cardInhand == 0 then
return tingList return tingList
end end
for k=100,300,100 do for k = 100, 300, 100 do
for i=1,9 do for i = 1, 9 do
local tem = k + i local tem = k + i
local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) local result = init(self, cardInhand, tem, data)
if(result) then --printlog("返回结果为===>>>",result)
tingList[#tingList + 1] = tem if (result) then
tingList[#tingList + 1] = tem
end end
end end
end end
for j = 1, #specialCardList do
local tem = specialCardList[j]
local result = init(self, cardInhand, tem, data)
if (result) then
tingList[#tingList + 1] = tem
end
end
return tingList return tingList
end end
function M.MuiltiplteCaculateTingPai(cardInhand, isZhong, qidui, eightLaizi)
local room = DataManager.CurrenRoom
if room.laiziInfo and #room.laiziInfo > 0 then
zhongid = room.laiziInfo[1]
local tempTingList2 = {}
local tempTingList1 = M.tingPai(cardInhand, isZhong, qidui, eightLaizi)
if room.laiziInfo[2] then
zhongid = room.laiziInfo[2]
tempTingList2 = M.tingPai(cardInhand, isZhong, qidui, eightLaizi)
zhongid = room.laiziInfo[1]
end
local currentTingList = {}
if #tempTingList1 > 0 and #tempTingList2 > 0 then
currentTingList = CombineDictionaryAndRemoveSomeItem(tempTingList1, tempTingList2)
elseif #tempTingList1 > 0 then
currentTingList = tempTingList1
elseif #tempTingList2 > 0 then
currentTingList = tempTingList2
end
return currentTingList
else
M._flag_zikechengshun = room.room_config.config.zikechengshun or 0
zhongid = 0
return M.tingPai(cardInhand, isZhong, qidui, eightLaizi)
end
end
return M return M

View File

@ -1,385 +1,496 @@
require("Game.View.ResultView") require("Game.View.ResultView")
local Hu_Type_Name = import(".CS_Win_Type")
local EXClearingView = {} local EXClearingView = {}
local M = EXClearingView local M = EXClearingView
function EXClearingView.new(blur_view) function EXClearingView.new(root, data)
setmetatable(M, {__index = ResultView}) setmetatable(M, { __index = ResultView })
local self = setmetatable({}, {__index = M}) local self = setmetatable({}, { __index = M })
self._full = true self._full = true
ResultView.init(self, "ui://Main_Majiang/clearing") ResultView.init(self, "ui://Main_Majiang/clearing")
self._currenIndex = 0 self._root_view:GetChild("win_mode").visible = false
self._blur_view = blur_view
self._close_zone = false
self.xiPaiCtr=self._view:GetController("xipai")
self:InitMaPai() self._currenIndex = 0
return self self._root = root
end self._close_zone = false
if data then
self.flag_back = data.flag_back
function M:InitMaPai()
self.maPaiCtr=self._view:GetController("mapai")
self.maPaiCtr.selectedIndex=0
self.maPaiList={}
for i=1,10 do
local tempMP=self._view:GetChild("niao"..i)
table.insert(self.maPaiList,tempMP)
end
end
function M:IsMapaiShow(niao,isShow)
if niao then
niao.visible=isShow
end
end
function M:SetMaPaiValue(niao,value)
if niao then
niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value
end
end
function M:SetMaPaiColor(niao,num)
niao:GetController("color").selectedIndex=num
end
function M:HideAllMapai()
for i=1,#self.maPaiList do
self:IsMapaiShow(self.maPaiList[i],false)
self:SetMaPaiColor(self.maPaiList[i],0)
end
end
function M:ShowSelectMaPai(niaoList)
printlog("ccccccccccccccccccaaaaaaaaaaaaaa00")
pt(niaoList)
if niaoList and #niaoList>0 then
self.maPaiCtr.selectedIndex=1
self:HideAllMapai()
for i=1,#niaoList do
self:IsMapaiShow(self.maPaiList[i],true)
self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card)
if niaoList[i].score>0 then
self:SetMaPaiColor(self.maPaiList[i],2)
end
end
else
self.maPaiCtr.selectedIndex=0
end
end
function M:InitData(over, room, result, total_result, callback)
self._callback = callback
local _overCtr = self._view:GetController("over")
local btn_confirm = self._view:GetChild("btn_confirm")
local btn_result = self._view:GetChild("btn_showResult")
local btn_close = self._view:GetChild("big_result"):GetChild("btn_close")
local _btnCtr = self._view:GetController("button")
local _sdkCtr = self._view:GetController("sdk")
local ctr_type = self._view:GetController("type")
self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time()))
self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes(), "\r", "")
local paixingxiangqing=self._view:GetChild("btn_detal")
paixingxiangqing.visible=false
local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing")
fanhuipaixing.visible=false
local round=DataManager.CurrenRoom.room_config.config.times or 1
local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai
if xpconfig and round>1 then
self.xiPaiCtr.selectedIndex=1
else
self.xiPaiCtr.selectedIndex=0
end
if result then
self:ShowSelectMaPai(result.niao)
end
if over ~= 2 then
local xipai=self._view:GetChild("btn_xipai")
xipai.touchable=true
xipai.onClick:Add(function()
local xiPaiCallBack=function ()
xipai.touchable=false
self.xiPaiCtr.selectedIndex=0
ViewUtil.ErrorTip(1000000,"申请洗牌成功")
end
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:SendXiPaiAction(xiPaiCallBack)
end)
if result and result.xipai_score then
--xipai.text="洗牌 积分x"..result.xipai_score
end
if result.liuju then
ctr_type.selectedIndex = 3
else
local info_list = result.info_list
for i = 1, #info_list do
local is_win = info_list[i].is_win
if is_win then
if info_list[i].seat == room.self_player.seat then
ctr_type.selectedIndex = 1
else
ctr_type.selectedIndex = 2
end
end
end
end
if over == 0 then
_btnCtr.selectedIndex = 0
_sdkCtr.selectedIndex = 1
btn_confirm.onClick:Add(function()
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
end)
self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player)
elseif over == 1 then
self.xiPaiCtr.selectedIndex=0
_btnCtr.selectedIndex = 1
_sdkCtr.selectedIndex = 1
btn_result.onClick:Add(function()
_overCtr.selectedIndex = 1
_btnCtr.selectedIndex = 0
_sdkCtr.selectedIndex = 0
self.maPaiCtr.selectedIndex=0
if self._qsinfo_view then
self._qsinfo_view:Dispose()
end
end)
btn_close.onClick:Add(function()
ViewManager.ChangeView(ViewManager.View_Lobby)
end)
self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player)
end
else
_overCtr.selectedIndex = 1
self.xiPaiCtr.selectedIndex=0
self.maPaiCtr.selectedIndex=0
btn_close.onClick:Add(function()
ViewManager.ChangeView(ViewManager.View_Lobby)
end)
self:AddClearItem(room, nil, total_result.info_list, over)
end
end
function M:AddClearItem(room, data, total_data,over, niao, active_player)
local n = over + 1
local list_view1 = self._view:GetChild("player_list_1")
local list_view2 = self._view:GetChild("player_list_2")
if 0 == over or 1 == over then
table.sort(data, function(a,b) return a.seat > b.seat end)
list_view1:RemoveChildrenToPool()
for i=1,#data do
local item = list_view1:AddItemFromPool()
self:FillItemData(room, data[i], item, active_player, niao)
end
if #data == 3 then
list_view1.lineGap = 54
elseif #data == 2 then
list_view1.lineGap = 108
end
if 1 == over then
self:FillItemData2(room, total_data, list_view2)
end
elseif 2 == over then
self:FillItemData2(room, total_data, list_view2)
end
end
function M:FillItemData(room, data, item, active_player, niao)
local _gamectr = ControllerManager.GetController(GameController)
local p = room:GetPlayerBySeat(data["seat"])
item:GetChild("playerName").text = p.self_user.nick_name
-- 手牌
local hand_cards = data["hand_card"]
table.sort( hand_cards, ViewUtil.HandCardSort)
local hand_list_view = item:GetChild("hand_card_list")
hand_list_view:RemoveChildrenToPool()
for i=1,#hand_cards do
local card = hand_list_view:AddItemFromPool()
card.icon = "ui://Main_Majiang/b202_"..hand_cards[i]
end
hand_list_view.width = 52 * #hand_cards
local fz_card = p.fz_list
local fz_card_list = item:GetChild("fz_card_list")
fz_card_list.width = 157 * #fz_card * 0.8
fz_card_list:RemoveChildrenToPool()
for i=1,#fz_card do
if fz_card[i].type == FZType.Peng then
local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3")
for j=1,3 do
local card = item:GetChild("card_" .. j)
card.icon = "ui://Main_Majiang/b202_"..fz_card[i].card
end
elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then
local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4")
for j=1,4 do
local card = item:GetChild("card_" .. j)
if fz_card[i].type == FZType.Gang_An and j == 4 then
card.icon = "ui://Main_Majiang/b202_00"
else
card.icon = "ui://Main_Majiang/b202_"..fz_card[i].card
end
end
end
end
local huadd = data["hu_score"]
local gangadd = data["gang_score"]
local birdadd = data["niao_score"]
local total = data["round_score"]
local sp = " "
local str = "胡:"..huadd..""
str = str..sp.."杠:"..gangadd..""
str = str..sp.."扎鸟:"..birdadd..""
if data["piao_niao_score"] then
str = str..sp.."飘鸟:"..data["piao_niao_score"]..""
end
item:GetChild("score1").text = str
-- local total_score = data["total_score"]
if total >= 0 then
item:GetChild("score2").text = "+"..total
item:GetChild("score2").grayed = false
else
item:GetChild("score2").text = total
item:GetChild("score2").grayed = true
end
local hp_nonnegative = room:checkHpNonnegative()
item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0
if hp_nonnegative then
local hp_info = data.hp_info
local ctr_hp_limit = item:GetController("hp_limit")
local hp = d2ad(hp_info.round_actual_hp)
if hp >= 0 then hp = "+" .. tostring(hp) end
item:GetChild("tex_hp").text = hp
ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0
end
local is_win = data["is_win"] or false
item:GetController("win").selectedIndex = is_win and 0 or 1
if p.self_user.account_id == active_player and is_win == false and total < 0 then
item:GetController("win").selectedIndex = 2
end
local win_card = item:GetChild("win_card")
if is_win then
win_card.icon = "ui://Main_Majiang/b202_"..data["win_card"]
local lst_niao = item:GetChild("list_niao")
lst_niao:RemoveChildrenToPool()
for i = 1, #niao do
if niao[i].score > 0 then
local card_niao = lst_niao:AddItemFromPool()
card_niao.icon = "ui://Main_Majiang/b202_" .. niao[i].card
end
end
end
if p.seat == room.banker_seat then
item:GetController("bank").selectedIndex = 1
end
end
function M:FillItemData2(room, data, list)
-- 赋值result_info聊天室分享需要
local player_list = {}
for i = 1, #data do
player_list[i] = {}
local user = room:GetPlayerBySeat(data[i].seat).self_user
player_list[i].id = user.account_id
player_list[i].hp_info = data[i].hp_info
player_list[i].score = data[i].total_score
player_list[i].house = room.owner_id == player_list[i].id and 1 or 0
player_list[i].nick = user.nick_name
player_list[i].head_url = user.head_url
local settle_log = data[i].settle_log
player_list[i].param = {}
player_list[i].param[1]={}
player_list[i].param[1].key = "自摸次数:"
player_list[i].param[1].value = tostring(data[i].settle_log.zimo)
player_list[i].param[2]={}
player_list[i].param[2].key = "接炮次数:"
player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao)
player_list[i].param[3]={}
player_list[i].param[3].key = "点炮次数:"
player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao)
player_list[i].param[4]={}
player_list[i].param[4].key = "暗杠次数:"
player_list[i].param[4].value = tostring(data[i].settle_log.an_kong)
player_list[i].param[5]={}
player_list[i].param[5].key = "明杠次数:"
player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong)
end end
local round = room.room_config.round -- self:InitMaPai()
self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list)
local big_result = self._view:GetChild("big_result") return self
big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) end
local lst_p = big_result:GetChild("player_list")
if #player_list == 3 then -- function M:InitMaPai()
lst_p.columnGap = 108 -- self.maPaiCtr = self._view:GetController("mapai")
elseif #player_list == 2 then -- self.maPaiCtr.selectedIndex = 0
lst_p.columnGap = 208
end -- self.maPaiList = {}
self:InitBigResult(room, 30)
local show_detail = room.hpOnOff == 1 -- for i = 1, 8 do
for i = 1, lst_p.numChildren do -- local tempMP = self._view:GetChild("niao" .. i)
local com_p = lst_p:GetChildAt(i - 1) -- table.insert(self.maPaiList, tempMP)
local list_param = com_p:GetChild("list_param") -- end
for j = 1, list_param.numChildren do -- end
local tem = list_param:GetChildAt(j - 1)
tem:GetChild("txt_value").textFormat.size = 30 function M:InitData(over, room, result, total_result, callback, isWitness, witnessCallbak)
end -- print("===============================InitData===========================", over, room, result, total_result)
if show_detail then -- pt(room)
local score = 0 -- pt(result)
if com_p:GetController("pn").selectedIndex == 0 then -- Pt(total_result)
score = com_p:GetChild("txt_navigate").text self._callback = callback
else self._witnessCallbak = witnessCallbak
score = com_p:GetChild("txt_positive").text local showClearMainBtn = self._view:GetChild("btn_showClearMain")
end local nextRoundBtn = self._view:GetChild("btn_nextRound")
score = score / room.score_times local nextRoundBtn2 = self._view:GetChild("Btn_NextRound2")
com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) local endRound = self._view:GetChild("Btn_EndRound")
end local _overCtr = self._view:GetController("over")
local mainCtr = self._view:GetController("main")
local playerNum = self._view:GetController("playerNum")
local showBtnTypeCtr = self._view:GetController("showType")
local Text_BoJing = self._view:GetChild('Text_BoJing')
Text_BoJing.visible = false
if self.flag_back then
mainCtr.selectedIndex = 1
nextRoundBtn2.touchable = false
end
if result then
if result.cardList then
result.cardList = json.decode(result.cardList)
else
result.cardList = {}
end
end
self.list_lastCard = self._view:GetChild('list_lastCard')
self.list_lastCard:SetVirtual()
self.list_lastCard.itemRenderer = function(index, obj)
self:RemindCardRender(result.cardList[index + 1], obj)
end
local peopleNum = room.room_config.people_num
playerNum.selectedIndex = peopleNum - 2
showClearMainBtn.onClick:Set(function()
mainCtr.selectedIndex = 1
end)
nextRoundBtn.onClick:Set(function()
if self._callback_jiangma then
self._callback_jiangma()
end
if isWitness and isWitness == 1 then
if self._witnessCallbak then
self._witnessCallbak()
end
self:DestroyWithCallback()
else
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
else
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
end
end)
endRound.onClick:Set(function()
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewManager.ChangeView(ViewManager.View_Family)
end
end)
local Btn_Share = self._view:GetChild('Btn_Share')
if Btn_Share then
Btn_Share.onClick:Set(function()
self:SaveRenderTextureToPNG()
end)
end
local Btn_Copy = self._view:GetChild('Btn_Copy')
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, peopleNum do
local totalInfoList = total_result.info_list[i]
local playInfo = room:GetPlayerBySeat(totalInfoList.seat)
resultStr = string.format("%s%s\nID:%s【%s】\n", resultStr, playInfo.self_user.nick_name,
playInfo.self_user.account_id,
totalInfoList.total_score)
end
resultStr = string.format("%s房号:%s 局数:%s/%s局\n结束时间:%s", resultStr, room.room_id, room.curren_round,
room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time()))
ViewUtil.__openWx()
GameApplication.Instance:CopyToClipboard(resultStr)
end)
end
if over == 0 then
showBtnTypeCtr.selectedIndex = 0
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
if self._callback_jiangma then
self._callback_jiangma()
end
if isWitness and isWitness == 1 then
if self._witnessCallbak then
self._witnessCallbak()
end
self:DestroyWithCallback()
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
end
end)
elseif over == 1 then
self:fillResult1(room, peopleNum, total_result)
if result then
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
_overCtr.selectedIndex = 1
end)
else
showBtnTypeCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
else --解散房间如果没有开局直接退出不显示结算界面over=2
if room.curren_round > 0 then
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
showBtnTypeCtr.selectedIndex = 1
self:fillResult1(room, peopleNum, total_result)
else
if room._flag_lobby then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewManager.ChangeView(ViewManager.View_Family)
end
end
end
end
function M:fillResult0(room, peopleNum, result)
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild("Label_GamePlay").title = string.format("第%s/%s局,%s", room.curren_round,
room.room_config.round, gamePlay)
self.list_lastCard.numItems = #result.cardList
self._view:GetChild('n147').text = string.format("剩余%d张未显示", #result.cardList)
for i = 1, peopleNum do
local playerInfoComp = self._view:GetChild(string.format("Comp_Player%d", i))
local allCardsList = playerInfoComp:GetChild("list_allCards")
local huCardBtn = playerInfoComp:GetChild("Btn_Card_Hu")
local jiangMaList = playerInfoComp:GetChild("list_JiangMa")
local ziMoCtr = playerInfoComp:GetController("isZiMo")
local dianPaoCtr = playerInfoComp:GetController("isPao")
local isMeCtr = playerInfoComp:GetController("IsMe")
local isZhuang = playerInfoComp:GetController("zhuang")
local infoList = result.info_list[i]
local infoJiangma = result.niao
local playInfo = room:GetPlayerBySeat(infoList.seat)
local fzCardInfo = playInfo.fz_list
local fzInfoNum = #fzCardInfo
local handInfoNum = #infoList.hand_card
self:fillHead(playInfo.self_user.head_url, playerInfoComp)
infoList.jing_score = infoList.jing_score or 0
infoList.gang_score = infoList.gang_score or 0
infoList.hu_score = infoList.hu_score or 0
infoList.round_score = infoList.round_score or 0
playerInfoComp:GetChild("Text_BoJing").visible = false
playerInfoComp:GetChild("text_name").text = playInfo.self_user.nick_name
playerInfoComp:GetChild("Text_BoJing").text = infoList.jing_score >= 0 and
string.format("+%d", infoList.jing_score) or infoList.jing_score
playerInfoComp:GetChild("Text_Gang").text = infoList.gang_score >= 0 and
string.format("+%d", infoList.gang_score) or infoList.gang_score
playerInfoComp:GetChild("Text_Hu").text = infoList.hu_score >= 0 and string.format("+%d", infoList.hu_score) or
infoList.hu_score
playerInfoComp:GetChild("Text_Tatal").text = infoList.round_score >= 0 and
string.format("+%d", infoList.round_score) or infoList.round_score
for j = 1, fzInfoNum do
if fzCardInfo[j].type == FZType.Peng then
local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_3")
for l = 1, 3 do
local card = item:GetChild(string.format("Btn_Card%d", l))
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card)
print("===============================FZType.Peng", room.jing, fzCardInfo[j].card)
if room.jing == fzCardInfo[j].card then
card:GetController('jing').selectedIndex = 1
else
card:GetController('jing').selectedIndex = 0
end
end
elseif fzCardInfo[j].type == FZType.Chi then
local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_3")
for l = 1, 3 do
local card = item:GetChild(string.format("Btn_Card%d", l))
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].opcard
[l])
print("===============================FZType.Chi", room.jing, fzCardInfo[j].opcard[l])
if room.jing == fzCardInfo[j].opcard[l] then
card:GetController('jing').selectedIndex = 1
else
card:GetController('jing').selectedIndex = 0
end
end
elseif fzCardInfo[j].type == FZType.Gang or fzCardInfo[j].type == FZType.Gang_An or fzCardInfo[j].type == FZType.Gang_Peng then
local item = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_Clearing_FZ_4")
for l = 1, 4 do
local card = item:GetChild(string.format("Btn_Card%d", l))
if fzCardInfo[j].type == FZType.Gang_An and j == 4 then
card.icon = "ui://Main_Majiang/b202_00"
else
card.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), fzCardInfo[j].card)
print("===============================FZType.Gang", room.jing, fzCardInfo[j].card)
if room.jing == fzCardInfo[j].card then
card:GetController('jing').selectedIndex = 1
else
card:GetController('jing').selectedIndex = 0
end
end
end
end
end
local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard")
local handCardList = handCardItem:GetChild("list")
--手牌排序
table.sort(infoList.hand_card, self.HandCardSortAndJing)
handCardList:SetVirtual()
handCardList.itemRenderer = function(index, obj)
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1])
if room.jing == infoList.hand_card[index + 1] then
obj:GetController('jing').selectedIndex = 1
else
obj:GetController('jing').selectedIndex = 0
end
end
handCardList.numItems = handInfoNum
--拿取实际的子项大小
local handCard = 78
local hangColumGrap = -4
local fzCard = 234
local fzColumGrap = 36
handCard = handCardList:GetChildAt(handInfoNum - 1).width
hangColumGrap = handCard + handCardList.columnGap
if fzInfoNum > 0 then
fzCard = allCardsList:GetChildAt(0).width
fzColumGrap = allCardsList.columnGap
end
allCardsList.width = fzCard * fzInfoNum + handCard + (handInfoNum - 1) * hangColumGrap +
fzColumGrap * (fzInfoNum)
if infoList.seat == room.self_player.seat then
isMeCtr.selectedIndex = 1
end
if infoList.seat == room.self_player.seat then
isMeCtr.selectedIndex = 1
end
if infoList.seat == room.banker_seat then
isZhuang.selectedIndex = 1
end
if infoList.is_win then
local winInfo = ""
for j = 1, #infoList.win_list do
winInfo = string.format("%s,%s", winInfo, Hu_Type_Name[infoList.win_list[j].type])
end
winInfo = string.sub(winInfo, 2, -1)
playerInfoComp:GetChild("text_huShow").text = winInfo
if room.isZiMoHu then
ziMoCtr.selectedIndex = 1
end
huCardBtn.icon = string.format("ui://Main_Majiang/b202_%d", infoList.win_card)
if room.jing == infoList.win_card then
huCardBtn:GetController('jing').selectedIndex = 1
else
huCardBtn:GetController('jing').selectedIndex = 0
end
huCardBtn.visible = true
jiangMaList.visible = true
jiangMaList:SetVirtual()
jiangMaList.itemRenderer = function(index, obj)
obj.icon = string.format("ui://Main_Majiang/b202_%d", infoJiangma[index + 1].card)
obj:GetController('bg').selectedIndex = infoJiangma[index + 1].score
obj:GetController('jing').selectedIndex = infoJiangma[index + 1].card == room.jing and 1 or 0
end
jiangMaList.numItems = #infoJiangma
-- jiangMaList.columnCount = #infoJiangma / 2
else
playerInfoComp:GetChild("text_huShow").text = ""
if not room.isZiMoHu and playInfo.self_user.account_id == result.active_player then
dianPaoCtr.selectedIndex = 1
end
huCardBtn.visible = false
jiangMaList.visible = false
end
end
end
function M:fillResult1(room, peopleNum, total_result)
local gameNameAndRoomIDText = self._view:GetChild("Text_GameNameAndRoomID")
local familyIDText = self._view:GetChild("Text_FamilyID")
print("lingmeng fillResult1")
pt(room)
--初始化大赢家和最佳炮手
local bigWin = { seat = -1, score = 0 }
local bestPao = { seat = -1, times = 0 }
--循环数据得出分数最大的大赢家,以及点炮次数最多的最佳炮手
for i = 1, #total_result.info_list do
if total_result.info_list[i].total_score > bigWin.score then
bigWin = { seat = total_result.info_list[i].seat, score = total_result.info_list[i].total_score }
end
if total_result.info_list[i].settle_log.fangpao and total_result.info_list[i].settle_log.fangpao > bestPao.times then
bestPao = { seat = total_result.info_list[i].seat, times = total_result.info_list[i].settle_log.fangpao }
end
end
for i, v in pairs(DataManager.SelfUser.games) do
if v.game_id == room.game_id then
gameNameAndRoomIDText.text = string.format("%s 房号:%s", v.name, room.room_id)
end
end
if #gameNameAndRoomIDText.text <= 0 then
gameNameAndRoomIDText.text = string.format("房号:%s", room.room_id)
end end
if room.group_id ~= 0 then if room.group_id ~= 0 then
big_result:GetController("group").selectedIndex = 1 familyIDText.text = string.format("俱乐部:%s", room.group_id)
else
familyIDText.visible = false
self._view:GetChild('n148').visible = false
end
self._view:GetChild("Text_RoundNum").text = string.format("局数:%s/%s", room.curren_round, room.room_config.round)
self._view:GetChild("Text_Time").text = os.date("%Y-%m-%d %H:%M:%S", os.time())
for i = 1, peopleNum do
local resultInfoComp = self._view:GetChild(string.format("Comp_ResultInfo%d", i))
local totalInfoList = total_result.info_list[i]
local playInfo = room:GetPlayerBySeat(totalInfoList.seat)
self:fillHead(playInfo.self_user.head_url, resultInfoComp)
resultInfoComp:GetChild('Text_Name').text = playInfo.self_user.nick_name
resultInfoComp:GetChild('Text_ID').text = string.format("ID:%s", playInfo.self_user.account_id)
resultInfoComp:GetChild('Text_TotalScore').text = totalInfoList.total_score >= 0 and
string.format("+%s", totalInfoList.total_score) or totalInfoList.total_score
resultInfoComp:GetChild('Text_ZiMo').text = string.format("自摸 %d次", totalInfoList.settle_log.zimo or 0)
resultInfoComp:GetChild('Text_JiePao').text = string.format("接炮 %d次", totalInfoList.settle_log.jiepao or 0)
resultInfoComp:GetChild('Text_FangPao').text = string.format("放炮 %d次", totalInfoList.settle_log.fangpao or 0)
resultInfoComp:GetChild('Text_AnGang').text = string.format("暗杠 %d次", totalInfoList.settle_log.an_kong or 0)
resultInfoComp:GetChild('Text_MingGang').text = string.format("明杠 %d次",
totalInfoList.settle_log.ming_kong or 0)
resultInfoComp:GetChild('Text_FangGang').text = string.format("放杠 %d次",
totalInfoList.settle_log.fanggang or 0)
resultInfoComp:GetController("win").selectedIndex = totalInfoList.total_score >= 0 and 1 or 0
if totalInfoList.seat == bigWin.seat then
resultInfoComp:GetController("bigWin").selectedIndex = 1
-- else
-- resultInfoComp:GetController("bigWin").selectedIndex = 0
end
if totalInfoList.seat == bestPao.seat then
resultInfoComp:GetController("fangPao").selectedIndex = 1
-- else
-- resultInfoComp:GetController("fangPao").selectedIndex = 0
end
end end
DataManager.CurrenRoom = nil
end end
function M:LoadHead(p, room) function M:fillHead(url, view)
local btn_head = self._view:GetChild("btn_head") ImageLoad.Load(url, view:GetChild("Btn_Head")._iconObject)
for i = 1, #room.player_list do end
local player = room.player_list[i]
if p.seat == player.seat and player.self_user.head_url ~= "" then function M:RemindCardRender(data, obj)
ImageLoad.Load(player.self_user.head_url, btn_head.icon) local room = DataManager.CurrenRoom
end obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), data)
end if room.jing == data then
obj:GetController('jing').selectedIndex = 1
else
obj:GetController('jing').selectedIndex = 0
end
end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
local prefix
function M:GetPrefix()
-- if not prefix then
prefix = get_majiang_prefix(10)
-- end
return prefix
end
function M:SetJiangMaCallback(fct)
self._callback_jiangma = fct
end end
function M:DestroyWithCallback() function M:DestroyWithCallback()
if self._callback then if self._callback then
self._callback() self._callback()
end end
self:Destroy() self:Destroy()
end end
return M return M

View File

@ -33,6 +33,12 @@ function M:init(name)
self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao
self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip
self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao
self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards
self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang
self._eventmap[TX_Protocol.GAME_EVT_RESIDUE_CARD] = self.OnEventResidueCard
self._eventmap[TX_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai self._eventmap[TX_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai
self._eventmap[TX_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim self._eventmap[TX_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim
@ -82,33 +88,76 @@ end
local __pre_delete_card = false local __pre_delete_card = false
-- 发送出牌指令到服务器 -- 发送出牌指令到服务器
function M:SendOutCard(card, callback)
local _room = self._room
local p = _room.self_player
-------------------------展示牌---------------------------
function M:SendNextCard(card)
local _data = {} local _data = {}
_data["card"] = card _data["card"] = tonumber(card)
_data["card_list"] = p.card_list local _client = ControllerManager.GameNetClinet
if p.outcard_list and #p.outcard_list>0 then _client:send(TX_Protocol.GAME_NEXT_CARD, _data)
_data["outcard_list"] = p.outcard_list end
end
function M:ReqResidueCard()
local _data = {}
_data["card"] = 0
local _client = ControllerManager.GameNetClinet
_client:send(TX_Protocol.GAME_RESIDUE_CARD, _data)
end
------------------------------------------------------------
function M:SendOutCard(data, callback)
local _data = {}
_data["card"] = data.card
_data["isTip"] = data.isTip
local _room = self._room
local _client = ControllerManager.GameNetClinet local _client = ControllerManager.GameNetClinet
_client:send(TX_Protocol.GAME_DIS_CARD, _data) _client:send(TX_Protocol.GAME_DIS_CARD, _data)
-- 进行预删牌处理 -- 进行预删牌处理
local p = _room.self_player local p = _room.self_player
_room.curren_outcard_seat = -1 _room.curren_outcard_seat = -1
list_remove(p.card_list,card) list_remove(p.card_list, data.card)
table.sort(p.card_list, ViewUtil.HandCardSort)
table.sort(p.card_list, self.HandCardSortAndJing)
p.hand_left_count = p.hand_left_count - 1 p.hand_left_count = p.hand_left_count - 1
if not p.outcard_list then p.outcard_list = {} end if not p.outcard_list then p.outcard_list = {} end
p.outcard_list[#p.outcard_list+1] = card p.outcard_list[#p.outcard_list + 1] = data.card
__pre_delete_card = true __pre_delete_card = true
callback() callback()
end end
function M:SendGangCard(card)
local _data = {}
_data["card"] = card
local _client = ControllerManager.GameNetClinet
_client:send(TX_Protocol.GAME_EVT_DOGANG, _data)
end
function M:OnEventGangCards(evt_data)
printlog("OnEventGangCards")
pt(evt_data)
DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, evt_data["gangzi1"], evt_data["gangzi2"],
evt_data["gangnum"], true)
end
function M:OnEventBuGang(evt_data)
printlog("OnEventBuGang")
pt(evt_data)
DispatchEvent(self._dispatcher, TX_GameEvent.EventBuGang, evt_data["info"], true)
end
function M:OnEventResidueCard(evt_data)
printlog("OnEventResidueCard")
pt(evt_data)
if evt_data.seat ~= DataManager.CurrenRoom.self_player.seat then
return
end
DispatchEvent(self._dispatcher, TX_GameEvent.EventResidueCard, evt_data["residueCard"])
end
-- 发送放子选择到服务器 -- 发送放子选择到服务器
function M:SendAction(id) function M:SendAction(id)
@ -124,18 +173,32 @@ function M:OnEventSendCards(evt_data)
return return
end end
local _room = self._room local _room = self._room
--if not _room.room_config.piao_niao or _room.self_player.entrust then if not _room.room_config.piao_niao or _room.self_player.entrust then
-- _room.curren_round = _room.curren_round + 1 _room.curren_round = _room.curren_round + 1
--end end
_room.curren_round = evt_data["round"]
if _room.curren_round > 0 then _room.playing = true end if _room.curren_round > 0 then _room.playing = true end
printlog("开始发牌===========>>>")
pt(evt_data)
local room = DataManager.CurrenRoom
--printlog(evt_data.laiziCard)
--printlog(evt_data.laiziCard2)
--printlog(evt_data.laiziCardBefore)
--printlog(evt_data.laiziCard2Before)
DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, 102, 103, 0, true)
-- _room.SelfPlayer.AutoOutCard = false -- _room.SelfPlayer.AutoOutCard = false
local handcards = evt_data["card_list"] local handcards = evt_data["card_list"]
local p = _room.self_player local p = _room.self_player
local seat = evt_data["bank_seat"] local seat = evt_data["bank_seat"]
local jing = evt_data["jing"]
_room.jing = jing
self._cacheEvent:Enqueue(function() self._cacheEvent:Enqueue(function()
_room.banker_seat = seat _room.banker_seat = seat
for i=1,#_room.player_list do for i=1,#_room.player_list do
@ -144,9 +207,10 @@ function M:OnEventSendCards(evt_data)
_room.player_list[i].card_list = {} _room.player_list[i].card_list = {}
end end
p.card_list = handcards p.card_list = handcards
self._room.self_player.hand_left_count = #handcards self._room.self_player.hand_left_count = #handcards
table.sort( handcards, ViewUtil.HandCardSort )
DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) table.sort(handcards, self.HandCardSortAndJing)
DispatchEvent(self._dispatcher, TX_GameEvent.SendCards, p)
end) end)
end end
@ -163,7 +227,8 @@ function M:OnEventOutCard(evt_data)
else else
if seat == _room.self_player.seat then if seat == _room.self_player.seat then
list_remove(p.card_list, card) list_remove(p.card_list, card)
table.sort(p.card_list, ViewUtil.HandCardSort)
table.sort(p.card_list, self.HandCardSortAndJing)
end end
p.hand_left_count = p.hand_left_count - 1 p.hand_left_count = p.hand_left_count - 1
if not p.outcard_list then p.outcard_list = {} end if not p.outcard_list then p.outcard_list = {} end
@ -183,8 +248,9 @@ function M:OnEventTakeCard(evt_data)
self._cacheEvent:Enqueue(function() self._cacheEvent:Enqueue(function()
p.hand_left_count = p.hand_left_count +1 p.hand_left_count = p.hand_left_count +1
if (seat == _room.self_player.seat) then if (seat == _room.self_player.seat) then
_room.self_player.card_list[#_room.self_player.card_list+1] = card _room.self_player.card_list[#_room.self_player.card_list + 1] = card
-- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort )
-- table.sort( _room.self_player.card_list, self.HandCardSortAndJing )
end end
DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count)
end) end)
@ -217,6 +283,8 @@ function M:OnEventFzTips(evt_data)
tip.weight = dtip["weight"] tip.weight = dtip["weight"]
tip.card = dtip["card"] tip.card = dtip["card"]
tip.type = dtip["type"] tip.type = dtip["type"]
tip.opcard = dtip["opcard"]
-- if (dtip["opcard"]) then -- if (dtip["opcard"]) then
-- local opcard = dtip["opcard"] -- local opcard = dtip["opcard"]
-- tip.OpCard = opcard -- tip.OpCard = opcard
@ -225,7 +293,11 @@ function M:OnEventFzTips(evt_data)
-- end -- end
tiplist:AddTip(tip) tiplist:AddTip(tip)
end end
DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) --排序规则,胡杠碰
tiplist:SortList(function(a, b)
return a.type < b.type
end)
DispatchEvent(self._dispatcher, TX_GameEvent.FZTips, tiplist, weight)
end) end)
end end
@ -256,12 +328,19 @@ function M:OnEventFzAction(evt_data)
end end
end end
end end
fz = {}
fz.card = card
fz.type = type
fz.active_card = actice_card
if (index == -1) then if (index == -1) then
fz = {} if (ftype == FZType.Chi) then
fz.card = card local data = {}
fz.type = type data[1] = opcard[1]
fz.active_card = actice_card data[2] = card
p.fz_list[#p.fz_list+1] = fz data[3] = opcard[2]
fz.opcard = data
end
p.fz_list[#p.fz_list + 1] = fz
end end
fz.from_seat = from_seat fz.from_seat = from_seat
local remove_num = #opcard local remove_num = #opcard
@ -273,7 +352,7 @@ function M:OnEventFzAction(evt_data)
end end
p.hand_left_count = p.hand_left_count - remove_num p.hand_left_count = p.hand_left_count - remove_num
if from_seat ~= p.seat then if from_seat ~= p.seat and ftype ~= FZType.Gang_Peng then
-- if (fz.Type == FZType.Chi) then card = actice_card end -- if (fz.Type == FZType.Chi) then card = actice_card end
local fp = _room:GetPlayerBySeat(from_seat) local fp = _room:GetPlayerBySeat(from_seat)
table.remove(fp.outcard_list,#fp.outcard_list) table.remove(fp.outcard_list,#fp.outcard_list)
@ -287,21 +366,28 @@ function M:OnEventHu(evt_data)
local cards = evt_data["card"] local cards = evt_data["card"]
local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) local win_p = self._room:GetPlayerBySeat(evt_data["seat"])
local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"])
local hu_card = evt_data["win_card"] local win_card = evt_data["win_card"]
table.sort(cards, ViewUtil.HandCardSort) local win_list = evt_data["win_list"]
cards[#cards +1] = hu_card local scoreData = evt_data["result"].info_list
self._cacheEvent:Enqueue(function() self._cacheEvent:Enqueue(function()
win_p.card_list = cards win_p.card_list = cards
DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) table.sort(win_p.card_list, self.HandCardSortAndJing)
DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards,
win_list, scoreData)
end) end)
end end
function M:OneventResult1(evt_data) function M:OneventResult1(evt_data)
local over = evt_data.type local over = evt_data.type
printlog("OneventResult1")
pt(evt_data)
--0小结算 1小大结算 2大结算 --0小结算 1小大结算 2大结算
self._room._reload_flag = false self._room._reload_flag = false
self._room.playing = false self._room.playing = false
if evt_data.result then
evt_data.result.cardList = evt_data.cardList
end
if 0 == over then if 0 == over then
local result = evt_data.result local result = evt_data.result
self._cacheEvent:Enqueue(function() self._cacheEvent:Enqueue(function()
@ -392,4 +478,34 @@ function M:Discard(card)
_client:send(Protocol.Game_Da, _data) _client:send(Protocol.Game_Da, _data)
end end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
return M return M

View File

@ -2,307 +2,285 @@ local EXGameInfo = {}
local M = EXGameInfo local M = EXGameInfo
function EXGameInfo.new(blur_view) function EXGameInfo.new(blur_view)
setmetatable(M, {__index = IGameInfo}) setmetatable(M, { __index = IGameInfo })
local self = setmetatable({}, {__index = M}) local self = setmetatable({}, { __index = M })
self.class = "EXGameInfo" self.class = "EXGameInfo"
UIPackage.AddPackage("extend/majiang/hongzhong/ui/Info_MJ_HongZhong") UIPackage.AddPackage("extend/majiang/fuzhou/ui/Info_MJ_FuZhou")
return self return self
end end
function M:FillData() function M:FillData()
self._maxPlayer = 4 -- 默认玩家人数 self._maxPlayer = 4 -- 默认玩家人数
self._roundChoice = 4 -- 回合选项数 self._roundChoice = 3 -- 回合选项数
self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_FuZhou/Label_Detail_83")
if oldGameVersion==1 then local jiangmaSlider = self._config:GetChild("n92")
self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room") jiangmaSlider.onChanged:Set(function()
else self._config:GetChild("n93").text = string.format("奖%s马", Mathf.Round(jiangmaSlider.value) * 2)
self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room_yueyang") end)
end
if oldGameVersion==2 then local com_editSetting = self._config:GetChild("com_editSetting")
self._config:GetController("xipai").selectedIndex=0
self.xipaiValueText=self._config:GetChild('xipaifen') com_editSetting:GetController("cGps").selectedIndex = 2
self.xipaiValue=1
self.anchouValueText=self._config:GetChild('anchoufen')
self.anchouValueText.text=1
self.anchouValue=1
local btn_cr = self._config:GetChild('sdsrbtn')
btn_cr.onClick:Set(
function()
local gniv = GroupNumberInputView_Game.new(nil, function(num)
local value = limit
if otype == 1 then
value = value + ad2d(num)
elseif otype == - 1 then
value = value - ad2d(num)
else
value = ad2d(num)
end
if value < 0 then
ViewUtil.ErrorTip(1,"输入数据异常!")
end
self.xipaiValueText.text=value/1000
self.xipaiValue=value/1000
end, 3, nil)
gniv:Show()
end
)
local btn_cr2 = self._config:GetChild('anchoubtn')
btn_cr2.onClick:Set(
function()
local gniv = GroupNumberInputView_Game.new(nil, function(num)
local value = limit
if otype == 1 then
value = value + ad2d(num)
elseif otype == - 1 then
value = value - ad2d(num)
else
value = ad2d(num)
end
if value < 0 then
ViewUtil.ErrorTip(1,"输入数据异常!")
end
self.anchouValueText.text=value/1000
self.anchouValue=value/1000
end, 3, nil)
gniv:Show()
end
)
end
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)
end end
local _help_url= "ui://Info_MJ_HongZhong/Com_help" function M:FillDataNew()
self._maxPlayer = 4 -- 默认玩家人数
self._roundChoice = 3 -- 回合选项数
self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_FuZhou/Label_Detail_83")
local jiangmaSlider = self._config:GetChild("n92")
jiangmaSlider.onChanged:Set(function()
self._config:GetChild("n93").text = string.format("奖%s马", Mathf.Round(jiangmaSlider.value) * 2)
end)
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)
end
local _help_url = "ui://Info_MJ_FuZhou/Com_help"
function M:GetHelpUrl() function M:GetHelpUrl()
return _help_url return _help_url
end end
local _icon_url = "ui://Info_MJ_HongZhong/icon" local _icon_url = "ui://Info_MJ_FuZhou/icon"
function M:GetIconUrl() function M:GetIconUrl()
return _icon_url return "ui://Lobby/fuzhoumajiang2", "ui://Lobby/fuzhoumajiang1"
end end
local _icon_url1 = "ui://Info_MJ_HongZhong/icon1" local _icon_url1 = "ui://Info_MJ_FuZhou/icon1"
function M:GetIconUrl1() function M:GetIconUrl1()
return _icon_url1 return _icon_url1
end end
local _play_list = {}--{"红中麻将","三人红中","二人红中"} local _play_list = {}
function M:GetPlayList() function M:GetPlayList()
return _play_list return _play_list
end end
function M:GetPageURL()
return "ui://Info_MJ_FuZhou/Label_Detail_83"
end
function M:SelectedConfigData() function M:SelectedConfigData()
local _config = self._config local _config = self._config
local round = _config:GetController("round").selectedIndex + 1 local round = _config:GetController("round").selectedIndex + 1
local people = _config:GetController("play_list").selectedIndex+2 local people = _config:GetController("peopleNum").selectedIndex + 2
local qiangkong = _config:GetChild("btn_qgh").selected and true or false
local qiangkong_niao = _config:GetChild("btn_qghjm").selected and true or false
local seven_pair = _config:GetChild("btn_qidui").selected and true or false
local niao_type = _config:GetController("NiaoType").selectedIndex + 1
local zha_ma = _config:GetController("zha").selectedIndex + 1
local wo_niao = _config:GetController("wowoniao").selectedIndex + 1
local laizi = _config:GetChild("btn_laizi").selected and true or false
local aa = _config:GetController("Cost").selectedIndex
-- local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false
local piao_niao = _config:GetChild("btn_piao_niao").selected
local jiangma = _config:GetController("jiangma").selectedIndex
local wuguizhuopaojiabei = _config:GetChild("btn_wuhongzhongzuobaofanbei").selected
---------- local zimo = _config:GetController("ZiMo").selectedIndex
local piao_niao1=0 local shaozhuang = _config:GetController("ShaoZhuang").selectedIndex
if _config:GetController('piao') then local fengding = _config:GetController("FengDing").selectedIndex
piao_niao1=_config:GetController('piao').selectedIndex local Tiandihu = _config:GetController("TianDiHu").selectedIndex
end local zikechengshun = _config:GetController("ZiKeChengShun").selectedIndex
local piao1=false local zhuangfenfanbei = _config:GetController('ZhuangFenFanBei').selectedIndex
local piao2=false
local piao3=false local jiangma = Mathf.Round(_config:GetChild("n92").value)
local piao_niao_opt=0
if piao_niao1==2 then local xi_pai = false
piao_niao_opt=_config:GetController("piaofen").selectedIndex local xi_paifen = 0
end if _config:GetChild("xipai") then
xi_pai = _config:GetChild("xipai").selected
end
local laizi4_hu = false
if _config:GetChild("btn_sihongzhong") then
laizi4_hu = _config:GetChild("btn_sihongzhong").selected
end
local hz_hu =false
if _config:GetChild("btn_wuhongzhong") then
hz_hu = _config:GetChild("btn_wuhongzhong").selected
end
local wuguijiabei =false
if _config:GetChild("btn_wuhongzhongzimo") then
wuguijiabei = _config:GetChild("btn_wuhongzhongzimo").selected
end
local di_fen=false
if _config:GetController('difen') then
di_fen=_config:GetController('difen').selectedIndex
end
local xi_pai=false
if _config:GetChild("xipai") then
xi_pai=_config:GetChild("xipai").selected
end
local fengding_score=0
if _config:GetController("fengding") then
fengding_score=_config:GetController("fengding").selectedIndex
end
----------
------
local _data = {} local _data = {}
_data["opt"] = round _data["opt"] = round
_data["maxPlayers"] = people _data["maxPlayers"] = people
-- _data["maxPlayers"] = 2
-- _data["zhuangxian"] = zhuangxian
_data["qidui"] = seven_pair
_data["qiangkong"] = qiangkong
_data["qiangkong_niao"] = not qiangkong and false or qiangkong_niao
_data["niao"] = niao_type
if oldGameVersion==1 then
_data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma)
else
_data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma)
end
_data["niao_opt_score"] = wo_niao _data["zimo"] = zimo
_data["shaozhuang"] = shaozhuang
_data["fengding"] = fengding
_data["Tiandihu"] = Tiandihu
_data["zikechengshun"] = zikechengshun
_data["zhuangfenfanbei"] = zhuangfenfanbei
_data["laizi8"] = laizi
_data["AA"] = aa
if oldGameVersion==1 then
_data["piao_niao"] = piao_niao
else
_data["piao_niao"] = piao_niao1
end
_data["jiangma"] = jiangma _data["jiangma"] = jiangma
_data['xi_pai'] = xi_pai
_data['piao1'] = piao1 local xi_pai_score = 0
_data['piao2'] = piao2 local an_chou_score = 0
_data['piao3'] = piao3 -- if oldGameVersion == 2 then
_data['laizi4_hu'] = laizi4_hu -- xi_pai_score = self.xipaiValue
_data['hz_hu'] = hz_hu -- an_chou_score = self.anchouValue
_data['wuguijiabei'] = wuguijiabei -- end
_data['di_fen'] = di_fen
_data['xi_pai'] = xi_pai
auto_piao=false _data['xi_pai_score'] = xi_pai_score * 1000
if piao_niao==2 then _data['an_chou_score'] = an_chou_score * 1000
if piao1 or piao2 or piao3 then
auto_piao=true
end
end
_data['auto_piao'] = auto_piao
_data['piao_niao_opt'] = piao_niao_opt
local xi_pai_score=0
local an_chou_score=0
if oldGameVersion==2 then
xi_pai_score=self.xipaiValue
an_chou_score=self.anchouValue
end
_data['xi_pai_score'] = xi_pai_score*1000
_data['an_chou_score'] = an_chou_score*1000
_data["fengding_score"] = fengding_score
_data["wuguizhuopaojiabei"] = wuguizhuopaojiabei
return _data return _data
end end
function M:LoadConfigData(data) function M:LoadConfigData(data)
--printlog("加载房间配置=========>>>")
--pt(data)
local _config = self._config local _config = self._config
_config:GetController("round").selectedIndex = data.opt-1 _config:GetController("round").selectedIndex = data.opt - 1
_config:GetController("play_list").selectedIndex = data.maxPlayers-2 _config:GetController("peopleNum").selectedIndex = data.maxPlayers - 2
_config:GetChild("btn_qgh").selected = data.qiangkong
_config:GetChild("btn_qghjm").selected = data.qiangkong_niao _config:GetController("ZiMo").selectedIndex = data.zimo
_config:GetChild("btn_qidui").selected = data.qidui _config:GetController("ShaoZhuang").selectedIndex = data.shaozhuang
-- _config:GetChild("btn_zhuangxian").selected = data.zhuangxian _config:GetController("FengDing").selectedIndex = data.fengding
_config:GetController("NiaoType").selectedIndex = data.niao - 1 _config:GetController("TianDiHu").selectedIndex = data.Tiandihu
if data.niao == 1 then _config:GetController("ZiKeChengShun").selectedIndex = data.zikechengshun
_config:GetController("zha").selectedIndex = data.niao_opt - 1 _config:GetController('ZhuangFenFanBei').selectedIndex = data.zhuangfenfanbei
elseif data.niao == 3 then
_config:GetController("wowoniao").selectedIndex = data.niao_opt - 1 _config:GetChild("n92").value = data.jiangma
self._config:GetChild("n93").text = string.format("奖%s马", data.jiangma * 2)
end
function M:LoadConfigToDetailOnlyPlay(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end end
_config:GetController("wowoniao").selectedIndex = data.niao_opt_score - 1
_config:GetChild("btn_laizi").selected = data.laizi8 local hpData = configData.hpData or hpdata
_config:GetController("Cost").selectedIndex = data.AA or 0 if type(hpData) == 'string' then
if oldGameVersion==1 then if hpData == "null" then
_config:GetChild("btn_piao_niao").selected = data.piao_niao hpData = nil
end else
_config:GetController("jiangma").selectedIndex = data.jiangma hpData = json.decode(hpData)
end
end
local returnString = ""
if hpData then
returnString = string.format("%s倍", hpData.times / 1000)
end
if _config:GetController("piao") then returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
_config:GetController("piao").selectedIndex=data.piao_niao
_config:GetChild('pf1').selected=data.piao1
_config:GetChild('pf2').selected=data.piao2
_config:GetChild('pf3').selected=data.piao3
end
if _config:GetChild("btn_sihongzhong") then if hpData then
_config:GetChild("btn_sihongzhong").selected=data.laizi4_hu returnString = string.format("%s %s局", returnString, hpData.maxRound)
_config:GetChild("btn_wuhongzhong").selected=data.hz_hu end
_config:GetChild("btn_wuhongzhongzimo").selected=data.wuguijiabei
end
if _config:GetController("difen") then if configData.zimo then
_config:GetController("difen").selectedIndex=data.di_fen returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end end
if configData.shaozhuang then
returnString = string.format("%s%s", returnString, configData.shaozhuang == 0 and ",不烧庄" or ",烧庄")
end
if configData.fengding then
local matString = "%s%s"
if configData.fengding == 0 then
returnString = string.format(matString, returnString, ",封顶20炮")
else
returnString = string.format(matString, returnString, ",不封顶")
end
end
if configData.TianDiHu then
returnString = string.format("%s%s", returnString, configData.TianDiHu == 0 and ",天地胡玩法" or ",没有天地胡")
end
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zikechengshun then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",字可成顺" or ",字不可成顺")
end
if configData.zhuangfenfanbei then
returnString = string.format("%s%s", returnString, configData.zhuangfenfanbei == 0 and ",庄家积分翻倍" or ",庄家积分不翻倍")
end
if _config:GetChild("xipai") then if hpData then
_config:GetChild("xipai").selected=data.xi_pai if hpData.BanChat then
end returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
end
return returnString
end
if _config:GetController("piaofen") then function M:LoadConfigToDetail(data, hpdata)
_config:GetController("piaofen").selectedIndex=data.piao_niao_opt local configData = data
end if type(data) == 'string' then
configData = json.decode(data)
end
if oldGameVersion==2 then local hpData = configData.hpData or hpdata
self.xipaiValueText.text=data.xi_pai_score/1000 if type(hpData) == 'string' then
self.xipaiValue=data.xi_pai_score/1000 if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
self.anchouValueText.text=data.an_chou_score/1000 local returnString = ""
self.anchouValue=data.an_chou_score/1000 if hpData then
end returnString = string.format("%s倍,", hpData.times / 1000)
end
if _config:GetController("fengding") then returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
_config:GetController("fengding").selectedIndex=data.fengding_score
end
_config:GetChild("btn_wuhongzhongzuobaofanbei").selected=data.wuguizhuopaojiabei if hpData then
returnString = string.format("%s %s局", returnString, hpData.maxRound)
end
if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end
if configData.shaozhuang then
returnString = string.format("%s%s", returnString, configData.shaozhuang == 0 and ",不烧庄" or ",烧庄")
end
if configData.fengding then
local matString = "%s%s"
if configData.fengding == 0 then
returnString = string.format(matString, returnString, ",封顶20炮")
else
returnString = string.format(matString, returnString, ",不封顶")
end
end
if configData.TianDiHu then
returnString = string.format("%s%s", returnString, configData.TianDiHu == 0 and ",天地胡玩法" or ",没有天地胡")
end
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zikechengshun then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",字可成顺" or ",字不可成顺")
end
if configData.zhuangfenfanbei then
returnString = string.format("%s%s", returnString, configData.zhuangfenfanbei == 0 and ",庄家积分翻倍" or ",庄家积分不翻倍")
end
end returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end
return M return M

View File

@ -1,6 +1,10 @@
local MJPlayBackView = require("main.majiang.MJPlayBackView") local MJPlayBackView = require("main.majiang.MJPlayBackView")
local EXRoomConfig = import(".EXRoomConfig") local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView") local EXClearingView = import(".EXClearingView")
local HuCardImg = import(".HuCardImg")
local FZTipList = require("main.majiang.FZData")
local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView")
local Record_Event = import(".RecordEvent") local Record_Event = import(".RecordEvent")
@ -9,25 +13,31 @@ local M = {}
--- Create a new --- Create a new
function M.new() function M.new()
setmetatable(M,{__index = MJPlayBackView}) setmetatable(M, { __index = MJPlayBackView })
local self = setmetatable({}, {__index = M}) local self = setmetatable({}, { __index = M })
self.class = "PlayBackView" self.class = "PlayBackView"
self:init() self:init()
return self return self
end end
function M:InitView(url) function M:InitView(url)
local room = self._room local room = self._room
UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou")
MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
local _cardbox = self._view:GetChild("cardbox") local _cardbox = self._view:GetChild("cardbox")
--self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
self._ctr_cardbox = _cardbox:GetController("c1") self._ctr_cardbox = _cardbox:GetController("c1")
self._tex_round = self._view:GetChild("tex_round") self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card") self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips") self._anchor = self._view:GetChild("mask_tips")
self.jing = self._view:GetChild('jing')
self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
self.asset_group = "FuZhou_MJ"
self.HuCardImg_path = "ui://Extend_MJ_FuZhou/"
self.Sound_path = "extend/majiang/fuzhou/sound/"
self._eventmap = {} self._eventmap = {}
self._cmdmap = {} self._cmdmap = {}
@ -38,36 +48,44 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
self._cmdmap[Record_Event.Evt_FZTip] = self.CmdFZTip
self._cmdmap[Record_Event.Evt_GangScore] = self.GangScore
self.com_logocType.selectedIndex = 0
end end
function M:FillRoomData(data) function M:FillRoomData(data)
MJPlayBackView.FillRoomData(self) MJPlayBackView.FillRoomData(self)
if self._win_pic then self._win_pic:Dispose() end if self._win_pic then self._win_pic:Dispose() end
if self._niao then self._niao:Dispose() end if self._niao then self._niao:Dispose() end
self._currentStep = 0 self._currentStep = 0
local room = DataManager.CurrenRoom local room = DataManager.CurrenRoom
local _player_card_info = self._player_card_info local _player_card_info = self._player_card_info
local left_count = data.info.left_card local left_count = data.info.left_card
self:UpdateLeftCard(left_count) self:UpdateLeftCard(left_count)
local round = data.info.round local round = data.info.round
self:UpdateRound(round) self:UpdateRound(round)
self:ShowJing()
local roominfo_panel = self._view:GetChild("roominfo_panel1") local roominfo_panel = self._view:GetChild("roominfo_panel1")
roominfo_panel:GetChild("tex_roomid").text = room.room_id roominfo_panel:GetChild("tex_roomid").text = room.room_id
roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
for i = 1, #room.player_list do for i = 1, #room.player_list do
local p = room.player_list[i] local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)] local card_info = _player_card_info[self:GetPos(p.seat)]
card_info:Clear() card_info:Clear()
table.sort(p.card_list, ViewUtil.HandCardSort) table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true) card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
end end
self:GenerateAllStepData(data) self:GenerateAllStepData(data)
self:UpdateStep(1) self:UpdateStep(1)
-- self:ShowStep(0) self:Play()
self._laiziMove:Play()
self._touxiangMove:Play()
-- self:ShowStep(0)
end end
function M:ShowStep(index) function M:ShowStep(index)
@ -86,8 +104,8 @@ function M:ShowStep(index)
p.outcard_list = step.player_card_data[i].outcard_list p.outcard_list = step.player_card_data[i].outcard_list
p.fz_list = step.player_card_data[i].fz_list p.fz_list = step.player_card_data[i].fz_list
p.hand_left_count = #p.card_list p.hand_left_count = #p.card_list
info:Clear() -- info:Clear()
info:ResetFzList() -- info:ResetFzList()
p.piao_niao = step.player_card_data[i].piao_niao p.piao_niao = step.player_card_data[i].piao_niao
local head_info = self._player_info[self:GetPos(i)] local head_info = self._player_info[self:GetPos(i)]
if p.piao_niao and p.piao_niao > 0 then if p.piao_niao and p.piao_niao > 0 then
@ -98,64 +116,336 @@ function M:ShowStep(index)
end end
if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then
local card = p.outcard_list[#p.outcard_list] local card = p.outcard_list[#p.outcard_list]
info:UpdateOutCardList(nil, nil, self._cursor) info:UpdateOutCardList(nil, card, self._cursor)
self:PlayMJSound("chupai.mp3")
self:PlaySound("FuZhou_MJ", p.self_user.sex, tostring(card))
else else
info:UpdateOutCardList() info:UpdateOutCardList()
end end
if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then ---显示提示按钮
info:UpdateHandCard(true, true) local _ctr_tips = info._view:GetController('tip2')
local _lit_fanzi = info._view:GetChild("Comp_Back_FZTips")
local _flag_tipGetCard = false
if step.cmd == Record_Event.Evt_FZTip then
if p.seat == step.seat then
local tip = step.tiplist
local _tlist = tip.tip_sortList
_lit_fanzi.itemRenderer = function(index, obj)
local type = obj:GetController('type')
if index == tip.tip_num then
type.selectedIndex = 0
else
index = index + 1
if _tlist[index].type == FZType.HU then
type.selectedIndex = 4
obj:GetChild('btn_Card1').icon = string.format('ui://Main_Majiang/b202_%d',
_tlist[index].card)
_flag_tipGetCard = self.last_get_seat ~= step.seat
elseif _tlist[index].type == FZType.Chi then
type.selectedIndex = FZType.Chi
for i = 1, 3 do
obj:GetChild(string.format('btn_Card%d', i)).icon = string.format(
'ui://Main_Majiang/b202_%d',
_tlist[index].opcard[i])
end
elseif _tlist[index].type == FZType.Peng then
type.selectedIndex = FZType.Peng
for i = 1, 3 do
obj:GetChild(string.format('btn_Card%d', i)).icon = string.format(
'ui://Main_Majiang/b202_%d',
_tlist[index].card)
end
else
for i = 1, 4 do
obj:GetChild(string.format('btn_Card%d', i)).icon = string.format(
'ui://Main_Majiang/b202_%d',
_tlist[index].card)
end
type.selectedIndex = FZType.Gang
if _tlist[index].type == FZType.Gang_An then
obj:GetChild('btn_Card4').icon = 'ui://Main_Majiang/b202_00'
end
_flag_tipGetCard = true
end
end
end
_ctr_tips.selectedIndex = 1
_lit_fanzi.numItems = tip.tip_num + 1
end
else else
info:UpdateHandCard(false, true) _ctr_tips.selectedIndex = 0
_lit_fanzi.numItems = 0
end
----多人胡的时候,同时显示胡
if step.cmd == Record_Event.Evt_Result then
--所有都显示胡吧,暂时没做胡和自摸的判断
if not self.result then
if step.result_data.info_list[i].is_win then
local info2 = self._player_card_info[self:GetPos(step.result_data.info_list[i].seat)]
local loader_HuEffect = info2._viewLoader_selfHuCardEffect
local isZiMo = false
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound(self.asset_group, p.self_user.sex, hu_sound)
local effects = isZiMo and ("tile_zimo") or ("tile_hu")
loader_HuEffect.visible = true
loader_HuEffect.url = "ui://Main_Majiang/" .. effects
loader_HuEffect:SetScale(2, 2)
local hu_tween = loader_HuEffect:TweenScale(Vector2(1, 1), 0.3)
hu_tween:SetEase(EaseType.QuartOut)
hu_tween:OnComplete(function()
loader_HuEffect.visible = false
end)
end
end
end
if step.cmd ~= Record_Event.Evt_OutCard and step.cmd ~= Record_Event.Evt_GangScore and step.cmd ~= Record_Event.Evt_Win and step.cmd ~= Record_Event.Evt_Niao and p.seat == step.current_out_seat or step.cmd == Record_Event.Evt_Result then
if step.cmd == Record_Event.Evt_Action then
pt("lingmeng step ", step)
local fz = step.fz
local info = self._player_card_info[self:GetPos(i)]
local loader_HuEffect = info._viewClip_Peng_Gang
local effects = ""
if fz.type == FZType.Peng then
self:PlaySound("Main_Majiang", p.self_user.sex, "peng")
effects = "clip_peng"
elseif fz.type == FZType.Chi then
else
self:PlaySound("Main_Majiang", p.self_user.sex, "gang")
effects = "clip_gang"
end
local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", effects))
clip:SetSize(loader_HuEffect.width, loader_HuEffect.height)
loader_HuEffect:AddChild(clip)
clip:SetPlaySettings(0, -1, 1, -1)
clip.onPlayEnd:Add(function()
if clip.parent then
clip.parent:RemoveChild(clip)
end
clip:Dispose()
end)
clip.playing = true
info:UpdateFzList(fz, index, true, self:GetPos(fz.from_seat))
end
printlog("lingmeng UpdateHandCard", step.cmd, p.seat, step.fz and step.fz.type or -1, FZType.Peng,
_flag_tipGetCard)
if step.cmd == Record_Event.Evt_Action and step.fz.type ~= FZType.Peng then
info:UpdateHandCard(false, true)
elseif step.cmd == Record_Event.Evt_FZTip and not _flag_tipGetCard then
info:UpdateHandCard(false, true)
elseif step.cmd == Record_Event.Evt_Result then
local _flag_result = false
for i = 1, #step.result_data.info_list do
printlog("lingmeng UpdateHandCard3", step.result_data.info_list[i].is_win,
step.result_data.info_list[i].seat)
if step.result_data.info_list[i].is_win and p.seat == step.result_data.info_list[i].seat then
_flag_result = true
end
end
printlog("lingmeng UpdateHandCard3", _flag_result)
info:UpdateHandCard(_flag_result, true)
else
info:UpdateHandCard(true, true)
end
else
if step.cmd == Record_Event.Evt_Win or step.cmd == Record_Event.Evt_Niao then
else
info:UpdateHandCard(false, true)
end
end end
end end
--统一在大结算时显示
if step.cmd == Record_Event.Evt_Win then if step.cmd == Record_Event.Evt_Win then
self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
local info = self._player_card_info[self:GetPos(step.win)]
info._mask_liangpai:AddChild(self._win_pic)
self._win_pic:Center()
else else
if self._win_pic then if self._win_pic then
self._win_pic:Dispose() self._win_pic:Dispose()
end end
end end
--统一在大结算时显示
if step.cmd == Record_Event.Evt_Niao then if step.cmd == Record_Event.Evt_Niao then
local niao_list = step.niao local niao_list = step.niao
self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_HongZhong/Panel_Birds")
local list = self._niao:GetChild("Lst_birds")
list:RemoveChildrenToPool()
for i = 1, #niao_list do
local item = list:AddItemFromPool()
item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card)
if niao_list[i].score > 0 then
item:GetController("bg").selectedIndex = 2
end
end
self._view:AddChild(self._niao)
self._view:AddChild(self._view:GetChild("panel_record"))
self._niao:Center()
else else
if self._niao then
self._niao:Dispose()
end
end end
if step.cmd == Record_Event.Evt_Result then if step.cmd == Record_Event.Evt_Result then
print("lingmeng playerback", self.result)
if not self.result then if not self.result then
self.result = EXClearingView.new(self._root_view, true) local result = step.result_data
self.result:InitData(0, self._room, step.result_data) result.cardList = step.residual_card
self.result = EXClearingView.new(self, { flag_back = true })
self.result:InitData(0, self._room, result)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height self.result._view.height = GRoot.inst.height
self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view) self._anchor:AddChild(self.result._view)
self.result._view.visible = false
self.result._view.x = self._anchor.x * -1 self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1 self.result._view.y = self._anchor.y * -1
local liuju = result and result.liuju or nil
coroutine.start(function()
coroutine.wait(0.3)
--逐个显示胡的特效
for i = 1, #result.info_list do
local hu_info = result.info_list[i]
local player = self._room:GetPlayerBySeat(hu_info.seat)
local info = self._player_card_info[self:GetPos(hu_info.seat)]
if hu_info.is_win then
local win_list = hu_info.win_list
local list_HuCardEffect = info._viewList_HuEffect
local Effects = {}
--先循环一遍把杠上开花放在最前面
for i = 1, #win_list do
local HuMsg = win_list[i]
if HuMsg.type > 2 and HuMsg.type < 60 then
if self.HuCardImg[HuMsg.type][1] == "tile_cs_gangshanghua" then
local imgPath = "ui://Main_Majiang/tile_cs_gangshanghua"
local imgObj = list_HuCardEffect:AddItemFromPool()
local imgLoader = imgObj:GetChild("loader_img")
imgLoader.url = imgPath
imgObj.visible = false
Effects[#Effects + 1] = imgObj
table.remove(win_list, i)
break
end
end
end
for i = 1, #win_list do
local HuMsg = win_list[i]
-- ↓↓↓先排列好特效图片
if HuMsg.type > 2 and HuMsg.type < 60 then
local sound_name = string.format(self.Sound_path .. "%s/%s.mp3",
ViewUtil.Sex_Chat[player.self_user.sex],
"he" .. HuMsg.type)
ViewUtil.PlaySound(self.asset_group, sound_name)
local imgList = self.HuCardImg[HuMsg.type]
for _, img in pairs(imgList) do
local imgPath = "ui://Main_Majiang/" .. img
local imgObj = list_HuCardEffect:AddItemFromPool()
local imgLoader = imgObj:GetChild("loader_img")
imgLoader.url = imgPath
imgObj.visible = false
Effects[#Effects + 1] = imgObj
end
end
end
--小于四个字段时动态调整胡特效
if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
else
list_HuCardEffect.columnGap = 0
end
-- ↓↓↓播放动画
for _, imgObj in pairs(Effects) do
imgObj.visible = true
local effect_xingxing = imgObj:GetChild("effect_xingxing")
effect_xingxing:SetPlaySettings(0, -1, 1, -1);
effect_xingxing.visible = true
effect_xingxing.playing = true
effect_xingxing.onPlayEnd:Set(function()
effect_xingxing.visible = false
end)
local imgLoader = imgObj:GetChild("loader_img")
imgLoader:SetScale(2, 2)
imgLoader:Center()
imgLoader:TweenScale(Vector2(1, 1), 0.3)
coroutine.wait(0.5)
end
coroutine.wait(0.3)
list_HuCardEffect:RemoveChildrenToPool()
end
end
--展示摸鸟
local niao_list = result.niao
self._niao = UIPackage.CreateObject("Extend_MJ_FuZhou", "Panel_Birds")
self._view:GetChild('jiangma_show'):AddChild(self._niao)
self._niao:Center()
local list_niao_card = self._niao:GetChild("Lst_birds")
list_niao_card:RemoveChildrenToPool()
for i = 1, #niao_list do
--顯示正面
local item = list_niao_card:AddItemFromPool()
local card = niao_list[i].card
item.icon = UIPackage.GetItemURL("Main_Majiang", "b202_" .. card)
if niao_list[i].score > 0 then
item:GetController("select").selectedIndex = 1
else
item:GetController("select").selectedIndex = 0
end
coroutine.wait(2 / #niao_list)
end
coroutine.wait(0.3)
self._niao:Dispose()
--统一显示弹出分数
for i = 1, #result.info_list do
local hu_info = result.info_list[i]
local head_info = self._player_info[self:GetPos(hu_info.seat)]
-- 扣分动画
head_info:UpdateScore(hu_info.total_score, true)
end
coroutine.wait(0.3)
if liuju then
self:PlayMJSound("liuju.mp3")
coroutine.wait(3)
self:PlayMJSound("end_music.mp3")
else
self:PlayMJSound("end_music.mp3")
end
coroutine.wait(0.5)
self.result._view.visible = true
end)
else else
self.result._view.visible = true -- self.result._view.visible = true
end end
-- self.result._view:Center() end
else --显示杠分
if self.result then if step.cmd == Record_Event.Evt_GangScore then
self.result._view.visible = false local totalScoreList = step.totalScoreList
local playerList = step.playerList
local addScoreList = step.addScoreList
local scoreData = {}
for i = 1, #totalScoreList do
local p = {}
p.totalScore = totalScoreList[i]
p.player = playerList[i]
p.addScore = addScoreList[i]
scoreData[#scoreData + 1] = p
end
for _, p in pairs(scoreData) do
local player = self._room:GetPlayerById(p.player)
local infoView = self._player_info[self:GetPos(player.seat)]
player.cur_hp = p.totalScore
if p.addScore ~= 0 then
infoView:ScoreAnimation(p.addScore)
if player.cur_hp >= 0 then
infoView._view:GetChild("text_jifen").text = "+" .. player.cur_hp
else
infoView._view:GetChild("text_jifen").text = player.cur_hp
end
end
end end
end end
end end
@ -167,10 +457,12 @@ function M:GenerateAllStepData(data)
local info = data.info local info = data.info
step.cmd = "" step.cmd = ""
step.left_card = info.left_card step.left_card = info.left_card
step.last_get_seat = 0
step.last_out_seat = 0 step.last_out_seat = 0
step.current_out_seat = 1 step.current_out_seat = 1
step.win = 0 step.win = 0
step.niao = 0 step.niao = 0
step.residual_card = info.residual_card
step.player_card_data = {} step.player_card_data = {}
for i = 1, #self._room.player_list do for i = 1, #self._room.player_list do
@ -196,6 +488,7 @@ function M:CmdGetCard(cmd, index)
local data = self:CopyLastStep(index) local data = self:CopyLastStep(index)
data.cmd = cmd.cmd data.cmd = cmd.cmd
data.current_out_seat = cmd.seat data.current_out_seat = cmd.seat
data.last_get_seat = cmd.seat
data.left_card = cmd.data.left_count data.left_card = cmd.data.left_count
local u = data.player_card_data[cmd.seat] local u = data.player_card_data[cmd.seat]
u.card_list[#u.card_list + 1] = cmd.data.card u.card_list[#u.card_list + 1] = cmd.data.card
@ -207,7 +500,7 @@ function M:CmdOutCard(cmd, index)
data.last_out_seat = cmd.seat data.last_out_seat = cmd.seat
local u = data.player_card_data[cmd.seat] local u = data.player_card_data[cmd.seat]
list_remove(u.card_list, cmd.data.card) list_remove(u.card_list, cmd.data.card)
table.sort(u.card_list, ViewUtil.HandCardSort) table.sort(u.card_list, self.HandCardSortAndJing)
u.outcard_list[#u.outcard_list + 1] = cmd.data.card u.outcard_list[#u.outcard_list + 1] = cmd.data.card
end end
@ -217,26 +510,43 @@ function M:CmdAction(cmd, index)
data.last_out_seat = 0 data.last_out_seat = 0
data.current_out_seat = cmd.seat data.current_out_seat = cmd.seat
local u = data.player_card_data[cmd.seat] local u = data.player_card_data[cmd.seat]
for i = 1, #cmd.data.opcard do local fz = nil
list_remove(u.card_list, cmd.data.opcard[i]) local index = -1
end local ftype = cmd.data.type
local fz = {} if (ftype == FZType.Gang_Peng) then
fz.type = cmd.data.type
fz.card = cmd.data.card
fz.opcard = cmd.data.opcard
local uf = data.player_card_data[cmd.data.from_seat]
if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then
table.remove(uf.outcard_list, #uf.outcard_list)
end
if fz.type ~= FZType.Gang_Peng then
u.fz_list[#u.fz_list + 1] = fz
else
for i = 1, #u.fz_list do for i = 1, #u.fz_list do
if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then if (u.fz_list[i].card == cmd.data.card) then
u.fz_list[i].type = FZType.Gang_Peng u.fz_list[i].card = cmd.data.card
fz = u.fz_list[i]
fz.type = cmd.data.type
index = i - 1
break
end end
end end
end end
fz = {}
fz.card = cmd.data.card
fz.type = cmd.data.type
if (index == -1) then
u.fz_list[#u.fz_list + 1] = fz
end
fz.from_seat = cmd.data.from_seat
local remove_num = #cmd.data.opcard
for i = 1, remove_num do
if ftype == FZType.Gang_Peng then
list_remove(u.card_list, cmd.data.card)
else
list_remove(u.card_list, cmd.data.opcard[i])
end
end
u.hand_left_count = u.hand_left_count - remove_num
if cmd.data.from_seat ~= u.seat and ftype ~= FZType.Gang_Peng then
local u = data.player_card_data[cmd.data.from_seat]
table.remove(u.outcard_list, #u.outcard_list)
end
data.fz = fz
end end
function M:CmdWin(cmd, index) function M:CmdWin(cmd, index)
@ -257,10 +567,56 @@ function M:CmdPiao(cmd, index)
data.player_card_data[cmd.seat].piao_niao = cmd.data.num data.player_card_data[cmd.seat].piao_niao = cmd.data.num
end end
function M:CmdFZTip(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.seat = cmd.seat
local tiplist = FZTipList.new()
local list = cmd.data.tip_list
for i = 1, #list do
local dtip = list[i]
local tip = {}
tip.id = dtip["id"]
tip.weight = dtip["weight"]
tip.card = dtip["card"]
tip.type = dtip["type"]
tip.opcard = dtip["opcard"]
tiplist:AddTip(tip)
end
--排序规则,胡杠碰
tiplist:SortList(function(a, b)
return a.type < b.type
end)
data.tiplist = tiplist
data.weight = cmd.data.weight
end
function M:GangScore(cmd, index)
local data = self:CopyLastStep(index)
data.cmd = cmd.cmd
data.seat = cmd.seat
data.totalScoreList = cmd.data.totalScoreList
data.playerList = cmd.data.playerList
data.addScoreList = cmd.data.addScoreList
end
function M:CmdResult(cmd, index) function M:CmdResult(cmd, index)
local data = self:CopyLastStep(index) local data = self:CopyLastStep(index)
data.cmd = cmd.cmd data.cmd = cmd.cmd
data.seat = 0
data.result_data = cmd.data data.result_data = cmd.data
if not data._flag_result then
for i = 1, #cmd.data.info_list do
local info = cmd.data.info_list[i]
if info.is_win and info.seat ~= data.current_out_seat then
local u = data.player_card_data[info.seat]
u.card_list[#u.card_list + 1] = info.win_card
local u = data.player_card_data[data.last_out_seat]
table.remove(u.outcard_list, #u.outcard_list)
end
end
end
data._flag_result = true
end end
function M:CopyLastStep(index) function M:CopyLastStep(index)
@ -273,7 +629,7 @@ function M:CopyLastStep(index)
end end
function M:UpdateLeftCard(num) function M:UpdateLeftCard(num)
self._tex_LeftCard.text = " "..num.." " self._tex_LeftCard.text = "" .. num .. ""
end end
function M:UpdateCardBox(seat) function M:UpdateCardBox(seat)
@ -287,12 +643,53 @@ function M:UpdateCardBox(seat)
self._ctr_cardbox.selectedIndex = index self._ctr_cardbox.selectedIndex = index
end end
function M:UpdateRound(round) function M:UpdateRound()
self._tex_round.text = ""..round.."/"..self._room.room_config.round.."" self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
end
function M:ShowJing()
print("lingmeng jing ", self._room.jing)
if self._room.jing then
self.jing.visible = true
MJPlayerCardInfoView.fillCard2(self, self.jing, "b202_", self._room.jing)
else
self.jing.visible = false
end
end end
function M:UpdateStep(step) function M:UpdateStep(step)
self._record:GetChild("tex_step").text = "" .. step .. " / " .. #self._step .. "" self._record:GetChild("tex_step").text = "" .. step .. " / " .. #self._step .. ""
end end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
return M return M

View File

@ -1,27 +1,25 @@
local PlayerInfoView = require("Game.View.PlayerInfoView") local PlayerInfoView = require("Game.View.PlayerInfoView")
local PlayerInfoView2 = require("Game.View.PlayerInfoView2")
local M = {} local M = {}
function M.new(view, mainView) function M.new(view, mainView,flag_witness)
setmetatable(M, {__index = PlayerInfoView}) setmetatable(M, { __index = PlayerInfoView2 })
local self = setmetatable({}, {__index = M}) local self = setmetatable({}, { __index = M })
self._view = view self._view = view
self._main_view = mainView self._main_view = mainView
self:init() self:init(flag_witness)
return self return self
end end
function M:init() function M:init(flag_witness)
PlayerInfoView.init(self) PlayerInfoView2.init(self,flag_witness)
self._tex_score = self._view:GetChild("info"):GetChild("tex_score1")
self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2")
self._ct_score = self._view:GetChild("info"):GetController("score")
end end
function M:ShowInteraction(type,str) function M:ShowInteraction(type, str)
if type == 3 then if type == 3 then
Voice.DownLoad(str, function(clip) Voice.DownLoad(str, function(clip)
if (clip ) then if (clip) then
self:ShowMaskVoice(clip.length) self:ShowMaskVoice(clip.length)
GameApplication.Instance:PlayVoice(clip) GameApplication.Instance:PlayVoice(clip)
end end
@ -30,47 +28,25 @@ function M:ShowInteraction(type,str)
self:SetChat(str) self:SetChat(str)
elseif type == 2 then elseif type == 2 then
local chat_index = tonumber(str) local chat_index = tonumber(str)
self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) self._main_view:PlayChatSound(self._player.self_user.sex, chat_index)
local language, index = self._main_view:GetChatMsgLanguage(chat_index) local language, index = self._main_view:GetChatMsgLanguage(chat_index)
self:SetChat(self._main_view.Fix_Msg_Chat[index]) self:SetChat(self._main_view.Fix_Msg_Chat[index])
elseif type == 1 then elseif type == 1 then
self:SetBiaoqing("ui://Chat/"..str) self:SetBiaoqing("ui://Chat/" .. str)
end end
end end
function M:UpdateRemainCard(card_num, hide) function M:UpdateRemainCard(card_num, hide)
if hide then if hide then
self._view:GetController("show_remain").selectedIndex = 0 self._view:GetController("show_remain").selectedIndex = 0
else else
self._view:GetController("show_remain").selectedIndex = 1 self._view:GetController("show_remain").selectedIndex = 1
end end
self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num
end end
function M:FillData(player) function M:FillData(player)
PlayerInfoView.FillData(self, player) PlayerInfoView2.FillData(self, player)
self:UpdateScore(player.total_score)
end
function M:UpdateScore()
local score = self._player.total_score
local room = DataManager.CurrenRoom
if room:checkHpNonnegative() then
score = d2ad(self._player.cur_hp)
end
if not score then
score = 0
end
if score < 0 then
self._ct_score.selectedIndex = 1
self._tex_score2.text = score
else
self._ct_score.selectedIndex = 0
if not room:checkHpNonnegative() then
score = "+" .. score
end
self._tex_score.text = score
end
end end
return M return M

View File

@ -0,0 +1,113 @@
--设置窗口对象
local MJSettingViewNew = require("main.majiang.MJSettingViewNew")
local EXSettingView = {}
function EXSettingView.new(main_view, flag_witness)
local self = setmetatable({}, { __index = MJSettingViewNew })
self.class = 'EXSettingView'
self._close_destroy = true
self._mainView = main_view
self._flag_witness = flag_witness
MJSettingViewNew.new(main_view, flag_witness)
--self:init('ui://Main_Majiang/Setting')
return self
end
--[[
local EXSettingView = {}
local M = EXSettingView
setmetatable(M, { __index = BaseWindow })
function EXSettingView:Show(room)
self._room = room
-- 房主,第一个进房间的人
local roomOwner = self._room.player_list[1].self_user.account_id
if roomOwner == DataManager.SelfUser.account_id then
self.cBtn.selectedIndex = 1
else
self.cBtn.selectedIndex = 0
end
BaseWindow.Show(self)
end
function EXSettingView.new(main_view, flag_witness)
local self = setmetatable({}, { __index = M })
self.class = 'EXSettingView'
self._close_destroy = true
self._mainView = main_view
self._flag_witness = flag_witness
self:init('ui://Main_Majiang/Setting')
return self
end
function M:init(url)
BaseWindow.init(self, url)
local view = self._view
local slider_sound = view:GetChild('slider_vedio_sound')
local slider_music = view:GetChild('slider_vedio_music')
local btn_music = view:GetChild('btn_vedio_music')
local btn_sound = view:GetChild('btn_vedio_sound')
self.cBtn = self._view:GetController('cBtn')
slider_sound.value = GameApplication.Instance.SoundValue
slider_music.value = GameApplication.Instance.MusicValue
slider_music.onChanged:Add(function()
GameApplication.Instance.MusicValue = slider_music.value
btn_music.selected = false
GameApplication.Instance.MusicMute = false;
end)
slider_sound.onChanged:Add(function()
GameApplication.Instance.SoundValue = slider_sound.value
btn_sound.selected = false
GameApplication.Instance.SoundMute = false;
end)
btn_sound.onClick:Add(function()
GameApplication.Instance.SoundMute = btn_sound.selected;
end)
btn_music.onClick:Add(function()
GameApplication.Instance.MusicMute = btn_music.selected;
end)
local _btn_logout = self._view:GetChild('btn_cancelRoom')
_btn_logout.onClick:Set(function()
if self._flag_witness then
local _room = DataManager.CurrenRoom
pt(_room)
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id,
_room.room_id)
ViewManager.ChangeView(ViewManager.View_Family)
else
if self._mainView.dismiss_room_cd_time > 0 then
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:AskDismissRoom()
end
end
end)
self._view:GetChild("btn_closeRoom").onClick:Set(function()
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:LevelRoom(function(res)
print("退出房间")
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
return
end
ViewManager.ChangeView(ViewManager.View_Family)
end)
end)
end
]]
return EXSettingView

View File

@ -0,0 +1,520 @@
local EXRoomConfig = import(".EXRoomConfig")
local EXClearingView = import(".EXClearingView")
local TX_GameEvent = import(".GameEvent")
local PlayerInfoView = import(".EXPlayerInfoView")
local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView")
local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView")
local SettingView = import(".EXSettingView")
local TableBG = require("Game.Data.TableBG")
local WitnessView = require("main.majiang.MJWitnessView")
local MJMainView = require("main.majiang.MJMainView")
local HuCardImg = import(".HuCardImg")
local Record_Event = import(".RecordEvent")
local M = {}
--- Create a new
function M.new()
setmetatable(M, { __index = WitnessView })
local self = setmetatable({}, { __index = M })
self.class = "EXMJWitness"
self:init()
return self
end
function M:init()
getmetatable(M).__index.init(self)
end
function M:InitView()
local room = self._room
getmetatable(M).__index.InitView(self)
UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou")
self:EventInit()
UpdateBeat:Add(self.OnUpdate, self)
self.HuCardImg = setmetatable(HuCardImg, { __index = self.HuCardImg })
self.Sound_path = "extend/majiang/fuzhou/sound/"
local centerBox = self._view:GetChild("Comp_ConterBox")
self._ctr_cardbox = centerBox:GetController("seat")
self._tex_leftTime = centerBox:GetChild("Text_Time")
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
------------------渲染桌面信息--------------------------
self._view:GetChild('text_time').text = os.date("%H:%M", os.time())
self._view:GetChild('text_roomId').text = room.room_id
self._state = self._view:GetController("state")
self._text_remined = self._view:GetChild('remaining_card')
self._text_round = self._view:GetChild('text_round')
self._cursor = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Ani_play_bj")
-- self._state.onChanged:Add(function()
-- self:UpdatePlayerInfoView()
-- end)
self:UpdateRound()
self:InitPlayerInfoView()
self._player_card_info = {}
local _player_card_info = self._player_card_info
if room.curren_round > 0 then
for i = 1, #room.player_list do
local p = room.player_list[i]
local index = self:GetPos(p.seat)
print("lingmeng index", index)
local info = self._player_info[i]
local tem = self._view:GetChild("player_card_info" .. i)
_player_card_info[i] = self:NewMJPlayerCardInfoView(tem, i)
local cardInfo = _player_card_info[i]
cardInfo:SetPlayer(p)
cardInfo:UpdateHandCardWitness(false)
cardInfo:UpdateOutCardList(nil, nil, self._cursor)
for i = 1, #p.fz_list do
cardInfo:UpdateFzList(p.fz_list[i], -1)
end
info:FillData(p)
info._view.visible = true
end
else
for i = 1, room.room_config.people_num do
local tem = self._view:GetChild("player_card_info" .. i)
_player_card_info[i] = self:NewMJPlayerCardInfoView(tem, i)
end
for i = 1, #room.player_list do
local p = room.player_list[i]
local index = self:GetPos(p.seat)
local info = self._player_info[i]
local cardInfo = _player_card_info[index]
cardInfo:SetPlayer(p)
cardInfo:UpdateHandCardWitness(false)
cardInfo:UpdateOutCardList(nil, nil, self._cursor)
for i = 1, #p.fz_list do
cardInfo:UpdateFzList(p.fz_list[i], -1)
end
info:FillData(p)
info._view.visible = true
end
end
local btn_rule = self._view:GetChild('btn_rule')
if btn_rule ~= nil then
btn_rule.onClick:Set(function()
if self.RuleView == nil or self.RuleView._is_destroy then
self.RuleView = RoomInfoView.new(self._room)
end
self.RuleView:Show()
end)
end
local btn_exit = self._view:GetChild('btn_exitWitness')
if btn_exit ~= nil then
btn_exit.onClick:Set(function()
self._gamectr:ExitWitnessGame()
ViewManager.ChangeView(ViewManager.View_Family)
end)
end
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 viewList_witness.numItems == #room.witness_player_list then
viewList_witness:RefreshVirtualList()
else
viewList_witness.numItems = #room.witness_player_list
end
--展示精牌
self.jing = self._view:GetChild('jing')
self:ShowJing()
-------------------------------------------------------
self._state.selectedIndex = 4
self.com_logocType.selectedIndex = 0
end
function M:EventInit()
-- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong")
getmetatable(M).__index.EventInit(self)
local _room = self._room
local _view = self._view
local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard")
local _player_info = self._player_info
local _gamectr = self._gamectr
_gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...)
local arg = { ... }
print("lingmeng witness SendLaiZi")
end)
_gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...)
local arg = { ... }
print("lingmeng witness SendGangZi")
end)
_gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...)
local arg = { ... }
print("lingmeng witness EventBuGang")
end)
_gamectr:AddEventListener(TX_GameEvent.OutHint, function(...)
print("lingmeng witness OutHint")
end)
_gamectr:AddEventListener(TX_GameEvent.GetCard, function(...)
print("lingmeng witness GetCard")
end)
_gamectr:AddEventListener(TX_GameEvent.FZTips, function(...)
print("lingmeng witness FZTips")
end)
_gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...)
self._popEvent = false
self._left_time = 0
self:UpdateCardBox(0)
local arg = { ... }
local win_seat = arg[1]
local lose_seat = arg[2]
local win_card = arg[3]
local cards = arg[4]
local win_list = arg[5]
local scoreData = arg[6]
local index = self:GetPos(win_seat)
local info = self._player_card_info[index]
local player = self._room:GetPlayerBySeat(win_seat)
MJMainView.ShowHand(self, scoreData)
info:ShowHuCard(win_card, index == 1)
-- self.cHuCardEffect.selectedIndex = 1
local loader_HuEffect = info._viewLoader_selfHuCardEffect
local list_HuCardEffect = info._viewList_HuEffect
---
local isZiMo = win_seat == lose_seat
DataManager.CurrenRoom.isZiMoHu = isZiMo
local hu_sound = isZiMo and ("zimo") or ("hu")
printlog("声音====>>>", hu_sound)
self:PlaySound(self.asset_group, player.self_user.sex, hu_sound)
local effects = isZiMo and ("tile_zimo") or ("tile_hu")
loader_HuEffect.visible = true
loader_HuEffect.url = "ui://Main_Majiang/" .. effects
loader_HuEffect:SetScale(2, 2)
loader_HuEffect:TweenScale(Vector2(1, 1), 0.3):SetEase(EaseType.QuartOut)
--观战暂时把这个特效去了,现在这个特效位置也不对
-- self.effect_ZiMo.xy = loader_HuEffect.xy
-- self.effect_ZiMo:SetPlaySettings(0, -1, 1, -1);
-- self.effect_ZiMo.visible = true
-- self.effect_ZiMo.playing = true
-- self.effect_ZiMo.onPlayEnd:Set(function()
-- self.effect_ZiMo.visible = false
-- end)
coroutine.start(function()
coroutine.wait(0.5)
loader_HuEffect.visible = false
local Effects = {}
for i = 1, #win_list do
local HuMsg = win_list[i]
-- ↓↓↓先排列好特效图片
if HuMsg.type > 2 and HuMsg.type < 32 then
local sound_name = string.format(self.Sound_path .. "%s/%s.mp3",
ViewUtil.Sex_Chat[player.self_user.sex],
"he" .. HuMsg.type)
ViewUtil.PlaySound(self.asset_group, sound_name)
-- self:PlaySound(self.asset_group, player.self_user.sex, "he" .. HuMsg.type)
local imgList = self.HuCardImg[HuMsg.type]
for _, img in pairs(imgList) do
local imgPath = "ui://Main_Majiang/" .. img
local imgObj = list_HuCardEffect:AddItemFromPool()
local imgLoader = imgObj:GetChild("loader_img")
imgLoader.url = imgPath
imgObj.visible = false
Effects[#Effects + 1] = imgObj
end
end
end
-- ↓↓↓播放动画
for _, imgObj in pairs(Effects) do
imgObj.visible = true
local effect_xingxing = imgObj:GetChild("effect_xingxing")
effect_xingxing:SetPlaySettings(0, -1, 1, -1);
effect_xingxing.visible = true
effect_xingxing.playing = true
effect_xingxing.onPlayEnd:Set(function()
effect_xingxing.visible = false
end)
local imgLoader = imgObj:GetChild("loader_img")
imgLoader:SetScale(2, 2)
imgLoader:Center()
imgLoader:TweenScale(Vector2(1, 1), 0.3)
coroutine.wait(0.5)
end
-- 扣分动画
for _, pScore in pairs(scoreData) do
local infoView = self._player_info[self:GetPos(pScore.seat)]
infoView:UpdateScore(pScore.total_score, true)
end
coroutine.wait(0.5)
self._popEvent = true
list_HuCardEffect:RemoveChildrenToPool()
-- self.cHuCardEffect.selectedIndex = 0
end)
end)
_gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...)
print("lingmeng witness EventNiao")
end)
_gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...)
self:PlayMJSound("end_music.mp3")
local _room = self._room
self._left_time = 0
self:UpdateCardBox(0)
self._ctr_cardbox.selectedIndex = 0
local arg = { ... }
MJMainView.ShowHand(self, arg)
local result = arg[1]
local liuju = result.liuju
local data = result.info_list
local niao = result.niao
-- if liuju then
-- local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu")
-- self._view:AddChild(le)
-- le:Center()
-- le:GetTransition("t0"):Play()
-- coroutine.start(function()
-- coroutine.wait(1)
-- le:Dispose()
-- end)
-- end
-- self:RemoveCursor()
if self._clearingView == nil then
self._clearingView = EXClearingView.new(self)
coroutine.start(function()
coroutine.wait(0.5)
self._clearingView:Show()
self._popEvent = true
end)
end
if _room.curren_round ~= _room.room_config.round then
-- if #niao == 0 then self._view:GetChild("n13").visible = false end
self._clearingView:InitData(0, _room, result, nil, function(...)
for i = 1, #data do
local p = _room:GetPlayerBySeat(data[i].seat)
p.total_score = data[i].total_score
local card_info = self._player_card_info[self:GetPos(p.seat)]
local info = self._player_info[self:GetPos(p.seat)]
--card_info:Clear()
card_info:ResetCardType()
if _room:checkHpNonnegative() then
p.cur_hp = data[i].total_score
end
info:UpdateScore()
info._view:GetChild("zhanji").visible = true
local num = data[i].total_score
if num >= 0 then
info._view:GetController("text_color").selectedIndex = 0
info._view:GetChild("text_jifen").text = "+" .. num
else
info._view:GetController("text_color").selectedIndex = 1
info._view:GetChild("text_jifen").text = num
end
info._view:GetChild("mask_piao").title = ""
info._view:GetController("piao_niao").selectedIndex = 0
p.fz_list = {}
end
DataManager.CurrenRoom.self_player.card_list = {}
self._clearingView = nil
end)
end
end)
_gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...)
print("lingmeng witness ZPResult2")
self:UnmarkSelfTuoguan()
self._left_time = 0
self:UpdateCardBox(0)
self._ctr_cardbox.selectedIndex = 0
local arg = { ... }
local total_result = arg[2]
local result = arg[1]
local over = arg[3]
self._clearingView = EXClearingView.new()
if over ~= 2 or _room.curren_round > 0 then
coroutine.start(function()
coroutine.wait(0.5)
self._clearingView:Show()
end)
end
self._clearingView:InitData(over, _room, result, total_result)
ControllerManager.ChangeController(LoddyController)
end)
_gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function()
print("lingmeng witness EvnetPiaoTip")
end)
_gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...)
print("lingmeng witness EvnetPiao")
end)
_gamectr:AddEventListener(TX_GameEvent.EventResidueCard, function(...)
print("lingmeng witness EventResidueCard")
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:InitPlayerInfoView()
self._player_info = {}
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_2", i))
_player_info[i] = PlayerInfoView.new(tem, self, true)
tem.visible = false
end
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:RemoveCursor()
self._cursor:RemoveFromParent()
end
function M:UpdateCardBox(seat)
local index = seat - 1
local people_num = self._room.room_config.people_num
if people_num == 2 and seat == 2 then
index = 2
end
self._ctr_cardbox.selectedIndex = index
end
local majiang_asset_path = "base/main_majiang/sound/"
function M:PlayMJSound(path)
ViewUtil.PlaySound(self.asset_group, majiang_asset_path .. path)
end
function M:PlaySound(group, sex, path)
local sex_path = ViewUtil.Sex_Chat[sex]
local path1 = majiang_asset_path .. string.format("%s/%s.mp3", sex_path, path)
ViewUtil.PlaySound(group, path1)
end
function M:UpdateRound()
self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
end
function M:ShowJing()
if self._room.jing then
self.jing.visible = true
MJPlayerCardInfoView.fillCard2(self, self.jing, "b202_", self._room.jing)
else
self.jing.visible = false
end
end
-- function M:UpdatePlayerInfoView()
-- self._player_info = {}
-- local _player_info = self._player_info
-- local list = self._room.player_list
-- for i = 1, self._room.room_config.people_num do
-- local seat = self:GetPos(list[i].seat)
-- local tem = self._view:GetChild(string.format("player_info%d_%d", seat,
-- (self._state.selectedIndex == 4 and 1 or 0) + 1))
-- _player_info[seat] = PlayerInfoView.new(tem, self)
-- _player_info[seat]:FillData(list[i])
-- printlog("lingmeng _player_info", tem, seat, list[i].self_user.nick_name)
-- end
-- end
function M:ResetConnect()
end
function M:GetPos(seat)
return ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num)
end
function M.HandCardSortAndJing(a, b)
local jing = DataManager.CurrenRoom.jing
if a == jing or b == jing then
if a == b then
return a < b
end
return a == jing
else
if a < 200 then
a = a + 1000
elseif a < 300 then
a = a + 3000
elseif a < 400 then
a = a + 2000
else
a = a + 4000
end
if b < 200 then
b = b + 1000
elseif b < 300 then
b = b + 3000
elseif b < 400 then
b = b + 2000
else
b = b + 4000
end
return a < b
end
end
return M

View File

@ -5,6 +5,7 @@ local EXMainView = import(".EXMainView")
local EXGameController = import(".EXGameController") local EXGameController = import(".EXGameController")
local EXRoomConfig = import(".EXRoomConfig") local EXRoomConfig = import(".EXRoomConfig")
local EXPlayBackView = import(".EXPlayBackView") local EXPlayBackView = import(".EXPlayBackView")
local EXWitnessView = import(".EXWitnessView")
local MJRoom = require("main.majiang.MJRoom") local MJRoom = require("main.majiang.MJRoom")
local ExtendConfig = {} local ExtendConfig = {}
@ -20,6 +21,7 @@ function ExtendConfig.new()
self._viewMap = {} self._viewMap = {}
self._viewMap[ViewManager.View_Main] = EXMainView self._viewMap[ViewManager.View_Main] = EXMainView
self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView
self._viewMap[ViewManager.View_Witness] = EXWitnessView
return self return self
end end

View File

@ -27,6 +27,13 @@ local TX_GameEvent = {
EvnetPiao = "EvnetPiao", EvnetPiao = "EvnetPiao",
EventXiPai="EventXiPai",
---
SendLaiZi = "SendLaiZi",
SendGangZi = "SendGangZi",
EventBuGang = "EventBuGang",
---
EventResidueCard = "EventResidueCard"
} }
return TX_GameEvent return TX_GameEvent

View File

@ -0,0 +1,50 @@
local HuCardImg = {
}
HuCardImg[1] = { "tile_hu" }
HuCardImg[2] = { "tile_zimo" }
HuCardImg[3] = { "tile_cs_shisanlan" }
HuCardImg[4] = { "tile_cs_qxshisanlan" }
HuCardImg[5] = { "tile_cs_pengpenghu" }
HuCardImg[6] = { "tile_cs_pengpenghu", "tile_cs_qingyise" }
HuCardImg[7] = { "tile_cs_pengpenghu", "tile_cs_ziyise" }
HuCardImg[8] = { "tile_cs_qidui" }
HuCardImg[9] = { "tile_cs_qidui", "tile_cs_qingyise" }
HuCardImg[10] = { "tile_cs_qidui", "tile_cs_ziyise" }
HuCardImg[11] = { "tile_cs_qingyisezhenhu" }
HuCardImg[12] = { "tile_cs_qingyisejiahu" }
HuCardImg[13] = { "tile_cs_ziyisezhenhu" }
HuCardImg[14] = { "tile_cs_ziyisejiahu" }
HuCardImg[15] = { "tile_cs_tianhu" }
HuCardImg[16] = { "tile_cs_dihu" }
HuCardImg[17] = { "tile_cs_pinghu" }
HuCardImg[18] = { "tile_cs_qiangganghu" }
HuCardImg[19] = { "tile_cs_gangshanghua" }
HuCardImg[20] = { "缺失" }
HuCardImg[21] = { "tile_cs_siguiyi" }
HuCardImg[22] = { "tile_cs_baguiyi" }
HuCardImg[23] = { "tile_cs_seguiyi" }
HuCardImg[24] = { "tile_cs_qingyisejiahu","tile_cs_siguiyi" }
HuCardImg[25] = { "tile_cs_qingyisezhenhu","tile_cs_siguiyi" }
HuCardImg[26] = { "tile_cs_qingyisejiahu","tile_cs_baguiyi" }
HuCardImg[27] = { "tile_cs_qingyisezhenhu","tile_cs_baguiyi" }
HuCardImg[28] = { "tile_cs_qingyisejiahu","tile_cs_seguiyi" }
HuCardImg[29] = { "tile_cs_qingyisezhenhu","tile_cs_seguiyi" }
HuCardImg[30] = { "tile_cs_ziyisejiahu","tile_cs_siguiyi" }
HuCardImg[31] = { "tile_cs_ziyisezhenhu","tile_cs_siguiyi" }
HuCardImg[32] = { "tile_cs_ziyisejiahu","tile_cs_baguiyi" }
HuCardImg[33] = { "tile_cs_ziyisezhenhu","tile_cs_baguiyi" }
HuCardImg[34] = { "tile_cs_ziyisejiahu","tile_cs_seguiyi" }
HuCardImg[35] = { "tile_cs_ziyisezhenhu","tile_cs_seguiyi" }
HuCardImg[36] = { "tile_cs_qingyise","tile_cs_qidui","tile_cs_siguiyi" }
HuCardImg[37] = { "tile_cs_qingyise","tile_cs_qidui","tile_cs_baguiyi" }
HuCardImg[38] = { "tile_cs_qingyise","tile_cs_qidui","tile_cs_seguiyi" }
HuCardImg[39] = { "tile_cs_ziyise","tile_cs_qidui","tile_cs_siguiyi" }
HuCardImg[40] = { "tile_cs_ziyise","tile_cs_qidui","tile_cs_baguiyi" }
HuCardImg[41] = { "tile_cs_ziyise","tile_cs_qidui","tile_cs_seguiyi" }
HuCardImg[42] = { "tile_cs_qidui","tile_cs_siguiyi" }
HuCardImg[43] = { "tile_cs_qidui","tile_cs_baguiyi" }
HuCardImg[44] = { "tile_cs_qidui","tile_cs_seguiyi" }
return HuCardImg

View File

@ -4,177 +4,209 @@ local CardCheck = import(".CardCheck")
local M = {} local M = {}
-- --
function M.new(view, mainView) function M.new(view, mainView, record, direction)
setmetatable(MJPlayerSelfCardInfoView, { __index = MJPlayerCardInfoView }) setmetatable(MJPlayerSelfCardInfoView, { __index = MJPlayerCardInfoView })
setmetatable(M, { __index = MJPlayerSelfCardInfoView }) setmetatable(M, { __index = MJPlayerSelfCardInfoView })
local self = setmetatable({}, { __index = M }) local self = setmetatable({}, { __index = M })
self.class = "PlayerSelfCardInfoView" self.class = "PlayerSelfCardInfoView"
self._view = view self._view = view
self._mainView = mainView self._mainView = mainView
self.direction = direction
self._flag_canTing = true
self:init() self:init()
return self return self
end end
function M:ShowHuTip(card_list) function M:init()
local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, getmetatable(M).__index.init(self)
DataManager.CurrenRoom.room_config.Laizi) end
if #tingList > 0 then
table.insert(tingList, 412) function M:ShowHuTip(card_list, have_bg)
self._mainView._hu_tip:FillData(self:GetTingList(card_list), have_bg)
end
function M:GetTingList(card_list)
if not self._flag_canTing then
return {}
end end
self._mainView._hu_tip:FillData(tingList) return CardCheck.MuiltiplteCaculateTingPai(card_list, { _hu_qidui = true, _hu_shisanlan = true })
end end
function M:UpdateHandCard(getcard, mp) function M:UpdateHandCard(getcard, mp)
MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp)
local _carViewList = self._carViewList -- local _carViewList = self._carViewList
local card_list = DataManager.CurrenRoom.self_player.card_list
self:ShowHuTip(card_list) -- if DataManager.CurrenRoom.laiziInfo and #self._carViewList > 0 then
if getcard then -- for i = 1, #self._carViewList do
self._out_card = true -- local obj = self._carViewList[i]
local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) -- if obj and obj.card then
-- 记录需要标记听牌提示的牌 -- if IsHasDictionary(obj.card_item, DataManager.CurrenRoom.laiziInfo) then
local lst_mark = {} -- if obj.card.GetController then
local total_num = 0 -- if obj.card:GetController("laizi") then
for i = 1, #_carViewList do -- obj.card:GetController("laizi").selectedIndex = 1
local btn = _carViewList[i].card -- end
local card = self:GetCard(btn) -- end
list_remove(card_list, card) -- else
local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, -- if obj.card.GetController then
DataManager.CurrenRoom.room_config.Laizi) -- if obj.card:GetController("laizi") then
if #tingList > 0 then -- obj.card:GetController("laizi").selectedIndex = 0
local count = 0 -- end
for j = 1, #tingList do -- end
count = count + self._mainView:CountCardLeftNum(tingList[j]) -- end
end -- end
local tem = {} -- end
tem.item = btn -- end
tem.count = count
total_num = total_num + count
table.insert(lst_mark, tem) -- local card_list = DataManager.CurrenRoom.self_player.card_list
end -- -- self:ShowHuTip(card_list)
table.insert(card_list, card) -- if getcard then
end -- self._out_card = true
table.sort(lst_mark, function(a, b) -- local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list)
return a.count > b.count -- -- 记录需要标记听牌提示的牌
end) -- local lst_mark = {}
-- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' -- local total_num = 0
local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false -- for i = 1, #_carViewList do
for i = 1, #lst_mark do -- local btn = _carViewList[i].card
local tem = lst_mark[i] -- local card = self:GetCard(btn)
if all_same or tem.count < lst_mark[1].count then -- list_remove(card_list, card)
tem.item:GetController("mark_ting").selectedIndex = 1 -- local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true,
else -- DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi)
tem.item:GetController("mark_ting").selectedIndex = 2 -- if #tingList > 0 then
end -- local count = 0
end -- for j = 1, #tingList do
else -- count = count + self._mainView:CountCardLeftNum(tingList[j])
for i = 1, #_carViewList do -- end
local btn = _carViewList[i].card -- local tem = {}
if btn:GetController("mark_ting").selectedIndex ~= 0 then -- tem.item = btn
btn:GetController("mark_ting").selectedIndex = 0 -- tem.count = count
end -- total_num = total_num + count
end -- table.insert(lst_mark, tem)
self._out_card = false -- end
end -- table.insert(card_list, card)
-- end
-- table.sort(lst_mark, function(a, b)
-- return a.count > b.count
-- end)
-- -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多'
-- local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false
-- for i = 1, #lst_mark do
-- local tem = lst_mark[i]
-- if all_same or tem.count < lst_mark[1].count then
-- tem.item:GetController("mark_ting").selectedIndex = 1
-- else
-- tem.item:GetController("mark_ting").selectedIndex = 2
-- end
-- end
-- else
-- for i = 1, #_carViewList do
-- local btn = _carViewList[i].card
-- if btn:GetController("mark_ting").selectedIndex ~= 0 then
-- btn:GetController("mark_ting").selectedIndex = 0
-- end
-- end
-- self._out_card = false
-- end
end end
function M:__OnClickHandCard(context) -- function M:__OnClickHandCard(context)
local button = context.sender -- local button = context.sender
local _carViewList = self._carViewList -- local _carViewList = self._carViewList
local refresh = true -- local refresh = true
local card_list = {} -- local card_list = {}
for i = 1, #_carViewList do -- for i = 1, #_carViewList do
local btn = _carViewList[i].card -- local btn = _carViewList[i].card
local card = self:GetCard(btn) -- local card = self:GetCard(btn)
if btn ~= button and btn.selected == true then -- if btn ~= button and btn.selected == true then
if button.data.card_item == card then -- if button.data.card_item == card then
refresh = false -- refresh = false
else -- else
self._mainView:markOutCards(false, card) -- self._mainView:markOutCards(false, card)
end -- end
btn.selected = false -- btn.selected = false
end -- end
if not btn.selected then -- if not btn.selected then
table.insert(card_list, card) -- table.insert(card_list, card)
end -- end
end -- end
if self._out_card then -- if self._out_card then
self:ShowHuTip(card_list) -- -- self:ShowHuTip(card_list)
end -- end
-- 标记出牌 -- -- 标记出牌
if refresh then -- if refresh then
if button.selected then -- if button.selected then
self._mainView:markOutCards(true, button.data.card_item) -- self._mainView:markOutCards(true, button.data.card_item)
else -- else
self._mainView:markOutCards(false, button.data.card_item) -- self._mainView:markOutCards(false, button.data.card_item)
end -- end
end -- end
local _room = DataManager.CurrenRoom -- local _room = DataManager.CurrenRoom
if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then -- if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then
local card = button.data -- local card = button.data
self._mainView:OutCard(card.card_item) -- self._mainView:OutCard(card.card_item)
end -- end
end -- end
function M:__OnDragStart(card) -- function M:__OnDragStart(card)
local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) -- local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list)
list_remove(card_list, card) -- list_remove(card_list, card)
self:ShowHuTip(card_list) -- -- self:ShowHuTip(card_list)
end -- end
function M:__OnDragEnd(context) -- function M:__OnDragEnd(context)
if self.outcard_button then -- if self.outcard_button then
self.outcard_button:Dispose() -- self.outcard_button:Dispose()
self.outcard_button = nil -- self.outcard_button = nil
end -- end
local button = context.sender -- local button = context.sender
--button:RemoveFromParent() -- --button:RemoveFromParent()
local card = button.data -- local card = button.data
local _room = DataManager.CurrenRoom -- local _room = DataManager.CurrenRoom
-- -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) -- -- -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat)
if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 412) then -- if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then
self._mainView:OutCard(card.card_item) -- self._mainView:OutCard(card.card_item)
button.touchable = false -- button.touchable = false
self.outcard_button = button -- self.outcard_button = button
else -- else
self._area_handcard_list:AddChildAt(button, card.index) -- self._area_handcard_list:AddChildAt(button, card.index)
button:TweenMove(card.old_postion, 0.2) -- button:TweenMove(card.old_postion, 0.2)
end -- end
end -- end
function M:CheckPlayerOnlineState() -- function M:CheckPlayerOnlineState()
local room = DataManager.CurrenRoom -- local room = DataManager.CurrenRoom
for i = 1, #room.player_list do -- for i = 1, #room.player_list do
if room.player_list[i].line_state == 0 then -- if room.player_list[i].line_state == 0 then
return false -- return false
end -- end
end -- end
return true -- return true
end -- end
function M:Clear(bskip) function M:Clear(bskip)
MJPlayerSelfCardInfoView.Clear(self)
--self._ctr_state.selectedIndex = 0 --self._ctr_state.selectedIndex = 0
self._area_fz_list.x = self._src_fz_list.x -- self._area_fz_list.x = self._src_fz_list.x
self._area_fz_list.y = self._src_fz_list.y -- self._area_fz_list.y = self._src_fz_list.y
self._area_fz_list.width = self._src_fz_list.z -- self._area_fz_list.width = self._src_fz_list.z
self._area_fz_list.height = self._src_fz_list.w -- self._area_fz_list.height = self._src_fz_list.w
self._area_fz_list:RemoveChildren(0, -1, true) -- self._area_fz_list:RemoveChildren(0, -1, true)
self._area_handcard_list:RemoveChildren(0, -1, true) -- self._area_handcard_list:RemoveChildren(0, -1, true)
self._area_outcard_list:RemoveChildren(0, -1, true) -- self._area_outcard_list:RemoveChildren(0, -1, true)
if bskip == nil or bskip == false then -- if bskip == nil or bskip == false then
self._mask_liangpai:RemoveChildren(0, -1, true) -- self._mask_liangpai:RemoveChildren(0, -1, true)
end -- end
for i = 1, #self._carViewList do -- for i = 1, #self._carViewList do
self._carViewList[i].card:Dispose() -- self._carViewList[i].card:Dispose()
end -- end
self._carViewList = {} -- self._carViewList = {}
end end
return M return M

View File

@ -44,6 +44,15 @@ local Protocol = {
-- 飘鸟事件 -- 飘鸟事件
GAME_EVT_PIAO = "834", GAME_EVT_PIAO = "834",
GAME_EVT_GANGZI = "837",
GAME_EVT_BUGANG = "838",
GAME_EVT_DOGANG = "839",
--送牌
GAME_NEXT_CARD = "888",
GAME_RESIDUE_CARD = "613",
GAME_EVT_RESIDUE_CARD = "889",
GAME_XIPAI = "20836", GAME_XIPAI = "20836",
GAME_EVENT_XIPAI = "20837", GAME_EVENT_XIPAI = "20837",
GAME_EVENT_NOTIFY_XIPAI = "20838", GAME_EVENT_NOTIFY_XIPAI = "20838",

View File

@ -6,6 +6,8 @@ local Record_Event = {
Evt_Niao = "Niao", Evt_Niao = "Niao",
Evt_Piao = "PiaoNiao", Evt_Piao = "PiaoNiao",
Evt_Result = "Result", Evt_Result = "Result",
Evt_FZTip = "FizTip",
Evt_GangScore = "GangScore",
} }
return Record_Event return Record_Event

View File

@ -54,6 +54,8 @@ function M:RegisterEvt()
self._eventmap[EXProtocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard self._eventmap[EXProtocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard
self._eventmap[EXProtocol.EXBomb_Score_New] = self.OnBompScoreNew self._eventmap[EXProtocol.EXBomb_Score_New] = self.OnBompScoreNew
self._eventmap[EXProtocol.EXCheckCard_Succ] = self.OnCheckCard self._eventmap[EXProtocol.EXCheckCard_Succ] = self.OnCheckCard
self._eventmap[EXProtocol.EXBaseScore] = self.OnGetBaseScore
self._eventmap[EXProtocol.EXShowRank] = self.OnShowRank
end end
-- function M:Oener(evt_data) -- function M:Oener(evt_data)
@ -209,19 +211,17 @@ function M:OnInitCard(evt_data)
end end
function M:OnBombScore(evt_data) function M:OnBombScore(evt_data)
printlog("lingmeng OnBombScore") local scoreList = evt_data["gold_list"]
-- local scoreList = evt_data["gold_list"] self._cacheEvent:Enqueue(
-- self._cacheEvent:Enqueue( function()
-- function() for i = 1, #scoreList do
-- -- for i = 1, #scoreList do local score = scoreList[i].bom_score
-- -- local score = scoreList[i].bom_score local player = self._room:GetPlayerById(scoreList[i].aid)
-- -- local player = self._room:GetPlayerById(scoreList[i].aid) player.total_score = player.total_score + score
-- -- player.total_score = player.total_score + score end
-- -- end DispatchEvent(self._dispatcher, EXGameEvent.OnBombScore, scoreList)
-- -- DispatchEvent(self._dispatcher, EXGameEvent.OnBombScore, scoreList) end
-- end )
-- )
printlog("lingmeng OnBombScoreend")
end end
function M:OnPlaySucc(evt_data) function M:OnPlaySucc(evt_data)
@ -239,12 +239,13 @@ function M:OnPlaySuccCheck(evt_data)
local card_obj = evt_data["card_obj"] local card_obj = evt_data["card_obj"]
local cards = card_obj["card_list"] local cards = card_obj["card_list"]
local remain = evt_data["remain"] -- 报单 local remain = evt_data["remain"] -- 报单
local baseScore = evt_data["score"] or 0
self._cacheEvent:Enqueue( self._cacheEvent:Enqueue(
function() function()
local player = self._room:GetPlayerBySeat(seat) local player = self._room:GetPlayerBySeat(seat)
player.hand_count = remain player.hand_count = remain
player.out_card_list = cards player.out_card_list = cards
DispatchEvent(self._dispatcher, EXGameEvent.OnPlaySucc, player, remain) DispatchEvent(self._dispatcher, EXGameEvent.OnPlaySucc, player, remain, baseScore)
end end
) )
end end
@ -263,11 +264,11 @@ function M:OnPassSucc(evt_data)
local seat = evt_data["seat"] local seat = evt_data["seat"]
self._cacheEvent:Enqueue( self._cacheEvent:Enqueue(
function() function()
print("lingmeng OnPassSucc",seat) print("lingmeng OnPassSucc", seat)
local p = self._room:GetPlayerBySeat(seat) local p = self._room:GetPlayerBySeat(seat)
p.out_card_list = { 0 } p.out_card_list = { 0 }
DispatchEvent(self._dispatcher, EXGameEvent.OnPassSucc, p) DispatchEvent(self._dispatcher, EXGameEvent.OnPassSucc, p)
print("lingmeng OnPassSuccend",seat) print("lingmeng OnPassSuccend", seat)
end end
) )
end end
@ -301,11 +302,9 @@ function M:OnIndexMove(evt_data)
local seat = evt_data["index"] local seat = evt_data["index"]
self._cacheEvent:Enqueue( self._cacheEvent:Enqueue(
function() function()
printlog("lingmeng OnIndexMove", seat)
self._room.curren_turn_seat = seat self._room.curren_turn_seat = seat
self._room.is_new_bout = self:GetIsNewBout(seat) self._room.is_new_bout = self:GetIsNewBout(seat)
DispatchEvent(self._dispatcher, EXGameEvent.OnIndexMove, seat) DispatchEvent(self._dispatcher, EXGameEvent.OnIndexMove, seat)
printlog("lingmeng OnIndexMoveend", seat)
end end
) )
end end
@ -358,6 +357,7 @@ function M:OnResult(evt_data)
local info = evt_data["info"] local info = evt_data["info"]
local winseat = evt_data["winseat"] local winseat = evt_data["winseat"]
local remaincards = evt_data["remaincards"] local remaincards = evt_data["remaincards"]
local dipais = evt_data["dipais"]
DataManager.CurrenRoom.xipaiScore = evt_data["xipai_score"] DataManager.CurrenRoom.xipaiScore = evt_data["xipai_score"]
--printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type) --printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type)
--pt(evt_data) --pt(evt_data)
@ -368,13 +368,12 @@ function M:OnResult(evt_data)
function() function()
for i = 1, #info do for i = 1, #info do
local p = self._room:GetPlayerBySeat(info[i]["seat"]) 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 info[i].card_score = info[i]["score"] - p.total_score
p.total_score = info[i]["score"] p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user info[i]["self_user"] = p.self_user
end end
DispatchEvent(self._dispatcher, EXGameEvent.OnResult, over, info, winseat, remaincards) DispatchEvent(self._dispatcher, EXGameEvent.OnResult, over, info, winseat, remaincards, dipais)
end end
) )
elseif result_type == 0 then elseif result_type == 0 then
@ -383,12 +382,11 @@ function M:OnResult(evt_data)
function() function()
for i = 1, #info do for i = 1, #info do
local p = self._room:GetPlayerBySeat(info[i]["seat"]) 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 info[i].card_score = info[i]["score"] - p.total_score
p.total_score = info[i]["score"] p.total_score = info[i]["score"]
info[i]["self_user"] = p.self_user info[i]["self_user"] = p.self_user
end end
DispatchEvent(self._dispatcher, EXGameEvent.OnResult, over, info, winseat, remaincards) DispatchEvent(self._dispatcher, EXGameEvent.OnResult, over, info, winseat, remaincards, dipais)
end end
) )
else else
@ -748,4 +746,20 @@ function M:OnCheckCard(evt_data)
) )
end end
function M:OnGetBaseScore(evt_data)
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.OnGetBaseScore, evt_data)
end
)
end
function M:OnShowRank(evt_data)
self._cacheEvent:Enqueue(
function()
DispatchEvent(self._dispatcher, EXGameEvent.OnShowRank, evt_data)
end
)
end
return M return M

View File

@ -20,6 +20,8 @@ local EXGameEvent = {
EventXiPai = "EventXiPai", EventXiPai = "EventXiPai",
OnPassSuccCheckCard = "OnPassSuccCheckCard", OnPassSuccCheckCard = "OnPassSuccCheckCard",
OnBompScoreNew = "OnBompScoreNew", OnBompScoreNew = "OnBompScoreNew",
OnCheckCard = "OnCheckCard" OnCheckCard = "OnCheckCard",
OnGetBaseScore = "OnGetBaseScore",
OnShowRank = "OnShowRank"
} }
return EXGameEvent return EXGameEvent

View File

@ -493,6 +493,7 @@ function M:EventInit()
self.rank_view = nil self.rank_view = nil
end end
self._ctr_inClear.selectedIndex = 0 self._ctr_inClear.selectedIndex = 0
self._view:GetChild('list_dipais'):RemoveChildrenToPool()
self:UpdateRound(round) self:UpdateRound(round)
-- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/fapai.mp3") -- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/fapai.mp3")
local list = _room.player_list local list = _room.player_list
@ -518,7 +519,7 @@ function M:EventInit()
local card_info = self._player_card_info[self:GetPos(p.seat)] local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear() card_info:Clear()
head_info:Ready(false) head_info:Ready(false)
head_info._ctr_rank.selectedIndex = 0
if p.seat == self._room.self_player.seat then if p.seat == self._room.self_player.seat then
if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then
@ -611,20 +612,18 @@ function M:EventInit()
--出牌权和前端出牌提示挪到转向协议 --出牌权和前端出牌提示挪到转向协议
local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat)
if index == 1 then if index == 1 then
card_info:ShowOutCardOption2(lastCardList, 1) card_info:ShowOutCardOption2(lastCardList, self._room.is_new_bout and 2 or 1)
end end
end) end)
_gamectr:AddEventListener(EXGameEvent.OnBombScore, function(...) _gamectr:AddEventListener(EXGameEvent.OnBombScore, function(...)
local arg = { ... } local arg = { ... }
local scoreList = arg[1] local scoreList = arg[1]
-- for i = 1, #scoreList do for i = 1, #scoreList do
-- local player = self._room:GetPlayerBySeat(i) local player = self._room:GetPlayerBySeat(i)
-- local card_info = self._player_card_info[self:GetPos(i)] local head_info = self._player_info[self:GetPos(i)]
-- local head_info = self._player_info[self:GetPos(i)] head_info:UpdateScore(player.total_score)
-- card_info:PlayScore(scoreList[i], true) end
-- head_info:UpdateScore(player.total_score)
-- end
end) end)
_gamectr:AddEventListener(EXGameEvent.OnPlaySucc, function(...) _gamectr:AddEventListener(EXGameEvent.OnPlaySucc, function(...)
@ -633,6 +632,7 @@ function M:EventInit()
local arg = { ... } local arg = { ... }
local p = arg[1] local p = arg[1]
local card_number = arg[2] local card_number = arg[2]
local baseScore = arg[3]
self.ctr_time.selectedIndex = 0 self.ctr_time.selectedIndex = 0
local index = self:GetPos(p.seat) local index = self:GetPos(p.seat)
if index == 1 then if index == 1 then
@ -656,6 +656,8 @@ function M:EventInit()
if index == 1 then if index == 1 then
card_info:DeleteHandCards(p.out_card_list) card_info:DeleteHandCards(p.out_card_list)
end end
self._view:GetChild('text_baseScore').text = baseScore
end) end)
_gamectr:AddEventListener(EXGameEvent.OnCheckCard, function(...) _gamectr:AddEventListener(EXGameEvent.OnCheckCard, function(...)
local arg = { ... } local arg = { ... }
@ -877,6 +879,8 @@ function M:EventInit()
local info = arg[2] local info = arg[2]
local win_seat = arg[3] local win_seat = arg[3]
local remaincards = arg[4] local remaincards = arg[4]
local dipais = arg[5]
-- local energyTab = arg[5] -- local energyTab = arg[5]
local otherpoker_list = self._view:GetChild("otherpoker_list") local otherpoker_list = self._view:GetChild("otherpoker_list")
local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)]
@ -959,33 +963,45 @@ function M:EventInit()
head_info._view:GetChild('text_jifen').text = player.score head_info._view:GetChild('text_jifen').text = player.score
-- head_info:PlayScore(player.winscore, win_seat == player.seat) -- head_info:PlayScore(player.winscore, win_seat == player.seat)
head_info:PlayScore(player.card_score, win_seat == player.seat) head_info:PlayScore(player.card_score, win_seat == player.seat)
head_info:SetBaseScore()
end end
for i = 1, #info do --展示底牌
local player = info[i] if #dipais > 0 then
local p = self._room:GetPlayerBySeat(player.seat) for i, v in ipairs(dipais) do
local head_info = self._player_info[self:GetPos(player.seat)] local card = self._view:GetChild('list_dipais'):AddItemFromPool()
local card_info = self._player_card_info[self:GetPos(player.seat)] card:GetChild("icon").url = string.format("ui://Main_Poker/%s", v)
coroutine.wait(0.1)
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("DuoDuo_PK", "extend/poker/duoduo/sound/fanCard.mp3")
printlog("lingmeng oneTime", oneTime)
coroutine.wait(oneTime)
end
end end
coroutine.wait(1)
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)]
-- 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("DuoDuo_PK", "extend/poker/duoduo/sound/fanCard.mp3")
-- printlog("lingmeng oneTime", oneTime)
-- coroutine.wait(oneTime)
-- end
-- end
-- end
self:ChangeBgmMusic(1) self:ChangeBgmMusic(1)
-- if over == 0 then -- if over == 0 then
-- if #self:GetSpringSeats(info) > 0 then -- if #self:GetSpringSeats(info) > 0 then
@ -1111,6 +1127,29 @@ function M:EventInit()
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0 info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end end
) )
_gamectr:AddEventListener(
EXGameEvent.OnGetBaseScore,
function(...)
local arg = { ... }
local data = arg[1]
self._view:GetChild('text_baseScore').text = 0
local index = self:GetPos(data.seat)
local head_info = self._player_info[index]
head_info:SetBaseScore(data.score)
end
)
_gamectr:AddEventListener(
EXGameEvent.OnShowRank,
function(...)
local arg = { ... }
local data = arg[1]
local index = self:GetPos(data.player)
local head_info = self._player_info[index]
head_info._ctr_rank.selectedIndex = data.ranking
end
)
end end
function M:ReConnectForStart() function M:ReConnectForStart()
@ -1118,6 +1157,7 @@ function M:ReConnectForStart()
self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat)
self._state.selectedIndex = 1 self._state.selectedIndex = 1
self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat)
self._view:GetChild('text_baseScore').text = self._room.poolScore
for _, player in ipairs(self._room.player_list) do for _, player in ipairs(self._room.player_list) do
local player_card_info = self._player_card_info[self:GetPos(player.seat)] local player_card_info = self._player_card_info[self:GetPos(player.seat)]
@ -1125,10 +1165,12 @@ function M:ReConnectForStart()
head_info:Ready(false) head_info:Ready(false)
head_info:UpdateScore(player.total_score) head_info:UpdateScore(player.total_score)
head_info:SetBaseScore(player.roundCardScore)
head_info:UpdateLineState(player.line_state) head_info:UpdateLineState(player.line_state)
head_info:UpdatePiao(player.piao) head_info:UpdatePiao(player.piao)
head_info:SetBaoDan(player.hand_count == 1) head_info:SetBaoDan(player.hand_count == 1)
head_info:MarkBank(player.seat == self._room.banker_seat) head_info:MarkBank(player.seat == self._room.banker_seat)
head_info._ctr_rank.selectedIndex = player.ranking
if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then
-- body -- body
@ -1173,7 +1215,7 @@ function M:ReConnectForStart()
player_card_info:SetOutCardInfo(nil, false) player_card_info:SetOutCardInfo(nil, false)
if player.seat == self._room.self_player.seat then if player.seat == self._room.self_player.seat then
local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat)
player_card_info:ShowOutCardOption2(lastCardList, 1) player_card_info:ShowOutCardOption2(lastCardList, self._room.is_new_bout and 2 or 1)
end end
else else
-- head_info:MarkBank(true) -- head_info:MarkBank(true)
@ -1192,7 +1234,7 @@ function M:ReconnectForClearing()
--如果是体力值不可负分模式 则显示当前的hp值 --如果是体力值不可负分模式 则显示当前的hp值
if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then
head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) head_info:UpdateScore(d2ad(player.hp_info.cur_hp))
head_info._view:GetChild('zhanji').visible = true -- head_info._view:GetChild('zhanji').visible = true
local num = player.hp_info.total_hp local num = player.hp_info.total_hp
if num > 0 then if num > 0 then
head_info._view:GetController('text_color').selectedIndex = 0 head_info._view:GetController('text_color').selectedIndex = 0
@ -1231,7 +1273,7 @@ function M:ReconnectForClearing()
if player.seat == self._room.self_player.seat then if player.seat == self._room.self_player.seat then
player_card_info:InitPoker(player.hand_list, false) -- player_card_info:InitPoker(player.hand_list, false)
else else
-- player_card_info:UpdateHandPoker(player.hand_list, false, true) -- player_card_info:UpdateHandPoker(player.hand_list, false, true)
end end
@ -1250,7 +1292,7 @@ function M:ReconnectForClearing()
coroutine.start(function() coroutine.start(function()
coroutine.wait(0.3) coroutine.wait(0.3)
self.result_view = EXResultView.new(self, self._room.player_list, 0, win_seat) self.result_view = EXResultView.new(self, self._room.player_list, 0, win_seat)
self.result_view:SetDestroryCallback(function() self.result_view:SetDestroryCallback(function()
for i = 1, #self._player_card_info do for i = 1, #self._player_card_info do
local card_info = self._player_card_info[i] local card_info = self._player_card_info[i]
@ -1416,15 +1458,15 @@ function M:UpdateRound(round)
self._text_maxRound.text = string.format("/%s局", total_round) self._text_maxRound.text = string.format("/%s局", total_round)
end end
-- function M:InitPlayerInfoView() function M:InitPlayerInfoView()
-- self._player_info = {} self._player_info = {}
-- local _player_info = self._player_info local _player_info = self._player_info
-- for i = 1, self._room.room_config.people_num do for i = 1, self._room.room_config.people_num do
-- local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1)) local tem = self._view:GetChild('player_info' .. i)
-- _player_info[i] = PlayerInfoView.new(tem, self) _player_info[i] = PlayerInfoView.new(tem, self)
-- tem.visible = false tem.visible = false
-- end end
-- end end
-- function M:GetSoundFileName(type, num, isNewBout) -- function M:GetSoundFileName(type, num, isNewBout)
-- local fileName -- local fileName

View File

@ -17,6 +17,8 @@ function M:init(flag_witness)
--互动表情的父类 --互动表情的父类
self._hudon = self._view:GetChild('comp_hudon') self._hudon = self._view:GetChild('comp_hudon')
PlayerInfoView.init(self, flag_witness) PlayerInfoView.init(self, flag_witness)
self._ctr_rank = self._view:GetController('rank')
end end
function M:FillData(player) function M:FillData(player)
@ -67,4 +69,9 @@ function M:UpdatePiao(piao)
end end
end end
function M:SetBaseScore(score)
local score = score or 0
self._view:GetChild('text_paijufen').text = score
end
return M return M

View File

@ -175,23 +175,28 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim)
-- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/chupai.mp3") -- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/chupai.mp3")
-- end) -- end)
-- else -- else
local showOneCard local zhaNum = 0
local zhaMapFlower = { 0, 0, 0, 0 }
local zhaMapCode = { 0, 0 }
for i = 1, #cardlist do for i = 1, #cardlist do
if cardlist[i] % 100 < 3 then local poker_item = self._view_Out:AddItemFromPool()
local poker_item = self._view_Out:AddItemFromPool() self:FillPokerOut(poker_item, cardlist[i])
self:FillPoker2(poker_item, cardlist[i]) local flower = math.floor(cardlist[i] / 100)
local code = cardlist[i] % 100
if code >= 3 then
if zhaMapFlower[flower] == 3 then
zhaNum = zhaNum + 1
end
zhaMapFlower[flower] = zhaMapFlower[flower] + 1
else else
showOneCard = cardlist[i] if zhaMapCode[code] == 3 then
zhaNum = zhaNum + 1
end
zhaMapCode[code] = zhaMapCode[code] + 1
end end
end end
if showOneCard then self._view:GetChild('text_paiNum').text = string.format("X%s", #cardlist + zhaNum * 3)
local poker_item = self._view_Out:AddItemFromPool()
self:FillPoker2(poker_item, showOneCard)
-- self._view:GetChild('text_paiNum').text = string.format("X%s", #cardlist)
else
printlog("error 190", "除了鬼牌没有其他牌")
end
self._view_Out:ResizeToFit(self._view_Out.numItems) self._view_Out:ResizeToFit(self._view_Out.numItems)
-- end -- end
end end
@ -470,6 +475,16 @@ function M:FillPoker(poker, prefix, num, code)
end end
function M:FillPoker2(poker, code, suffix) function M:FillPoker2(poker, code, suffix)
suffix = suffix or ""
code = code == 1 and "00" or code
if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Extend_Poker_DuoDuo/%s%s", code, suffix)
else
poker.icon = string.format("ui://Extend_Poker_DuoDuo/%s%s", code, suffix)
end
end
function M:FillPokerOut(poker, code, suffix)
suffix = suffix or "" suffix = suffix or ""
code = code == 1 and "00" or code code = code == 1 and "00" or code
if not poker.icon then if not poker.icon then
@ -480,21 +495,21 @@ function M:FillPoker2(poker, code, suffix)
end end
function M:CreatPoker1(poker, scale, bank) function M:CreatPoker1(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Main_Poker", "poker" .. scale * 10) local poker_item = UIPackage.CreateObject("Extend_Poker_DuoDuo", "poker" .. scale * 10)
local code = self:ChangeCodeByTo(poker) local code = self:ChangeCodeByTo(poker)
local card_code_obj local card_code_obj
if DataManager.CurrenRoom.pai == 0 then if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_1") card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_1")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code) card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code)
end end
else else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_2")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end end
@ -510,20 +525,20 @@ function M:CreatPoker1(poker, scale, bank)
end end
function M:CreatPoker(poker, scale, bank) function M:CreatPoker(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Main_Poker", "poker" .. 12.5) local poker_item = UIPackage.CreateObject("Extend_Poker_DuoDuo", "poker" .. 12.5)
local code = self:ChangeCodeByTo(poker) local code = self:ChangeCodeByTo(poker)
local card_code_obj local card_code_obj
if DataManager.CurrenRoom.pai == 0 then if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_1") card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_1")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code) card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code)
end end
else else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_2")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end end

View File

@ -175,25 +175,16 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim)
-- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/chupai.mp3") -- ViewUtil.PlaySound("DuoDuo_PK", "extend/poker/duoduo/sound/chupai.mp3")
-- end) -- end)
-- else -- else
local showOneCard
for i = 1, #cardlist do for i = 1, #cardlist do
if cardlist[i] % 100 < 3 then
local poker_item = self._view_Out:AddItemFromPool()
self:FillPoker2(poker_item, cardlist[i])
else
showOneCard = cardlist[i]
end
end
if showOneCard then
local poker_item = self._view_Out:AddItemFromPool() local poker_item = self._view_Out:AddItemFromPool()
self:FillPoker2(poker_item, cardlist[i])
self:FillPoker2(poker_item, showOneCard)
self._view:GetChild('text_paiNum').text = string.format("X%s", #cardlist)
else
printlog("error 190", "除了鬼牌没有其他牌")
end end
self._view_Out:ResizeToFit(self._view_Out.numItems) if #cardlist >= 8 then
-- end self._view_Out.width = 432
else
self._view_Out.width = 136 + 42*(#cardlist-1)
end
self._view:GetChild('text_paiNum').text = string.format("X%s", #cardlist)
end end
end end
@ -473,28 +464,28 @@ function M:FillPoker2(poker, code, suffix)
suffix = suffix or "" suffix = suffix or ""
code = code == 1 and "00" or code code = code == 1 and "00" or code
if not poker.icon then if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Extend_Poker_DuoDuo/%s%s", code, suffix) poker:GetChild('icon').url = string.format("ui://Main_Poker/%s%s", code, suffix)
else else
poker.icon = string.format("ui://Extend_Poker_DuoDuo/%s%s", code, suffix) poker.icon = string.format("ui://Main_Poker/%s%s", code, suffix)
end end
end end
function M:CreatPoker1(poker, scale, bank) function M:CreatPoker1(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_DuoDuo", "poker" .. scale * 10) local poker_item = UIPackage.CreateObject("Main_Poker", "poker" .. scale * 10)
local code = self:ChangeCodeByTo(poker) local code = self:ChangeCodeByTo(poker)
local card_code_obj local card_code_obj
if DataManager.CurrenRoom.pai == 0 then if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_1") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_1")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code) card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code)
end end
else else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end end
@ -510,20 +501,20 @@ function M:CreatPoker1(poker, scale, bank)
end end
function M:CreatPoker(poker, scale, bank) function M:CreatPoker(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_DuoDuo", "poker" .. 12.5) local poker_item = UIPackage.CreateObject("Main_Poker", "poker" .. 12.5)
local code = self:ChangeCodeByTo(poker) local code = self:ChangeCodeByTo(poker)
local card_code_obj local card_code_obj
if DataManager.CurrenRoom.pai == 0 then if DataManager.CurrenRoom.pai == 0 then
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_1") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_1")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code) card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code)
end end
else else
if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then
-- body -- body
card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_DuoDuo/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
else else
card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2")
end end

View File

@ -74,6 +74,7 @@ function M:init()
self.text_bomb_score = self._view:GetChild('Score') self.text_bomb_score = self._view:GetChild('Score')
self.ani_bomb_score = self._view:GetTransition('score') self.ani_bomb_score = self._view:GetTransition('score')
self.ani_result_score = self._view:GetTransition('score_1') self.ani_result_score = self._view:GetTransition('score_1')
-- self._viewList_move = self._view:GetChild('list_moveCards')
self.send_card = {} self.send_card = {}
self.tips_click_count = 0 self.tips_click_count = 0
@ -97,12 +98,15 @@ function M:InitPoker(pokerList, isPlayAni, open)
end end
-- -- print(vardump(self.card_list)) -- -- print(vardump(self.card_list))
self.cor_init_poker = nil self.cor_init_poker = nil
self.card_list = {} self.card_list = {}
self._ctr_canSendCard.selectedIndex = 0 self.newCard_list = {}
self._SendCards = {}
-- self._ctr_canSendCard.selectedIndex = 0
self._flag_ruleCard = false self._flag_ruleCard = false
self._view_handCard:RemoveChildren(0, -1, true) self._view_handCard:RemoveChildren(0, -1, true)
self.scaleW = (GRoot.inst.width * 0.86 - self._view_handCard.columnGap * 26) / 27 self.scaleW = (GRoot.inst.width * 0.85 - self._view_handCard.columnGap * 14) / 15
self.scaleH = self.scaleW * 1.4 -- self._viewList_move.width = self.scaleW
self.scaleH = self.scaleW * 1.3
if isPlayAni == true then if isPlayAni == true then
self.cor_init_poker = self.cor_init_poker =
coroutine.start( coroutine.start(
@ -172,25 +176,13 @@ function M:InitPoker(pokerList, isPlayAni, open)
) )
else else
for i = #pokerList, 1, -1 do for i = #pokerList, 1, -1 do
local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) if not self.newCard_list[pokerList[i] % 100] then
local card_flower_code = pokerList[i] self.newCard_list[pokerList[i] % 100] = {}
local btn_card = self._view_handCard:AddItemFromPool()
self:FillPoker(btn_card, "", card_number_code)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
self.card_list[#self.card_list + 1] = card_view
btn_card.data = card_view
btn_card.width = self.scaleW
btn_card.height = self.scaleH
end
table.sort(self.card_list, tableSortNumber)
self:AddTouchMoveEvent(self._view_handCard)
for i = 1, #self.card_list do
local card = self.card_list[i]
if open ~= 1 then
-- body
self:AddCardTouchEvent(card)
end end
self.newCard_list[pokerList[i] % 100][math.floor(pokerList[i] / 100)] = (self.newCard_list[pokerList[i] % 100][math.floor(pokerList[i] / 100)] or 0) +
1
end end
self:UpdateHandCardsPos()
end end
end end
@ -205,23 +197,18 @@ end
function M:AddTouchMoveEvent(list) function M:AddTouchMoveEvent(list)
local send_card = {} local send_card = {}
list.onTouchBegin:Set( -- list.onTouchBegin:Set(
function(context) -- function(context)
self.send_card = {} -- self.send_card = {}
if list.touchable == false then -- if list.touchable == false then
return -- return
end -- end
local fristCard = self._view_handCard:GetChildAt(0) -- local xy = self._view_handCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
local CardWidth = fristCard.width -- self.touchBegin = xy
local columnGap = self._view_handCard.columnGap -- Stage.inst.onTouchMove:Add(self.touchMoveFun)
local oneCardWidth = CardWidth - columnGap -- Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) -- end
-- if xy.y > -21 and xy.y < 316 then -- )
self.touchBegin = xy
Stage.inst.onTouchMove:Add(self.touchMoveFun)
Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
end
)
end end
function M:AddCardTouchEvent(card) function M:AddCardTouchEvent(card)
@ -230,7 +217,45 @@ function M:AddCardTouchEvent(card)
if card.btn_card.touchable == false then if card.btn_card.touchable == false then
return return
end end
self:SetBtnCardColor(card, 1) if card.card_code_flower % 100 < 3 then
local cindex = card.btn_card:GetController('choose').selectedIndex
if cindex == 1 then
self:SetBtnCardColor(card, 0)
if self._SendCards and #self._SendCards > 0 then
for k, v in pairs(self._SendCards) do
if card.card_code_flower % 100 == v.card_code_flower%100 then
table.remove(self._SendCards, k)
return
end
end
end
else
self:SetBtnCardColor(card, 1)
table.insert(self._SendCards, card)
end
else
if self._SendCards and #self._SendCards > 0 then
local tmp = {}
for k, v in pairs(self._SendCards) do
if v.card_code_flower % 100 ~= card.card_code_flower % 100 and (card.card_code_flower % 100 < 3 or v.card_code_flower % 100 < 3) then
table.insert(tmp, v)
else
self:SetBtnCardColor(v, 0)
end
end
self._SendCards = tmp
end
local cardList = card.fatherList
local touchIndex = cardList:GetChildIndex(card.btn_card)
self.touchCard = card
self.touchIndex = touchIndex
for i = 0, touchIndex do
local oncard = cardList:GetChildAt(i)
self:SetBtnCardColor(oncard.data, 1)
end
Stage.inst.onTouchMove:Add(self.touchMoveFun)
Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
end
end end
) )
end end
@ -270,120 +295,37 @@ function M:TouchMoving(context)
if self._view_handCard == nil then if self._view_handCard == nil then
return return
end end
local send_card1 = {} local fatherList = self.touchCard.fatherList
local fristCard = self._view_handCard:GetChildAt(0) local xy = fatherList:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
local CardWidth = fristCard.width context.inputEvent.y))
local columnGap = self._view_handCard.columnGap
local oneCardWidth = CardWidth + columnGap
local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
self.isTouching = true
local max_x
local min_x
if xy.x - self.touchBegin.x > 0 then -- 往右边滑
max_x = xy.x
min_x = self.touchBegin.x
-- elseif xy.x - self.touchBegin.x < 0 then -- 左边滑
else
max_x = self.touchBegin.x
min_x = xy.x
end
for i = 1, self._view_handCard.numItems do for i = 0, fatherList.numItems - 1 do
local card = self._view_handCard:GetChildAt(i - 1).data local cardOne = fatherList:GetChildAt(i)
if card.btn_card.touchable == false or card.card_isTouchable == 1 then self:SetBtnCardColor(cardOne.data, xy.y > cardOne.y and 1 or 0)
else
if
(card.btn_card.x + oneCardWidth > min_x or (i == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
then
self:SetBtnCardColor(card, 1)
if #send_card1 == 0 then
send_card1[1] = card
end
if send_card1[#send_card1] ~= card then
send_card1[#send_card1 + 1] = card
end
else
self:SetBtnCardColor(card, 0)
end
end
end end
self.send_card = send_card1
end end
function M:TouchMoveEnd(context) function M:TouchMoveEnd(context)
local send_card = {} local linexy = self._view_handCard:GlobalToLocal(Vector2.New(context.inputEvent.x,
local currentCard = {} context.inputEvent.y))
local xuan_card = {}
local fristCard = self._view_handCard:GetChildAt(0) local fatherList = self.touchCard.fatherList
local CardWidth = fristCard.width local xy = fatherList:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
local columnGap = self._view_handCard.columnGap context.inputEvent.y))
local oneCardWidth = CardWidth + columnGap
local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) for i = 0, fatherList.numItems - 1 do
local downCards = #self.card_list local cardOne = fatherList:GetChildAt(i)
if xy.y > cardOne.y then
table.insert(self._SendCards, cardOne.data)
end
end
-- for i = 0, self.touchIndex do
-- local oncard = self.touchCard.fatherList:GetChildAt(i)
-- self:SetBtnCardColor(oncard.data, 0)
-- oncard.xy = Vector2.New(0, (self.scaleH + self.linegap) * i)
-- end
Stage.inst.onTouchMove:Remove(self.touchMoveFun) Stage.inst.onTouchMove:Remove(self.touchMoveFun)
Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun) Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun)
local max_x
local min_x
if xy.x - self.touchBegin.x > 0 then
max_x = xy.x
min_x = self.touchBegin.x
else
max_x = self.touchBegin.x
min_x = xy.x
end
for k = 1, self._view_handCard.numItems do
local card = self._view_handCard:GetChildAt(k - 1).data
table.insert(currentCard, card.card_code_flower)
if not card.btn_card.selected then
downCards = downCards - 1
end
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
self:SetBtnCardColor(card, 0)
if
(card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x
then
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
if card.btn_card.selected then
send_card[#send_card + 1] = card
end
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
else
if card.btn_card.selected then
send_card[#send_card + 1] = card
end
end
end
end
-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3')
Stage.inst:ResetInputState()
if downCards == 0 then
xuan_card = self:zhizhanxuanpai()
end
if #send_card > 0 then
table.sort(send_card, tableSortNumber)
send_card = #xuan_card > 0 and xuan_card or send_card
self._cardCheck:initCards(send_card,
{
flag = #xuan_card > 0,
flag_allCards = #send_card == self._view_handCard.numItems,
flag_ruleCard = self
._flag_ruleCard
})
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
else
self._ctr_canSendCard.selectedIndex = 0
end
end end
-- function M:SetBtnCardColor(card, num) -- function M:SetBtnCardColor(card, num)
@ -450,7 +392,7 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p
self.tips_click_count = 0 self.tips_click_count = 0
self.send_card = {} self.send_card = {}
self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard)
self._ctr_canSendCard.selectedIndex = 0 -- self._ctr_canSendCard.selectedIndex = 0
if #self.tips_card_list >= 1 then if #self.tips_card_list >= 1 then
-- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环) -- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环)
@ -511,7 +453,7 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim)
for i = 1, #cardlist do for i = 1, #cardlist do
local poker_item = self._view_Out:AddItemFromPool() local poker_item = self._view_Out:AddItemFromPool()
self:FillPoker2(poker_item, cardlist[i]) self:FillPokerOut(poker_item, cardlist[i])
end end
-- end -- end
end end
@ -651,27 +593,73 @@ end
function M:DeleteHandCards(cardlist) function M:DeleteHandCards(cardlist)
self.ctr_put_card_option.selectedIndex = 0 self.ctr_put_card_option.selectedIndex = 0
for i = 1, #cardlist do for i = 1, #cardlist do
local card_code_number = cardlist[i] local tmpNum = nil
for j = 1, #self.card_list do if self.newCard_list[cardlist[i] % 100] then
local card = self.card_list[j] tmpNum = self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)]
if card_code_number == card.card_code_number then end
list_remove(self.card_list, card) if tmpNum then
self._view_handCard:RemoveChild(card.btn_card, true) if tmpNum == 1 then
break self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)] = nil
else
self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)] = tmpNum - 1
end
else
ViewUtil:ErrorTip("牌型出错,重新加载页面")
ViewManager.refreshGameView()
end
if i == #cardlist then
if #self.newCard_list[cardlist[i] % 100] == 0 then
self.newCard_list[cardlist[i] % 100] = nil
end end
end end
end end
self._view_handCard:ResizeToFit(self._view_handCard.numItems)
self:UpdateHandCardsPos() self:UpdateHandCardsPos()
end end
function M:UpdateHandCardsPos() function M:UpdateHandCardsPos()
for i = 1, #self.card_list do local maxHeight = 0
local card_view = self.card_list[i] self._view_handCard:RemoveChildrenToPool()
card_view.index = i local sortTable = {}
card_view.btn_card.touchable = true for k, v in pairs(self.newCard_list) do
self:UpdateCardMove(card_view.btn_card, false, false) local btn_cardListFather = self._view_handCard:GetFromPool('')
self:SetBtnCardColor(card_view, 0) btn_cardListFather.width = self.scaleW
local btn_cardList = btn_cardListFather:GetChild('list')
btn_cardList:RemoveChildrenToPool()
self.linegap = btn_cardList.lineGap
local tmpHeight = 0
local noZhaIndex = 0
local allCardNum = 0
for k1, v1 in pairs(v) do
local card_number_code = k * 10 + k1
local card_flower_code = k1 * 100 + k
for i = 1, v1 do
local btn_card = btn_cardList:GetFromPool('')
btn_cardList:AddChildAt(btn_card, noZhaIndex)
noZhaIndex = noZhaIndex + 1
allCardNum = allCardNum + 1
btn_card.height = self.scaleH
self:FillPoker2(btn_card, card_flower_code)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
card_view.fatherList = btn_cardList
self.card_list[#self.card_list + 1] = card_view
btn_card.data = card_view
tmpHeight = tmpHeight + 1
self:AddCardTouchEvent(card_view)
end
end
local index = ViewUtil.BinarySearch(sortTable, allCardNum, 1)
self._view_handCard:AddChildAt(btn_cardListFather, index - 1)
table.insert(sortTable, index, allCardNum)
if tmpHeight > maxHeight then
maxHeight = tmpHeight
end
end
if #self.newCard_list > 0 then
self._view:GetChild('btn_back').y = math.min(self._view_handCard.height -
(self.scaleH + (self.scaleH + self.linegap) * (maxHeight - 1)) - 30, 100)
self._view_Out.y = math.min(self._view_handCard.height -
(self.scaleH + (self.scaleH + self.linegap) * (maxHeight - 1)) - self._view_Out.height + self.scaleH * 0.3,
50)
end end
end end
@ -716,9 +704,9 @@ function M:UpdateHandCardsColor()
if #send_card > 0 then if #send_card > 0 then
table.sort(send_card, tableSortNumber) table.sort(send_card, tableSortNumber)
self._cardCheck:initCards(send_card, { flag = false, flag_allCards = #send_card == self._view_handCard.numItems }) self._cardCheck:initCards(send_card, { flag = false, flag_allCards = #send_card == self._view_handCard.numItems })
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 -- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
else else
self._ctr_canSendCard.selectedIndex = 0 -- self._ctr_canSendCard.selectedIndex = 0
end end
end end
@ -726,32 +714,37 @@ function M:BtnEvent()
self.btn_not_put = self._view:GetChild('btn_not_put') self.btn_not_put = self._view:GetChild('btn_not_put')
self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖 self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖
self.btn_sendCards = self._view:GetChild('Btn_SendCard') self.btn_sendCards = self._view:GetChild('Btn_SendCard')
self._ctr_canSendCard = self.btn_sendCards:GetController('can') -- self._ctr_canSendCard = self.btn_sendCards:GetController('can')
self.btn_sendCards.onClick:Set( self.btn_sendCards.onClick:Set(
function() function()
if self.Reset then if self.Reset then
return return
end end
if self._ctr_canSendCard.selectedIndex == 0 then -- if self._ctr_canSendCard.selectedIndex == 0 then
return -- return
end -- end
local send_card = {} local allcards = {}
self.send_card = {} for k, v in pairs(self.newCard_list) do
local currentCard = {} for k1, v1 in pairs(v) do
for i = 1, #self.card_list do if v1 > 0 then
local card = self.card_list[i] for i = 1, v1 do
table.insert(currentCard, card.card_code_flower) local card_flower_code = k1 * 100 + k
if card.btn_card.selected then table.insert(allcards, card_flower_code)
send_card[#send_card + 1] = card.card_code_flower end
self.send_card[#self.send_card + 1] = card end
end end
end end
local SendCard = {}
if #send_card == 0 then for i, v in ipairs(self._SendCards) do
table.insert(SendCard, v.card_code_flower)
self:SetBtnCardColor(v, 0)
end
self._SendCards = {}
if #SendCard == 0 then
self:ErrorTip('请选择要出的牌') self:ErrorTip('请选择要出的牌')
else else
self.gameCtr:SendCard(send_card, currentCard) self.gameCtr:SendCard(SendCard, allcards)
end end
end end
) )
@ -816,7 +809,7 @@ function M:ShowTipsCard(index)
end end
pt(item) pt(item)
self._cardCheck:initCards(item) self._cardCheck:initCards(item)
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 -- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
end end
function M:GetHandCardOffset(count) function M:GetHandCardOffset(count)

View File

@ -74,7 +74,6 @@ function M:init()
self.text_bomb_score = self._view:GetChild('Score') self.text_bomb_score = self._view:GetChild('Score')
self.ani_bomb_score = self._view:GetTransition('score') self.ani_bomb_score = self._view:GetTransition('score')
self.ani_result_score = self._view:GetTransition('score_1') self.ani_result_score = self._view:GetTransition('score_1')
self._viewList_move = self._view:GetChild('list_moveCards')
self.send_card = {} self.send_card = {}
self.tips_click_count = 0 self.tips_click_count = 0
@ -96,16 +95,31 @@ function M:InitPoker(pokerList, isPlayAni, open)
if self.cor_init_poker ~= nil then if self.cor_init_poker ~= nil then
coroutine.stop(self.cor_init_poker) coroutine.stop(self.cor_init_poker)
end end
table.sort(pokerList, function(a, b)
local num_a = a % 100
local num_b = b % 100
local code_a = math.floor(a / 100)
local code_b = math.floor(b / 100)
if num_a < 3 then
num_a = num_a + 100
end
if num_b < 3 then
num_b = num_b + 100
end
if num_a == num_b then
return code_a < code_b
else
return num_a<num_b
end
end)
-- -- print(vardump(self.card_list)) -- -- print(vardump(self.card_list))
self.cor_init_poker = nil self.cor_init_poker = nil
self.card_list = {} self.card_list = {}
self.newCard_list = {} -- self._ctr_canSendCard.selectedIndex = 0
self._ctr_canSendCard.selectedIndex = 0
self._flag_ruleCard = false self._flag_ruleCard = false
self._view_handCard:RemoveChildren(0, -1, true) self._view_handCard:RemoveChildren(0, -1, true)
self.scaleW = (GRoot.inst.width * 0.85 - self._view_handCard.columnGap * 14) / 15 self.scaleW = (GRoot.inst.width * 0.86 - self._view_handCard.columnGap * 26) / 27
self._viewList_move.width = self.scaleW self.scaleH = self.scaleW * 1.4
self.scaleH = self.scaleW * 1.3
if isPlayAni == true then if isPlayAni == true then
self.cor_init_poker = self.cor_init_poker =
coroutine.start( coroutine.start(
@ -175,13 +189,25 @@ function M:InitPoker(pokerList, isPlayAni, open)
) )
else else
for i = #pokerList, 1, -1 do for i = #pokerList, 1, -1 do
if not self.newCard_list[pokerList[i] % 100] then local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
self.newCard_list[pokerList[i] % 100] = {} local card_flower_code = pokerList[i]
end local btn_card = self._view_handCard:AddItemFromPool()
self.newCard_list[pokerList[i] % 100][math.floor(pokerList[i] / 100)] = (self.newCard_list[pokerList[i] % 100][math.floor(pokerList[i] / 100)] or 0) + self:FillPoker(btn_card, "", card_number_code)
1 local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
self.card_list[#self.card_list + 1] = card_view
btn_card.data = card_view
btn_card.width = self.scaleW
btn_card.height = self.scaleH
end
table.sort(self.card_list, tableSortNumber)
self:AddTouchMoveEvent(self._view_handCard)
for i = 1, #self.card_list do
local card = self.card_list[i]
if open ~= 1 then
-- body
self:AddCardTouchEvent(card)
end
end end
self:UpdateHandCardsPos()
end end
end end
@ -196,18 +222,29 @@ end
function M:AddTouchMoveEvent(list) function M:AddTouchMoveEvent(list)
local send_card = {} local send_card = {}
-- list.onTouchBegin:Set( list.onTouchBegin:Set(
-- function(context) function(context)
-- self.send_card = {} self.send_card = {}
-- if list.touchable == false then if list.touchable == false then
-- return return
-- end end
-- local xy = self._view_handCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) local fristCard = self._view_handCard:GetChildAt(0)
-- self.touchBegin = xy local CardWidth = fristCard.width
-- Stage.inst.onTouchMove:Add(self.touchMoveFun) local columnGap = self._view_handCard.columnGap
-- Stage.inst.onTouchEnd:Add(self.touchMoveEndFun) local oneCardWidth = CardWidth - columnGap
-- end local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
-- ) self.touchBegin = xy
--y轴选中
local lastCard = self._view_handCard:GetChildAt(self._view_handCard.numItems - 1)
self.chooseY = fristCard.y
if xy.y >= self._view_handCard.height - lastCard.height then
self.chooseY = lastCard.y
end
Stage.inst.onTouchMove:Add(self.touchMoveFun)
Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
end
)
end end
function M:AddCardTouchEvent(card) function M:AddCardTouchEvent(card)
@ -216,32 +253,7 @@ function M:AddCardTouchEvent(card)
if card.btn_card.touchable == false then if card.btn_card.touchable == false then
return return
end end
local cardList = card.fatherList self:SetBtnCardColor(card, 1)
local touchIndex = cardList:GetChildIndex(card.btn_card)
self._SendCards = {}
self.touchCard = card
self.touchIndex = touchIndex
local copy_list = self._viewList_move:GetChild('list')
for i = 0, touchIndex do
local oncard = cardList:GetChildAt(i)
self:SetBtnCardColor(oncard.data, 1)
--复制一份列表作为移动对象
local copy_card = copy_list:AddItemFromPool()
self:FillPoker2(copy_card, oncard.data.card_code_flower)
copy_card.height = self.scaleH
if oncard.data.zha then
for j = 1, 4 do
table.insert(self._SendCards, oncard.data.card_code_flower)
end
else
table.insert(self._SendCards, oncard.data.card_code_flower)
end
end
local xy = self.touchCard.fatherList:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
self._viewList_move.xy = self._view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) - Vector2.New(self.scaleW/2,self.scaleH + (self.scaleH + self.linegap)*(copy_list.numItems-1) + self.linegap)
self.touchBegin = xy - self._viewList_move.xy
Stage.inst.onTouchMove:Add(self.touchMoveFun)
Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
end end
) )
end end
@ -282,61 +294,121 @@ function M:TouchMoving(context)
return return
end end
local send_card1 = {} local send_card1 = {}
local xy = self.touchCard.fatherList:GlobalToLocal(Vector2.New(context.inputEvent.x, local fristCard = self._view_handCard:GetChildAt(0)
context.inputEvent.y)) local CardWidth = fristCard.width
self._viewList_move.xy = xy - self.touchBegin local columnGap = self._view_handCard.columnGap
local oneCardWidth = CardWidth + columnGap
local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
self.isTouching = true
local max_x
local min_x
if xy.x - self.touchBegin.x > 0 then -- 往右边滑
max_x = xy.x
min_x = self.touchBegin.x
-- elseif xy.x - self.touchBegin.x < 0 then -- 左边滑
else
max_x = self.touchBegin.x
min_x = xy.x
end
for i = 1, self._view_handCard.numItems do
local card = self._view_handCard:GetChildAt(i - 1).data
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
if
(card.btn_card.x + oneCardWidth > min_x or (i == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x and self.chooseY == card.btn_card.y
then
self:SetBtnCardColor(card, 1)
if #send_card1 == 0 then
send_card1[1] = card
end
if send_card1[#send_card1] ~= card then
send_card1[#send_card1 + 1] = card
end
else
self:SetBtnCardColor(card, 0)
end
end
end
self.send_card = send_card1
end end
function M:TouchMoveEnd(context) function M:TouchMoveEnd(context)
local linexy = self._view_handCard:GlobalToLocal(Vector2.New(context.inputEvent.x, local send_card = {}
context.inputEvent.y)) local currentCard = {}
local xuan_card = {}
if self.ctr_put_card_option.selectedIndex > 0 then local fristCard = self._view_handCard:GetChildAt(0)
local allcards = {} local CardWidth = fristCard.width
for k, v in pairs(self.newCard_list) do local columnGap = self._view_handCard.columnGap
for k1, v1 in pairs(v) do local oneCardWidth = CardWidth + columnGap
if v1 > 0 then local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
for i = 1, v1 do local downCards = #self.card_list
local card_flower_code = k1 * 100 + k
table.insert(allcards, card_flower_code)
end
end
end
end
if linexy.y < self._view:GetChild('n82').y then
self.gameCtr:SendCard(self._SendCards, allcards)
else
if self.touchCard.card_code_flower % 100 < 3 then
for i = self._view_handCard.numItems - 1, 0, -1 do
local oneCardList = self._view_handCard:GetChildAt(i):GetChild('list')
local listxy = oneCardList:GlobalToLocal(Vector2.New(context.inputEvent.x,
context.inputEvent.y))
if listxy.x > 0 and oneCardList:GetChildAt(0).data.card_code_flower % 100 > 2 then
for i = 0, oneCardList.numItems - 1 do
local oncard = oneCardList:GetChildAt(i)
if oncard.data.zha then
for j = 1, 4 do
table.insert(self._SendCards, oncard.data.card_code_flower)
end
else
table.insert(self._SendCards, oncard.data.card_code_flower)
end
end
self.gameCtr:SendCard(self._SendCards, allcards)
break
end
end
end
end
end
self._viewList_move:GetChild('list'):RemoveChildrenToPool()
for i = 0, self.touchIndex do
local oncard = self.touchCard.fatherList:GetChildAt(i)
self:SetBtnCardColor(oncard.data, 0)
oncard.xy = Vector2.New(0, (self.scaleH + self.linegap) * i)
end
Stage.inst.onTouchMove:Remove(self.touchMoveFun) Stage.inst.onTouchMove:Remove(self.touchMoveFun)
Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun) Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun)
local max_x
local min_x
if xy.x - self.touchBegin.x > 0 then
max_x = xy.x
min_x = self.touchBegin.x
else
max_x = self.touchBegin.x
min_x = xy.x
end
for k = 1, self._view_handCard.numItems do
local card = self._view_handCard:GetChildAt(k - 1).data
table.insert(currentCard, card.card_code_flower)
if not card.btn_card.selected then
downCards = downCards - 1
end
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else
self:SetBtnCardColor(card, 0)
if
(card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x))
and card.btn_card.x < max_x and self.chooseY == card.btn_card.y
then
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
if card.btn_card.selected then
send_card[#send_card + 1] = card
end
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
else
if card.btn_card.selected then
send_card[#send_card + 1] = card
end
end
end
end
-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3')
Stage.inst:ResetInputState()
-- if downCards == 0 then
-- xuan_card = self:zhizhanxuanpai()
-- end
-- if #send_card > 0 then
-- table.sort(send_card, tableSortNumber)
-- send_card = #xuan_card > 0 and xuan_card or send_card
-- self._cardCheck:initCards(send_card,
-- {
-- flag = #xuan_card > 0,
-- flag_allCards = #send_card == self._view_handCard.numItems,
-- flag_ruleCard = self
-- ._flag_ruleCard
-- })
-- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
-- else
-- self._ctr_canSendCard.selectedIndex = 0
-- end
end end
-- function M:SetBtnCardColor(card, num) -- function M:SetBtnCardColor(card, num)
@ -403,7 +475,7 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p
self.tips_click_count = 0 self.tips_click_count = 0
self.send_card = {} self.send_card = {}
self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard)
self._ctr_canSendCard.selectedIndex = 0 -- self._ctr_canSendCard.selectedIndex = 0
if #self.tips_card_list >= 1 then if #self.tips_card_list >= 1 then
-- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环) -- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环)
@ -604,83 +676,28 @@ end
function M:DeleteHandCards(cardlist) function M:DeleteHandCards(cardlist)
self.ctr_put_card_option.selectedIndex = 0 self.ctr_put_card_option.selectedIndex = 0
for i = 1, #cardlist do for i = 1, #cardlist do
local tmpNum = nil local card_code_number = cardlist[i]
if self.newCard_list[cardlist[i] % 100] then for j = 1, #self.card_list do
tmpNum = self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)] local card = self.card_list[j]
end if card_code_number == card.card_code_number then
if tmpNum then list_remove(self.card_list, card)
if tmpNum == 1 then self._view_handCard:RemoveChild(card.btn_card, true)
self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)] = nil break
else
self.newCard_list[cardlist[i] % 100][math.floor(cardlist[i] / 100)] = tmpNum - 1
end
else
ViewUtil:ErrorTip("牌型出错,重新加载页面")
ViewManager.refreshGameView()
end
if i == #cardlist then
if #self.newCard_list[cardlist[i] % 100] == 0 then
self.newCard_list[cardlist[i] % 100] = nil
end end
end end
end end
self._view_handCard:ResizeToFit(self._view_handCard.numItems)
self:UpdateHandCardsPos() self:UpdateHandCardsPos()
end end
function M:UpdateHandCardsPos() function M:UpdateHandCardsPos()
local maxHeight = 0 for i = 1, #self.card_list do
self._view_handCard:RemoveChildrenToPool() local card_view = self.card_list[i]
self._newCardSize = {} card_view.index = i
self._viewList_move:GetChild('list'):RemoveChildrenToPool() card_view.btn_card.touchable = true
for k, v in pairs(self.newCard_list) do self:UpdateCardMove(card_view.btn_card, false, false)
local btn_cardListFather = self._view_handCard:AddItemFromPool() self:SetBtnCardColor(card_view, 0)
btn_cardListFather.width = self.scaleW
-- btn_cardListFather.height = scaleH*12
local btn_cardList = btn_cardListFather:GetChild('list')
btn_cardList:RemoveChildrenToPool()
self.linegap = btn_cardList.lineGap
local tmpHeight = 0
local noZhaIndex = 0
for k1, v1 in pairs(v) do
local card_number_code = k * 10 + k1
local card_flower_code = k1 * 100 + k
if v1 ~= 4 then
for i = 1, v1 do
local btn_card = btn_cardList:GetFromPool('')
btn_cardList:AddChildAt(btn_card, noZhaIndex)
noZhaIndex = noZhaIndex + 1
btn_card.height = self.scaleH
self:FillPoker2(btn_card, card_flower_code)
-- self.cards_view:AddChild(btn_card)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
card_view.fatherList = btn_cardList
self.card_list[#self.card_list + 1] = card_view
btn_card.data = card_view
tmpHeight = tmpHeight + 1
self:AddCardTouchEvent(card_view)
end
else
local btn_card = btn_cardList:AddItemFromPool()
btn_card.height = self.scaleH
self:FillPoker2(btn_card, card_flower_code, "_z")
-- self.cards_view:AddChild(btn_card)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
card_view.fatherList = btn_cardList
card_view.zha = true
self.card_list[#self.card_list + 1] = card_view
btn_card.data = card_view
tmpHeight = tmpHeight + 1
self:AddCardTouchEvent(card_view)
end
self._newCardSize[k1] = tmpHeight
end
if tmpHeight > maxHeight then
maxHeight = tmpHeight
end
end end
self._view:GetChild('n82').y = self._view_handCard.height -
(self.scaleH + (self.scaleH + self.linegap) * (maxHeight - 1) + 50)
end end
function M:ResetPoker() function M:ResetPoker()
@ -724,9 +741,9 @@ function M:UpdateHandCardsColor()
if #send_card > 0 then if #send_card > 0 then
table.sort(send_card, tableSortNumber) table.sort(send_card, tableSortNumber)
self._cardCheck:initCards(send_card, { flag = false, flag_allCards = #send_card == self._view_handCard.numItems }) self._cardCheck:initCards(send_card, { flag = false, flag_allCards = #send_card == self._view_handCard.numItems })
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 -- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
else else
self._ctr_canSendCard.selectedIndex = 0 -- self._ctr_canSendCard.selectedIndex = 0
end end
end end
@ -734,16 +751,16 @@ function M:BtnEvent()
self.btn_not_put = self._view:GetChild('btn_not_put') self.btn_not_put = self._view:GetChild('btn_not_put')
self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖 self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖
self.btn_sendCards = self._view:GetChild('Btn_SendCard') self.btn_sendCards = self._view:GetChild('Btn_SendCard')
self._ctr_canSendCard = self.btn_sendCards:GetController('can') -- self._ctr_canSendCard = self.btn_sendCards:GetController('can')
self.btn_sendCards.onClick:Set( self.btn_sendCards.onClick:Set(
function() function()
if self.Reset then if self.Reset then
return return
end end
if self._ctr_canSendCard.selectedIndex == 0 then -- if self._ctr_canSendCard.selectedIndex == 0 then
return -- return
end -- end
local send_card = {} local send_card = {}
self.send_card = {} self.send_card = {}
local currentCard = {} local currentCard = {}
@ -824,7 +841,7 @@ function M:ShowTipsCard(index)
end end
pt(item) pt(item)
self._cardCheck:initCards(item) self._cardCheck:initCards(item)
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 -- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
end end
function M:GetHandCardOffset(count) function M:GetHandCardOffset(count)

View File

@ -33,16 +33,19 @@ local EXProtocol = {
EXPiao_Action = "2032", EXPiao_Action = "2032",
EXConfirmToNextGameSucc = "2010", EXConfirmToNextGameSucc = "2010",
PT_GAMETUOGUAN = "2029", --托管 PT_GAMETUOGUAN = "2029", --托管
SEND_TUOGUAN = "1018", --托管 SEND_TUOGUAN = "1018", --托管
GAME_XIPAI = "20836", GAME_XIPAI = "20836",
GAME_EVENT_XIPAI = "20837", GAME_EVENT_XIPAI = "20837",
GAME_EVENT_NOTIFY_XIPAI = "20838", GAME_EVENT_NOTIFY_XIPAI = "20838",
GAME_EVT_CARDINHAND = "202022", GAME_EVT_CARDINHAND = "202022",
EXCheckCard = "8881", EXCheckCard = "8881",
EXCheckCard_Succ = "8882", EXCheckCard_Succ = "8882",
EXCheckCard_Send = "888" EXCheckCard_Send = "888",
EXBaseScore = "2034",
EXShowRank = "2035"
} }
return EXProtocol return EXProtocol

View File

@ -74,7 +74,13 @@ function M:init(url, data, over, win_seat)
local over0List = self._view:GetChild('list_over0') local over0List = self._view:GetChild('list_over0')
table.sort(data, function(a, b) table.sort(data, function(a, b)
return a.ranking < b.ranking if not a.ranking or a.ranking == 0 then
a.ranking = 4
end
if not b.ranking or b.ranking == 0 then
b.ranking = 4
end
return (a.ranking or 4) > (b.ranking or 4)
end) end)
over0List.itemRenderer = function(index, obj) over0List.itemRenderer = function(index, obj)
local info = data[index + 1] local info = data[index + 1]

View File

@ -138,6 +138,8 @@ function M:FillRoomData(s2croom)
local reloadInfo = s2croom["reloadInfo"] local reloadInfo = s2croom["reloadInfo"]
local bank_seat = reloadInfo["banker_seat"] local bank_seat = reloadInfo["banker_seat"]
room.banker_seat = bank_seat room.banker_seat = bank_seat
room.poolScore = reloadInfo["poolScore"]
local playing = reloadInfo["playing"] local playing = reloadInfo["playing"]
room.curren_turn_seat = reloadInfo["active_seat"] room.curren_turn_seat = reloadInfo["active_seat"]
@ -159,6 +161,9 @@ function M:FillRoomData(s2croom)
p.piao = info_list[i]["piao"] p.piao = info_list[i]["piao"]
p.handCards = info_list[i]["handCards"] p.handCards = info_list[i]["handCards"]
p.outCards = info_list[i]["outCards"] p.outCards = info_list[i]["outCards"]
p.roundCardScore = info_list[i]["roundCardScore"]
p.ranking = info_list[i]["ranking"]
local last_outcard = info_list[i]["last_outcard"] local last_outcard = info_list[i]["last_outcard"]
if last_outcard ~= nil and last_outcard[1] ~= 0 then if last_outcard ~= nil and last_outcard[1] ~= 0 then
local out_card_list = last_outcard.card_list local out_card_list = last_outcard.card_list

View File

@ -20,10 +20,6 @@ function M.new(view, mainView)
self._tex_n4.visible=false self._tex_n4.visible=false
end end
if self._tex_player_name then
self._tex_player_name.visible=false
end
if self._tex_n5 then if self._tex_n5 then
self._tex_n5.visible=false self._tex_n5.visible=false
end end

View File

@ -5,15 +5,15 @@
<image id="n4_l8fn" name="n4" src="l8fnb7jh5" fileName="images/btn_withText.png" xy="-5,0" size="272,145"> <image id="n4_l8fn" name="n4" src="l8fnb7jh5" fileName="images/btn_withText.png" xy="-5,0" size="272,145">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
</image> </image>
<text id="n5_l8fn" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#984732" text="">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<loader id="n7_hmu5" name="n7" xy="1,61" size="262,84" url="ui://27vd145bhmu5b7jhc" vAlign="middle" fill="scale"> <loader id="n7_hmu5" name="n7" xy="1,61" size="262,84" url="ui://27vd145bhmu5b7jhc" vAlign="middle" fill="scale">
<relation target="" sidePair="width-width%,height-height%,left-left,bottom-bottom%"/> <relation target="" sidePair="width-width%,height-height%,left-left,bottom-bottom%"/>
</loader> </loader>
<loader id="n8_hmu5" name="n8" xy="-1,61" size="262,84" url="ui://27vd145bhmu5b7jhf" align="right" vAlign="middle" fill="scale"> <loader id="n8_hmu5" name="n8" xy="-1,61" size="262,84" url="ui://27vd145bhmu5b7jhf" align="right" vAlign="middle" fill="scale">
<relation target="" sidePair="width-width%,height-height%,right-right,bottom-bottom%"/> <relation target="" sidePair="width-width%,height-height%,right-right,bottom-bottom%"/>
</loader> </loader>
<text id="n5_l8fn" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#984732" text="">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
</displayList> </displayList>
<Button downEffect="dark" downEffectValue=".8"/> <Button downEffect="dark" downEffectValue=".8"/>
</component> </component>

View File

@ -2,7 +2,7 @@
<component size="262,134" extention="Button"> <component size="262,134" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/> <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList> <displayList>
<image id="n4_l8fn" name="n4" src="cl8pb7jhh" fileName="images/btn_bg1WithText.png" xy="-3,0" size="268,140"> <image id="n4_l8fn" name="n4" src="cl8pb7jhh" fileName="images/btn_bg1WithText.png" xy="-5,0" size="272,144">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
</image> </image>
<text id="n5_l8fn" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#984732" text=""> <text id="n5_l8fn" name="title" xy="130,67" size="0,0" font="ui://27vd145bej1ib7jgh" fontSize="47" color="#984732" text="">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="55,53" extention="Button"> <component size="55,53" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/> <controller name="button" pages="0,up,1,down" selected="1"/>
<displayList> <displayList>
<image id="n5_9044" name="n5" src="ksftb7jho" fileName="images/choose_down.png" xy="0,0" size="55,53"> <image id="n5_9044" name="n5" src="ksftb7jho" fileName="images/choose_down.png" xy="0,0" size="55,53">
<gearDisplay controller="button" pages="1"/> <gearDisplay controller="button" pages="1"/>
@ -14,5 +14,5 @@
<relation target="" sidePair="middle-middle,left-right"/> <relation target="" sidePair="middle-middle,left-right"/>
</text> </text>
</displayList> </displayList>
<Button mode="Radio"/> <Button mode="Check"/>
</component> </component>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="504,107" extention="Button" initName="btn_time">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_ka5c" name="n3" src="ka5cbt7d9p" fileName="images/btn_time.png" xy="0,0"/>
<text id="n5_ka5c" name="title" xy="122,33" size="294,41" font="ui://27vd145bka5cbt7da5" fontSize="37" letterSpacing="2" autoClearText="true" text="12月11日-12月12号"/>
</displayList>
<Button/>
</component>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,15 @@
info size=80 resizable=true colored=false
char id=48 img=ka5cbt7d9r xoffset=0 yoffset=5 xadvance=0
char id=49 img=ka5cbt7d9s xoffset=0 yoffset=6 xadvance=0
char id=26376 img=ka5cbt7da1 xoffset=0 yoffset=0 xadvance=0
char id=26085 img=ka5cbt7da2 xoffset=0 yoffset=1 xadvance=0
char id=45 img=ka5cbt7da3 xoffset=0 yoffset=31 xadvance=0
char id=21495 img=ka5cbt7da4 xoffset=0 yoffset=1 xadvance=0
char id=50 img=ka5cbt7d9t xoffset=0 yoffset=6 xadvance=0
char id=51 img=ka5cbt7d9u xoffset=0 yoffset=5 xadvance=0
char id=52 img=ka5cbt7d9v xoffset=0 yoffset=6 xadvance=0
char id=53 img=ka5cbt7d9w xoffset=0 yoffset=6 xadvance=0
char id=54 img=ka5cbt7d9x xoffset=0 yoffset=6 xadvance=0
char id=55 img=ka5cbt7d9y xoffset=0 yoffset=6 xadvance=0
char id=56 img=ka5cbt7d9z xoffset=0 yoffset=5 xadvance=0
char id=57 img=ka5cbt7da0 xoffset=0 yoffset=6 xadvance=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -2219,7 +2219,7 @@
<image id="jo5db7jgo" name="btn_confim.png" path="/images/" exported="true"/> <image id="jo5db7jgo" name="btn_confim.png" path="/images/" exported="true"/>
<component id="jo5db7jgp" name="Btn_Head_Round.xml" path="/buttons/" exported="true"/> <component id="jo5db7jgp" name="Btn_Head_Round.xml" path="/buttons/" exported="true"/>
<component id="jo5db7jgq" name="Btn_Multiple.xml" path="/buttons/" exported="true" favorite="true"/> <component id="jo5db7jgq" name="Btn_Multiple.xml" path="/buttons/" exported="true" favorite="true"/>
<image id="l8fnb7jgs" name="bg_tongyong.png" path="/images/" exported="true" scale="9grid" scale9grid="112,81,224,162"/> <image id="l8fnb7jgs" name="bg_tongyong.png" path="/images/" exported="true" favorite="true" scale="9grid" scale9grid="112,81,224,162"/>
<image id="l8fnb7jgt" name="btn_0.png" path="/images/" exported="true"/> <image id="l8fnb7jgt" name="btn_0.png" path="/images/" exported="true"/>
<image id="l8fnb7jgu" name="btn_1.png" path="/images/" exported="true"/> <image id="l8fnb7jgu" name="btn_1.png" path="/images/" exported="true"/>
<image id="l8fnb7jgv" name="btn_2.png" path="/images/" exported="true"/> <image id="l8fnb7jgv" name="btn_2.png" path="/images/" exported="true"/>
@ -2236,7 +2236,7 @@
<image id="l8fnb7jh6" name="btn_xiangqing.png" path="/images/"/> <image id="l8fnb7jh6" name="btn_xiangqing.png" path="/images/"/>
<component id="l8fnb7jh7" name="Btn_Bg1WithText.xml" path="/buttons/" exported="true" favorite="true"/> <component id="l8fnb7jh7" name="Btn_Bg1WithText.xml" path="/buttons/" exported="true" favorite="true"/>
<image id="l8fnb7jh8" name="icon_fangka.png" path="/images/" exported="true"/> <image id="l8fnb7jh8" name="icon_fangka.png" path="/images/" exported="true"/>
<image id="l8fnb7jh9" name="bg_input.png" path="/images/" exported="true" scale="9grid" scale9grid="216,26,432,52"/> <image id="l8fnb7jh9" name="bg_input.png" path="/images/" exported="true" favorite="true" scale="9grid" scale9grid="22,26,201,52"/>
<image id="hmu5b7jha" name="btn_withText1.png" path="/images/" scale="9grid" scale9grid="68,40,302,39"/> <image id="hmu5b7jha" name="btn_withText1.png" path="/images/" scale="9grid" scale9grid="68,40,302,39"/>
<component id="hmu5b7jhb" name="Btn_Bg2WithText1.xml" path="/buttons/" exported="true" favorite="true"/> <component id="hmu5b7jhb" name="Btn_Bg2WithText1.xml" path="/buttons/" exported="true" favorite="true"/>
<image id="hmu5b7jhc" name="bg_huabian.png" path="/images/"/> <image id="hmu5b7jhc" name="bg_huabian.png" path="/images/"/>
@ -2269,6 +2269,25 @@
<image id="9044bt7d9k" name="btn_send_poker.png" path="/images/" exported="true"/> <image id="9044bt7d9k" name="btn_send_poker.png" path="/images/" exported="true"/>
<image id="9044bt7d9l" name="btn_tip_poker.png" path="/images/" exported="true"/> <image id="9044bt7d9l" name="btn_tip_poker.png" path="/images/" exported="true"/>
<image id="9044bt7d9m" name="btn_jia.png" path="/images/" exported="true"/> <image id="9044bt7d9m" name="btn_jia.png" path="/images/" exported="true"/>
<image id="ka5cbt7d9n" name="bg_input2.png" path="/images/" exported="true" favorite="true" scale="9grid" scale9grid="47,21,94,42"/>
<image id="ka5cbt7d9o" name="bg_tongyong1.png" path="/images/" exported="true" favorite="true" scale="9grid" scale9grid="102,52,204,104"/>
<image id="ka5cbt7d9p" name="btn_time.png" path="/images/" exported="true"/>
<component id="ka5cbt7d9q" name="btn_time.xml" path="/buttons/" exported="true"/>
<image id="ka5cbt7d9r" name="0 - 0.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9s" name="1 - 1.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9t" name="2 - 2.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9u" name="3 - 3.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9v" name="4 - 4.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9w" name="5 - 5.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9x" name="6 - 6.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9y" name="7 - 7.png" path="/images/font_time/image/"/>
<image id="ka5cbt7d9z" name="8 - 8.png" path="/images/font_time/image/"/>
<image id="ka5cbt7da0" name="9 - 9.png" path="/images/font_time/image/"/>
<image id="ka5cbt7da1" name="10 - 月.png" path="/images/font_time/image/"/>
<image id="ka5cbt7da2" name="11 - 日.png" path="/images/font_time/image/"/>
<image id="ka5cbt7da3" name="12 - -.png" path="/images/font_time/image/"/>
<image id="ka5cbt7da4" name="13 - 号.png" path="/images/font_time/image/"/>
<font id="ka5cbt7da5" name="FontTime.fnt" path="/images/font_time/" exported="true"/>
</resources> </resources>
<publish name="Common" path="..\wb_unity_pro\Assets\ART\base\common\ui" packageCount="2" maxAtlasSize="2048" rotation="true"> <publish name="Common" path="..\wb_unity_pro\Assets\ART\base\common\ui" packageCount="2" maxAtlasSize="2048" rotation="true">
<atlas name="默认" index="0"/> <atlas name="默认" index="0"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" designImageAlpha="100" designImageLayer="1"> <component size="2532,1170" designImageAlpha="100" designImageLayer="1">
<controller name="state" pages="0,准备状态,1,游戏状态,2,,3,回放,4,观战" selected="1"/> <controller name="state" pages="0,准备状态,1,游戏状态,2,,3,回放,4,观战" selected="0"/>
<controller name="sdk" pages="0,,1," selected="0"/> <controller name="sdk" pages="0,,1," selected="0"/>
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/> <controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
<controller name="time" pages="0,,1,,2,,3,,4," selected="0"/> <controller name="time" pages="0,,1,,2,,3,,4," selected="0"/>
@ -51,24 +51,24 @@
<relation target="" sidePair="right-right,middle-middle"/> <relation target="" sidePair="right-right,middle-middle"/>
</component> </component>
<group id="n121_ckvb" name="playiinfo" xy="68,65" size="2295,878"/> <group id="n121_ckvb" name="playiinfo" xy="68,65" size="2295,878"/>
<component id="n69_sdax" name="player_card_info_1" src="g6uw81" fileName="Main_New/Player_card_info_1.xml" xy="258,763" group="n122_ckvb"> <component id="n69_sdax" name="player_card_info_1" src="g6uw81" fileName="Main_New/Player_card_info_1.xml" xy="258,637" size="2168,532" group="n122_ckvb">
<gearDisplay controller="state" pages="1,3,4"/> <gearDisplay controller="state" pages="1,3,4"/>
<gearLook controller="state" pages="3" values="1,0,0,1" default="1,0,0,1"/> <gearLook controller="state" pages="3" values="1,0,0,1" default="1,0,0,1"/>
<relation target="" sidePair="width-width,center-center,bottom-bottom"/> <relation target="" sidePair="width-width,center-center,bottom-bottom"/>
</component> </component>
<component id="n71_sdax" name="player_card_info_2" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="1686,263" size="434,157" group="n122_ckvb" scale="0.9,0.9" touchable="false"> <component id="n71_sdax" name="player_card_info_2" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="1756,263" size="434,157" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/> <gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/> <relation target="n18" sidePair="right-left,middle-middle"/>
</component> </component>
<component id="n157_11k4t" name="player_card_info_3" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="918,75" size="435,157" group="n122_ckvb" scale="0.9,0.9" touchable="false"> <component id="n157_11k4t" name="player_card_info_3" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="1054,81" size="435,157" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/> <gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/> <relation target="n18" sidePair="right-left,middle-middle"/>
</component> </component>
<component id="n175_g6uw" name="player_card_info_4" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="260,221" size="442,157" group="n122_ckvb" scale="0.9,0.9" touchable="false"> <component id="n175_g6uw" name="player_card_info_4" src="g6uw8r" fileName="Main_New/Player_card_info_3.xml" xy="285,263" size="442,157" group="n122_ckvb" scale="0.9,0.9" touchable="false">
<gearDisplay controller="state" pages="1,3,4"/> <gearDisplay controller="state" pages="1,3,4"/>
<relation target="n18" sidePair="right-left,middle-middle"/> <relation target="n18" sidePair="right-left,middle-middle"/>
</component> </component>
<group id="n122_ckvb" name="playCardInfo" xy="258,75" size="2168,1094"/> <group id="n122_ckvb" name="playCardInfo" xy="258,81" size="2168,1088"/>
<component id="n152_n9qr" name="btn_inviteFamily" src="g6uw8y" fileName="Main_new/Main/Component/btn_normol.xml" xy="2404,264" size="129,243" visible="false"> <component id="n152_n9qr" name="btn_inviteFamily" src="g6uw8y" fileName="Main_new/Main/Component/btn_normol.xml" xy="2404,264" size="129,243" visible="false">
<gearDisplay controller="state" pages="0"/> <gearDisplay controller="state" pages="0"/>
<relation target="" sidePair="right-right"/> <relation target="" sidePair="right-right"/>
@ -122,10 +122,10 @@
<image id="n134_ckvb" name="n134" src="g6uw3u" fileName="Main_New/Image/gamexzmj_68.png" xy="2052,27" size="203,62" group="n131_ckvb"> <image id="n134_ckvb" name="n134" src="g6uw3u" fileName="Main_New/Image/gamexzmj_68.png" xy="2052,27" size="203,62" group="n131_ckvb">
<relation target="" sidePair="right-center%,top-top"/> <relation target="" sidePair="right-center%,top-top"/>
</image> </image>
<text id="n137_ckvb" name="text_roomIdName" xy="1950,26" size="117,61" group="n131_ckvb" visible="false" font="FZCuYuan-M03" fontSize="46" color="#ffffff" letterSpacing="4" singleLine="true" text="房间:&#xA;"> <text id="n137_ckvb" name="text_roomIdName" xy="1720,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"/> <relation target="" sidePair="right-center%,top-top"/>
</text> </text>
<text id="n151_n9qr" name="text_roomId" xy="2069,24" size="187,67" group="n131_ckvb" visible="false" font="FZCuYuan-M03" fontSize="50" color="#ece7b9" letterSpacing="3" singleLine="true" text="372507"> <text id="n151_n9qr" name="text_roomId" xy="1839,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"/> <relation target="n137_ckvb" sidePair="left-right,top-top"/>
</text> </text>
<component id="n138_ckvb" name="btn_rule" src="g6uw25" fileName="Main_New/Component/Btn_GamePlay.xml" xy="2276,27" size="138,67" group="n131_ckvb"> <component id="n138_ckvb" name="btn_rule" src="g6uw25" fileName="Main_New/Component/Btn_GamePlay.xml" xy="2276,27" size="138,67" group="n131_ckvb">
@ -193,6 +193,20 @@
</component> </component>
<group id="n172_o2zr" name="huifang" xy="0,35" size="2532,984" group="n173_o2zr" advanced="true"/> <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"/> <group id="n173_o2zr" name="playback" xy="0,0" size="2532,1170"/>
<image id="n177_h7iy" name="n177" src="h7iy18z" fileName="image/bg_duoduo_baseScore.png" xy="-10,10" size="480,110"/>
<text id="n176_p7fz" name="textTitle_baseScore" xy="0,33" size="292,64" font="ui://27vd145bej1ib7jgh" fontSize="48" color="#ffec82" strokeColor="#994a11" strokeSize="3" text="当前牌局分:"/>
<text id="n178_h7iy" name="text_baseScore" xy="269,33" size="80,64" font="ui://27vd145bej1ib7jgh" fontSize="48" color="#ffec82" strokeColor="#994a11" strokeSize="3" autoClearText="true" text="123"/>
<list id="n179_h7iy" name="list_dipais" xy="668,472" pivot="0.5,0.5" size="1196,226" touchable="false" layout="row" colGap="-37" defaultItem="ui://kvku0fu4g6uw2f" align="center">
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
</list>
</displayList> </displayList>
<transition name="t1"> <transition name="t1">
<item time="0" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="1" duration="18"/> <item time="0" type="Alpha" target="n75_jmab" tween="true" startValue="1" endValue="1" duration="18"/>

View File

@ -2,7 +2,7 @@
<component size="154,654" extention="Button"> <component size="154,654" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/> <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList> <displayList>
<list id="n3_g6uw" name="list" xy="0,0" size="154,654" lineGap="-154" defaultItem="ui://kvku0fu4g6uw2g" vAlign="bottom" autoClearItems="true"> <list id="n3_g6uw" name="list" xy="0,0" size="154,654" lineGap="-144" defaultItem="ui://kvku0fu4g6uw2g" vAlign="bottom" autoClearItems="true">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
<item/> <item/>
<item/> <item/>

View File

@ -1,18 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="170,240" extention="Button"> <component size="154,200" extention="Button">
<controller name="button" pages="0,up,1,down" selected="1"/> <controller name="button" pages="0,up,1,down" selected="0"/>
<controller name="choose" pages="0,,1," selected="1"/> <controller name="choose" pages="0,,1," selected="0"/>
<displayList> <displayList>
<loader id="n4_ckvb" name="icon" xy="0,-74" size="170,240" group="n6_ckvb" url="ui://Main_Poker/203" align="center" vAlign="bottom" fill="scaleFree" clearOnPublish="true"> <loader id="n4_ckvb" name="icon" xy="0,0" size="154,200" group="n6_ckvb" url="ui://Extend_Poker_DuoDuo/203" align="center" vAlign="bottom" fill="scaleFree" clearOnPublish="true">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
</loader> </loader>
<image id="n7_diqo" name="n7" src="g6uw1g" fileName="Main_New/Component/Image/bg_mask.png" xy="-1,-80" size="175,244" group="n6_ckvb"> <image id="n7_diqo" name="n7" src="g6uw1g" fileName="Main_New/Component/Image/bg_mask.png" xy="-1,-6" size="159,204" group="n6_ckvb">
<gearDisplay controller="choose" pages="1"/> <gearDisplay controller="choose" pages="1"/>
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
</image> </image>
<group id="n6_ckvb" name="body" xy="-1,-80" size="175,246" advanced="true"> <group id="n6_ckvb" name="body" xy="-1,-6" size="159,206" advanced="true"/>
<gearXY controller="button" pages="0,1" values="-1,0|-1,-80"/>
</group>
</displayList> </displayList>
<Button mode="Check"/> <Button mode="Check"/>
</component> </component>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="154,216"> <component size="136,192">
<displayList> <displayList>
<loader id="n0_ckvb" name="icon" xy="0,0" size="154,216" url="ui://Main_Poker/103" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true"> <loader id="n0_ckvb" name="icon" xy="0,3" size="136,192" url="ui://Main_Poker/115" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
</loader> </loader>
</displayList> </displayList>

View File

@ -12,24 +12,13 @@
<controller name="cScore" pages="0,,1," selected="0"/> <controller name="cScore" pages="0,,1," selected="0"/>
<controller name="baodan" pages="0,,1," selected="0"/> <controller name="baodan" pages="0,,1," selected="0"/>
<controller name="piaoWin" pages="0,,1," selected="0"/> <controller name="piaoWin" pages="0,,1," selected="0"/>
<controller name="rank" pages="0,,1,,2,,3,,4," selected="1"/>
<displayList> <displayList>
<image id="n8" name="ready__" src="g6uw75" fileName="component/Result/yzb.png" xy="-1,-113" visible="false">
<gearDisplay controller="read" pages="1"/>
</image>
<component id="n39_fove" name="n39" src="g6uw76" fileName="component/newcard/3/310.xml" xy="136,28" scale="0.4,0.4">
<gearDisplay controller="Oener" pages="1"/>
</component>
<image id="n40_d2rw" name="n40" src="g6uw7b" fileName="component/head/tuoguan.png" xy="187,7">
<gearDisplay controller="tuoguan" pages="1"/>
</image>
<text id="n48_nkur" name="tuoguanTips" xy="-46,-39" size="237,48" visible="false" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间90S"/> <text id="n48_nkur" name="tuoguanTips" xy="-46,-39" size="237,48" visible="false" fontSize="22" color="#ff0000" vAlign="middle" autoSize="none" text="开启托管剩余时间90S"/>
<component id="n5" name="btn_head" src="g6uw1h" fileName="Main_New/Component/btn_head.xml" xy="0,0" size="144,144" group="n49_ckvb" aspect="true"> <component id="n5" name="btn_head" src="g6uw1h" fileName="Main_New/Component/btn_head.xml" xy="0,0" size="144,144" group="n49_ckvb" aspect="true">
<relation target="" sidePair="width-width,height-height,center-center,middle-middle"/> <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
</component> </component>
<group id="n49_ckvb" name="head" xy="0,0" size="144,144"/> <group id="n49_ckvb" name="head" xy="0,0" size="144,144"/>
<text id="n45_kx91" name="text_jifen" xy="59,188" size="48,59" scale="1.3,1" font="FZCuYuan-M03" fontSize="44" color="#ffffff" align="center" vAlign="middle" letterSpacing="3" autoClearText="true" text="01">
<relation target="n59_n9qr" sidePair="middle-middle,left-right"/>
</text>
<image id="n6" name="fangzhu" src="g6uwg" fileName="font/images/head/owner.png" xy="2,89" size="98,53"> <image id="n6" name="fangzhu" src="g6uwg" fileName="font/images/head/owner.png" xy="2,89" size="98,53">
<gearDisplay controller="room_owner" pages="1"/> <gearDisplay controller="room_owner" pages="1"/>
<relation target="" sidePair="width-width%,height-height%,left-left,bottom-bottom"/> <relation target="" sidePair="width-width%,height-height%,left-left,bottom-bottom"/>
@ -38,29 +27,9 @@
<gearDisplay controller="bank" pages="1"/> <gearDisplay controller="bank" pages="1"/>
<relation target="" sidePair="width-width%,height-height%,left-left,top-top"/> <relation target="" sidePair="width-width%,height-height%,left-left,top-top"/>
</image> </image>
<text id="n51_ckvb" name="name" xy="2,138" size="311,59" font="Arial" fontSize="44" color="#ffe26d" vAlign="middle" letterSpacing="6" autoSize="none" autoClearText="true" text="你好~凌"> <text id="n51_ckvb" name="name" xy="2,138" size="295,44" font="ui://27vd145bej1ib7jgl" fontSize="32" color="#ffffdf" vAlign="middle" letterSpacing="6" autoSize="none" autoClearText="true" text="你好~凌梦常常常常">
<relation target="" sidePair="left-left,top-bottom%"/> <relation target="" sidePair="left-left,top-bottom%"/>
</text> </text>
<image id="n28_e54q" name="n28" src="g6uw7d" fileName="font/images/head/index_bg_01.png" xy="-343,-226" size="100,98" group="n33_e7qn" aspect="true" visible="false"/>
<component id="n34_u4l2" name="zhuang" src="g6uw7e" fileName="component/head/touxiang.xml" xy="-371,-254" group="n33_e7qn" visible="false">
<gearDisplay controller="bank" pages="1"/>
</component>
<graph id="n32_kba2" name="offLine__" xy="-340,-226" size="100,100" group="n33_e7qn" aspect="true" touchable="false" type="rect" lineSize="0" fillColor="#b3000000">
<gearDisplay controller="offline" pages="1"/>
</graph>
<text id="n37_aawn" name="n37" xy="-323,-192" size="64,42" group="n33_e7qn" fontSize="30" color="#ffffff" text="离线">
<gearDisplay controller="offline" pages="1"/>
</text>
<component id="n36_h4ge" name="n36" xy="-333,-216" size="100,100" group="n33_e7qn" touchable="false">
<gearDisplay controller="dismiss_room" pages="1"/>
</component>
<group id="n33_e7qn" name="n33" xy="-371,-254" size="155,155" group="n52_ckvb"/>
<text id="n41_i3h6" name="piao" xy="-338,-248" size="92,29" group="n52_ckvb" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
<component id="n29_e54q" name="info" src="g6uw7i" fileName="component/head/HeadNameBG.xml" xy="-360,-121" group="n52_ckvb"/>
<image id="n44_kx91" name="n44" src="g6uw7k" fileName="component/head/jfk.png" xy="-352,-71" size="132,35" group="n47_kx91"/>
<text id="n46_kx91" name="n46" xy="-346,-69" size="48,32" group="n47_kx91" fontSize="22" color="#512e06" vAlign="middle" text="战绩"/>
<group id="n47_kx91" name="zhanji" xy="-352,-71" size="132,35" group="n52_ckvb" advanced="true"/>
<group id="n52_ckvb" name="old" xy="-371,-254" size="155,218" visible="false" advanced="true"/>
<component id="n53_n9qr" name="chat" src="g6uw7l" fileName="component/head/MsgBubble2.xml" xy="55,12" size="232,80" alpha="0" touchable="false"> <component id="n53_n9qr" name="chat" src="g6uw7l" fileName="component/head/MsgBubble2.xml" xy="55,12" size="232,80" alpha="0" touchable="false">
<Label title="你太牛了"/> <Label title="你太牛了"/>
</component> </component>
@ -73,9 +42,6 @@
<component id="n58_n9qr" name="mask_voice" src="g6uw7p" fileName="component/head/VoiceMask(1).xml" xy="136,23" size="140,74" touchable="false"> <component id="n58_n9qr" name="mask_voice" src="g6uw7p" fileName="component/head/VoiceMask(1).xml" xy="136,23" size="140,74" touchable="false">
<gearDisplay controller="mask_voice" pages="1"/> <gearDisplay controller="mask_voice" pages="1"/>
</component> </component>
<image id="n59_n9qr" name="n59" src="g6uw3t" fileName="Main_New/Image/coin.png" xy="7,198" size="48,37">
<relation target="" sidePair="left-left,top-bottom%"/>
</image>
<image id="n60_n9qr" name="ready" src="g6uw7t" fileName="images/gamexzmj_9 1.png" xy="30,-80" size="63,65" scale="1.2,1.2"> <image id="n60_n9qr" name="ready" src="g6uw7t" fileName="images/gamexzmj_9 1.png" xy="30,-80" size="63,65" scale="1.2,1.2">
<gearDisplay controller="read" pages="1"/> <gearDisplay controller="read" pages="1"/>
<relation target="" sidePair="center-center,bottom-top"/> <relation target="" sidePair="center-center,bottom-top"/>
@ -87,15 +53,40 @@
<image id="n63_n9qr" name="n63" src="g6uw3y" fileName="Main_New/Image/alarm1.png" xy="-45,230" pivot="0.47,0.25" size="260,243" rotation="-20"> <image id="n63_n9qr" name="n63" src="g6uw3y" fileName="Main_New/Image/alarm1.png" xy="-45,230" pivot="0.47,0.25" size="260,243" rotation="-20">
<gearDisplay controller="baodan" pages="1"/> <gearDisplay controller="baodan" pages="1"/>
</image> </image>
<text id="n64_diqo" name="text_piaoScoreAdd" xy="-37,167" pivot="0.5,0.5" size="219,67" visible="false" font="ui://27vd145bdiqo7jd9" fontSize="42" text="+1000"> <text id="n64_diqo" name="text_piaoScoreAdd" xy="11,172" pivot="0.5,0.5" size="122,57" visible="false" font="ui://27vd145bdiqo7jd9" fontSize="42" text="+1000">
<gearDisplay controller="piaoWin" pages="1"/> <gearDisplay controller="piaoWin" pages="1"/>
<relation target="" sidePair="center-center"/> <relation target="" sidePair="center-center"/>
</text> </text>
<text id="n65_diqo" name="text_piaoScoreLess" xy="-37,167" pivot="0.5,0.5" size="219,67" visible="false" font="ui://27vd145bdiqocn2" fontSize="42" text="-1000"> <text id="n65_diqo" name="text_piaoScoreLess" xy="17,172" pivot="0.5,0.5" size="111,57" visible="false" font="ui://27vd145bdiqocn2" fontSize="42" text="-1000">
<gearDisplay controller="piaoWin" pages="0"/> <gearDisplay controller="piaoWin" pages="0"/>
<relation target="" sidePair="center-center"/> <relation target="" sidePair="center-center"/>
</text> </text>
<component id="n66_bm7d" name="comp_hudon" src="g6uw7v" fileName="Main_new/Main/Component/comp_hudon.xml" xy="-28,-15" touchable="false"/> <component id="n66_bm7d" name="comp_hudon" src="g6uw7v" fileName="Main_new/Main/Component/comp_hudon.xml" xy="-28,-15" touchable="false"/>
<text id="n71_y444" name="piao" xy="27,114" size="92,29" fontSize="20" color="#ffd100" align="center" vAlign="middle" autoSize="none" text=""/>
<graph id="n67_y444" name="n67" xy="-20,181" size="183,78" group="n72_y444" type="rect" lineSize="0" lineColor="#66000000" fillColor="#66000000" corner="20"/>
<text id="n45_kx91" name="textTitle_jifen" xy="-10,192" size="57,29" group="n72_y444" font="ui://27vd145bej1ib7jgh" fontSize="20" color="#ffff6d" align="center" vAlign="middle" letterSpacing="3" text="积分:"/>
<text id="n68_y444" name="text_jifen" xy="47,184" size="171,44" group="n72_y444" font="ui://27vd145bej1ib7jgh" fontSize="32" color="#ffff6d" vAlign="middle" letterSpacing="3" autoSize="none" autoClearText="true" text="12345678"/>
<text id="n69_y444" name="textTitle_paijufen" xy="-10,225" size="80,29" group="n72_y444" font="ui://27vd145bej1ib7jgh" fontSize="20" color="#ffff6d" align="center" vAlign="middle" letterSpacing="3" text="牌局分:"/>
<text id="n70_y444" name="text_paijufen" xy="69,217" size="92,44" group="n72_y444" font="ui://27vd145bej1ib7jgh" fontSize="32" color="#ffff6d" vAlign="middle" letterSpacing="3" autoSize="none" autoClearText="true" text="12345678"/>
<group id="n72_y444" name="jifen" xy="-20,181" size="238,80" advanced="true">
<relation target="" sidePair="top-bottom%"/>
</group>
<image id="n73_pd2q" name="n73" src="pd2q190" fileName="image/bg_rank1.png" xy="107,-15">
<gearDisplay controller="rank" pages="1"/>
<relation target="" sidePair="right-right,top-top"/>
</image>
<image id="n74_pd2q" name="n74" src="pd2q191" fileName="image/bg_rank2.png" xy="107,-15">
<gearDisplay controller="rank" pages="2"/>
<relation target="" sidePair="right-right,top-top"/>
</image>
<image id="n75_pd2q" name="n75" src="pd2q192" fileName="image/bg_rank3.png" xy="107,-15">
<gearDisplay controller="rank" pages="3"/>
<relation target="" sidePair="right-right,top-top"/>
</image>
<image id="n76_pd2q" name="n76" src="pd2q193" fileName="image/bg_rank4.png" xy="124,-1">
<gearDisplay controller="rank" pages="4"/>
<relation target="" sidePair="right-right,top-top"/>
</image>
</displayList> </displayList>
<transition name="t0" autoPlay="true" autoPlayRepeat="-1"> <transition name="t0" autoPlay="true" autoPlayRepeat="-1">
<item time="0" type="Rotation" target="n63_n9qr" tween="true" startValue="0" endValue="-20" duration="6" ease="Linear"/> <item time="0" type="Rotation" target="n63_n9qr" tween="true" startValue="0" endValue="-20" duration="6" ease="Linear"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="2168,406" opaque="false" initName="player_card_info"> <component size="2168,406" opaque="false" initName="player_card_info">
<controller name="output" pages="0,,1,,2," selected="1"/> <controller name="output" pages="0,,1,,2," selected="0"/>
<controller name="out_card_option" homePageType="specific" homePage="1" pages="0,,1,,2," selected="1"/> <controller name="out_card_option" homePageType="specific" homePage="1" pages="0,,1,,2," selected="1"/>
<controller name="put_error" pages="0,,1," selected="0"/> <controller name="put_error" pages="0,,1," selected="0"/>
<controller name="piao" pages="0,,1,,2,,3," selected="0"/> <controller name="piao" pages="0,,1,,2,,3," selected="0"/>
@ -48,7 +48,7 @@
<Button icon="ui://kvku0fu4g6uw8e" selectedIcon="ui://kvku0fu4g6uw8e" controller="piao_value" page="5"/> <Button icon="ui://kvku0fu4g6uw8e" selectedIcon="ui://kvku0fu4g6uw8e" controller="piao_value" page="5"/>
</component> </component>
<group id="n63_i3h6" name="piao" xy="66,-185" size="1250,103"/> <group id="n63_i3h6" name="piao" xy="66,-185" size="1250,103"/>
<list id="n69_ckvb" name="List_HandCard" xy="0,2" pivot="0.5,1" size="2168,406" layout="flow_hz" selectionMode="none" lineGap="-59" colGap="-95" defaultItem="ui://kvku0fu4g6uw2g" align="center" vAlign="bottom" autoClearItems="true"> <list id="n69_ckvb" name="List_HandCard" xy="0,0" pivot="0.5,1" size="2168,406" layout="flow_hz" selectionMode="none" lineGap="-32" colGap="-20" defaultItem="ui://kvku0fu4g6uwp0" align="center" vAlign="bottom" autoClearItems="true">
<relation target="" sidePair="width-width,height-height"/> <relation target="" sidePair="width-width,height-height"/>
<item/> <item/>
<item/> <item/>
@ -65,47 +65,8 @@
<item/> <item/>
<item/> <item/>
<item/> <item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
</list> </list>
<list id="n70_ckvb" name="List_Out" xy="797,-236" pivot="0.5,0.5" size="454,210" layout="row" selectionMode="none" colGap="-105" defaultItem="ui://kvku0fu4g6uw2f" align="center" vAlign="middle"> <list id="n70_ckvb" name="List_Out" xy="797,-238" pivot="0.5,0.5" size="454,210" layout="row" selectionMode="none" colGap="-91" defaultItem="ui://kvku0fu4g6uw2f" align="center" vAlign="middle">
<gearDisplay controller="output" pages="1"/> <gearDisplay controller="output" pages="1"/>
<relation target="n69_ckvb" sidePair="bottom-top"/> <relation target="n69_ckvb" sidePair="bottom-top"/>
<item/> <item/>
@ -116,33 +77,25 @@
<item/> <item/>
<item/> <item/>
</list> </list>
<component id="n74_ckvb" name="Btn_SendCard" src="g6uw1k" fileName="Main_New/Component/Btn_SendCard.xml" xy="1196,-1058" size="384,125" group="n73_ckvb" visible="false">
<Button sound=""/>
</component>
<component id="n75_ckvb" name="Btn_Tip" src="g6uw1n" fileName="Main_New/Component/Btn_Tip.xml" xy="766,-1062" size="384,125" group="n73_ckvb" visible="false">
<Button sound=""/>
</component>
<group id="n73_ckvb" name="btn" xy="766,-1062" size="814,129" advanced="true">
<gearDisplay controller="out_card_option" pages="1,2"/>
</group>
<text id="n56_dg1i" name="put_error" xy="717,-276" size="781,83" fontSize="50" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#000000" shadowColor="#000000" shadowOffset="1,1" text="出牌不符合规定牌型"> <text id="n56_dg1i" name="put_error" xy="717,-276" size="781,83" fontSize="50" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#000000" shadowColor="#000000" shadowOffset="1,1" text="出牌不符合规定牌型">
<gearDisplay controller="put_error" pages="1"/> <gearDisplay controller="put_error" pages="1"/>
</text> </text>
<component id="n77_n9qr" name="Comp_Clock" src="g6uw1i" fileName="Main_New/Component/Comp_Clock.xml" xy="536,-205" size="174,143"> <component id="n77_n9qr" name="Comp_Clock" src="g6uw1i" fileName="Main_New/Component/Comp_Clock.xml" xy="300,-218" size="174,143">
<gearDisplay controller="time_clock" pages="1"/> <gearDisplay controller="time_clock" pages="1"/>
<relation target="n80_g6m8" sidePair="middle-middle,left-right"/>
</component> </component>
<component id="n86_9044" name="Btn_SendCard_back" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="919,-245" size="330,135" group="n80_g6m8"> <component id="n86_9044" name="Btn_SendCard" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="1311,-217" size="330,135" group="n80_g6m8">
<Button icon="ui://27vd145b9044bt7d9k"/> <Button icon="ui://27vd145b9044bt7d9k"/>
</component> </component>
<component id="n87_9044" name="btn_not_put" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="1311,-245" size="330,135" group="n80_g6m8"> <component id="n87_9044" name="btn_not_put" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="919,-217" size="330,135" group="n80_g6m8">
<gearDisplay controller="out_card_option" pages="1"/>
<Button icon="ui://27vd145b9044bt7d9j"/> <Button icon="ui://27vd145b9044bt7d9j"/>
</component> </component>
<component id="n88_9044" name="Btn_Tip_back" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="527,-245" size="330,135" group="n80_g6m8"> <component id="n88_9044" name="Btn_Tip" src="ej1ib7jgf" fileName="buttons/Btn_Normol.xml" pkg="27vd145b" xy="527,-217" size="330,135" group="n80_g6m8">
<Button icon="ui://27vd145b9044bt7d9l"/> <Button icon="ui://27vd145b9044bt7d9l"/>
</component> </component>
<group id="n80_g6m8" name="btn_back" xy="527,-245" size="1114,135" advanced="true"> <group id="n80_g6m8" name="btn_back" xy="527,-217" size="1114,135" advanced="true">
<gearDisplay controller="out_card_option" pages="1"/> <gearDisplay controller="out_card_option" pages="1,2"/>
<relation target="n69_ckvb" sidePair="bottom-top"/>
</group> </group>
</displayList> </displayList>
<transition name="score"> <transition name="score">

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="1760,157" opaque="false" initName="player_card_info"> <component size="1760,157" opaque="false" initName="player_card_info">
<controller name="output" homePageType="specific" homePage="1" pages="0,,1,,2," selected="1"/> <controller name="output" homePageType="specific" homePage="1" pages="0,,1,,2," selected="0"/>
<controller name="one_card" pages="0,,1," selected="0"/> <controller name="one_card" pages="0,,1," selected="0"/>
<controller name="resultOut" homePageType="specific" homePage="0" pages="0,,1," selected="0"/> <controller name="resultOut" homePageType="specific" homePage="0" pages="0,,1," selected="0"/>
<controller name="time_clock" pages="0,,1," selected="0"/> <controller name="time_clock" homePageType="specific" homePage="1" pages="0,,1," selected="1"/>
<controller name="out_card_option2" pages="0,,1," selected="0"/> <controller name="out_card_option2" pages="0,,1," selected="0"/>
<displayList> <displayList>
<list id="n53_q9cc" name="hand_card_list" xy="-697,-634" size="445,78" visible="false" layout="row" selectionMode="none" overflow="scroll" lineGap="-15" colGap="-25" defaultItem="ui://kvku0fu4g6uw8l" align="right"/> <list id="n53_q9cc" name="hand_card_list" xy="-697,-634" size="445,78" visible="false" layout="row" selectionMode="none" overflow="scroll" lineGap="-15" colGap="-25" defaultItem="ui://kvku0fu4g6uw8l" align="right"/>
<component id="n59_8yp0" name="out_card_com" src="g6uw82" fileName="component/poker/hand_poker_con.xml" xy="-640,-632" size="390,179" visible="false"/> <component id="n59_8yp0" name="out_card_com" src="g6uw82" fileName="component/poker/hand_poker_con.xml" xy="-640,-632" size="390,179" visible="false"/>
<image id="n47_g618" name="n47" src="g6uw3s" fileName="Main_New/Image/要不起.png" xy="15,35" size="213,62"> <image id="n47_g618" name="n47" src="g6uw3s" fileName="Main_New/Image/要不起.png" xy="215,35" size="213,62">
<gearDisplay controller="output" pages="2"/> <gearDisplay controller="output" pages="2"/>
</image> </image>
<component id="n54_jlqq" name="one_card_eff" src="g6uw8m" fileName="component/effect/one_card_eff/one_card_eff.xml" xy="192,-106"> <component id="n54_jlqq" name="one_card_eff" src="g6uw8m" fileName="component/effect/one_card_eff/one_card_eff.xml" xy="192,-106">
@ -18,9 +18,14 @@
<text id="n56_8yp0" name="CardNumber" xy="-249,-482" size="114,37" visible="false" fontSize="26" color="#ffffff" align="center" vAlign="middle" autoSize="none" shadowColor="#000000" shadowOffset="1,1" text=""/> <text id="n56_8yp0" name="CardNumber" xy="-249,-482" size="114,37" visible="false" fontSize="26" color="#ffffff" align="center" vAlign="middle" autoSize="none" shadowColor="#000000" shadowOffset="1,1" text=""/>
<text id="n58_8yp0" name="area_mask" xy="-898,-1013" size="358,566" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;outcard_list&quot;:{&#xA; &quot;parent&quot;:&quot;out_card_com&quot;,&#xA; &quot;obj&quot;:&quot;poker7&quot;,&#xA; &quot;maxcount_x&quot;:8,&#xA; &quot;start_x&quot;:400,&#xA; &quot;start_y&quot;:0&#xA; }&#xA;}"/> <text id="n58_8yp0" name="area_mask" xy="-898,-1013" size="358,566" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;outcard_list&quot;:{&#xA; &quot;parent&quot;:&quot;out_card_com&quot;,&#xA; &quot;obj&quot;:&quot;poker7&quot;,&#xA; &quot;maxcount_x&quot;:8,&#xA; &quot;start_x&quot;:400,&#xA; &quot;start_y&quot;:0&#xA; }&#xA;}"/>
<component id="n60_agiz" name="mask_liangpai" src="g6uw88" fileName="component/Component1.xml" xy="-640,-632" size="5,5" visible="false"/> <component id="n60_agiz" name="mask_liangpai" src="g6uw88" fileName="component/Component1.xml" xy="-640,-632" size="5,5" visible="false"/>
<list id="n61_ckvb" name="List_Out" xy="0,0" size="439,210" layout="row" selectionMode="none" scroll="horizontal" colGap="-106" defaultItem="ui://kvku0fu4g6uw2f" vAlign="middle"> <list id="n61_ckvb" name="List_Out" xy="0,0" size="432,210" layout="flow_hz" selectionMode="none" scroll="horizontal" lineGap="-81" colGap="-94" defaultItem="ui://kvku0fu4g6uw2f" vAlign="middle">
<gearDisplay controller="output" pages="1"/> <gearDisplay controller="output" pages="1"/>
<relation target="" sidePair="width-width,height-height"/> <item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/> <item/>
<item/> <item/>
<item/> <item/>
@ -49,7 +54,7 @@
<item/> <item/>
<item/> <item/>
</list> </list>
<component id="n64_n9qr" name="Comp_Clock" src="g6uw1i" fileName="Main_New/Component/Comp_Clock.xml" xy="-138,-6" size="174,143"> <component id="n64_n9qr" name="Comp_Clock" src="g6uw1i" fileName="Main_New/Component/Comp_Clock.xml" xy="249,0" size="174,143">
<gearDisplay controller="time_clock" pages="1"/> <gearDisplay controller="time_clock" pages="1"/>
</component> </component>
<list id="n65_if10" name="list_backHand" xy="-80,-56" size="1080,195" scale="0.657,1" rotation="90" touchable="false" layout="row" overflow="scroll" colGap="-120" defaultItem="ui://kvku0fu4g6uw2f" align="center" autoClearItems="true"> <list id="n65_if10" name="list_backHand" xy="-80,-56" size="1080,195" scale="0.657,1" rotation="90" touchable="false" layout="row" overflow="scroll" colGap="-120" defaultItem="ui://kvku0fu4g6uw2f" align="center" autoClearItems="true">
@ -78,9 +83,9 @@
<group id="n68_g6m8" name="btn_back" xy="56,74" size="200,322" advanced="true"> <group id="n68_g6m8" name="btn_back" xy="56,74" size="200,322" advanced="true">
<gearDisplay controller="out_card_option2" pages="1"/> <gearDisplay controller="out_card_option2" pages="1"/>
</group> </group>
<text id="n69_t63r" name="text_paiNum" xy="459,62" size="108,80" font="ui://27vd145bej1ib7jgl" fontSize="61" text="X77"> <text id="n69_t63r" name="text_paiNum" xy="314,-100" size="114,84" font="ui://27vd145bej1ib7jgl" fontSize="64" color="#ffffff" strokeColor="#711d12" strokeSize="2" text="X77">
<gearDisplay controller="output" pages="1"/> <gearDisplay controller="output" pages="1"/>
<relation target="n61_ckvb" sidePair="left-right"/> <relation target="n61_ckvb" sidePair="right-right"/>
</text> </text>
</displayList> </displayList>
<transition name="score"> <transition name="score">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170"> <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="win" pages="0,,1," selected="0"/>
<controller name="isgroup" pages="0,,1," selected="0"/> <controller name="isgroup" pages="0,,1," selected="0"/>
<displayList> <displayList>
@ -11,6 +11,10 @@
<image id="n58_b9zt" name="n58" src="b9zt17w" fileName="Clearing/Image/icon_poker_lab_win.png" xy="825,0" 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"/> <gearDisplay controller="win" pages="1"/>
</image> </image>
<image id="n72_pd2q" name="n72" src="pd2q190" fileName="image/bg_rank1.png" xy="652,484" group="n4_ckvb"/>
<image id="n73_pd2q" name="n73" src="pd2q191" fileName="image/bg_rank2.png" xy="652,587" group="n4_ckvb"/>
<image id="n74_pd2q" name="n74" src="pd2q192" fileName="image/bg_rank3.png" xy="652,694" group="n4_ckvb"/>
<image id="n75_pd2q" name="n75" src="pd2q193" fileName="image/bg_rank4.png" xy="669,814" group="n4_ckvb"/>
<image id="n59_b9zt" name="n59" src="b9zt17v" fileName="Clearing/Image/icon_poker_lab_lose.png" xy="825,0" group="n4_ckvb"> <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"/> <gearDisplay controller="win" pages="0"/>
</image> </image>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_103" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_104" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_105" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_106" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_107" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_108" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_109" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_110" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_111" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_112" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_113" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_114" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="154,200">
<displayList>
<loader id="n9_t63r" name="n9" xy="-7,0" size="161,207" url="ui://Extend_Poker_DuoDuo/card0_115" fill="scaleFree"/>
<image id="n6_iqk2" name="n6" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="64,11" size="26,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n7_iqk2" name="n7" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="90,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
<image id="n8_iqk2" name="n8" src="g6uw2e" fileName="newcard/素材/fangpian.png" xy="115,11" size="25,24" aspect="true">
<relation target="" sidePair="left-left%,top-top%"/>
</image>
</displayList>
</component>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

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