diff --git a/lua_probject/base_project/Game/View/LobbyView.lua b/lua_probject/base_project/Game/View/LobbyView.lua index 623cc72a..2f31c40c 100644 --- a/lua_probject/base_project/Game/View/LobbyView.lua +++ b/lua_probject/base_project/Game/View/LobbyView.lua @@ -33,38 +33,13 @@ function LobbyView.new() end function M:InitView(url) - -- print("init lobbyView!!!!") BaseView.InitView(self, url) self._full_offset = false local view = self._view - if self.alldonhua then - coroutine.step(1, self.alldonhua) - else - self:InitClip() - end - local btn_head = view:GetChild("btn_head") ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) btn_head.onClick:Set(function() - -- local headView = HeadView.new(DataManager.SelfUser, nil, function() - -- view:GetChild("tex_name").text = DataManager.SelfUser.nick_name - -- ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) - -- end) - -- headView:Show() - local lobbyHeadView = LobbyHeadView.new(DataManager.SelfUser, DataManager.SelfUser.agent, function() - ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) - end) - lobbyHeadView:Show() - end) - - local btn_teamwork = view:GetChild("btn_teamwork") - btn_teamwork.onClick:Set(function() - -- local headView = HeadView.new(DataManager.SelfUser, nil, function() - -- view:GetChild("tex_name").text = DataManager.SelfUser.nick_name - -- ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) - -- end) - -- headView:Show() local lobbyHeadView = LobbyHeadView.new(DataManager.SelfUser, DataManager.SelfUser.agent, function() ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) end) @@ -73,16 +48,15 @@ function M:InitView(url) view:GetChild("tex_name").text = DataManager.SelfUser.nick_name view:GetChild("tex_id").text = string.format("ID:%s", DataManager.SelfUser.account_id) - view:GetChild("gcm_diamo").text = tostring(DataManager.SelfUser.diamo) local btn_joinroom = self._view:GetChild("btn_joinroom") + btn_joinroom.touchable = false btn_joinroom.onClick:Add(handler(self, self.OnJoinRoomAction)) - --btn_joinroom.displayObject.gameObject:SetActive(false) local createRoomBtn = self._view:GetChild("btn_ChuangJian") - --createRoomBtn.touchable = false + createRoomBtn.touchable = false createRoomBtn.onClick:Set(function() local _createRoomView = CreateRoomView.new(1) _createRoomView.onCeateRoom = function() @@ -91,84 +65,25 @@ function M:InitView(url) _createRoomView:Show() end) - - local btn_agent = self._view:GetChild("btn_agent") - --[[ btn_agent.onClick:Set(function() - local headView = HeadView.new(DataManager.SelfUser,true) - headView:Show() - end)--]] - btn_agent.displayObject.gameObject:SetActive(false) - - local btn_record = self._view:GetChild("btn_record") - btn_record.onClick:Add(handler(self, function() - local _rankView = RankView.new(self, true) - _rankView:Show() - end)) - --btn_record.displayObject.gameObject:SetActive(false) - - local btn_video = self._view:GetChild("btn_video") - --[[btn_video.onClick:Set(function () - local _rankView = RankView.new(self,true) - _rankView:Show() - end)--]] - btn_video.displayObject.gameObject:SetActive(false) - local btn_setting = self._view:GetChild("btn_setting") btn_setting.onClick:Set(handler(self, function() local settingView = LobbySettingView.new() settingView:Show() end)) - local btn_exit = self._view:GetChild("btn_exit") - btn_exit.onClick:Set(handler(self, function() - local _curren_msg = MsgWindow.new(self._root_view, '确认退出游戏', MsgWindow.MsgMode.OkAndCancel) - _curren_msg.onOk:Add(function() - Application.Quit() - end) - _curren_msg:Show() - end)) - - local lst_userBG = self._view:GetChild("n118") - lst_userBG.displayObject.gameObject:SetActive(false) - local lst_user = self._view:GetChild("lst_user") - lst_user.displayObject.gameObject:SetActive(false) - --[[ lst_user.onClickItem:Set(function (context) - if context.data.name == "real" then - local real_view = RealAddressView.new(0) - real_view:Show() - elseif context.data.name == "address" then - local real_view = RealAddressView.new(1) - real_view:Show() - elseif context.data.name == "phone" then - local phone_view = PhoneBindView.new() - phone_view:Show() - end - end)--]] - -- self:__ShowShare() - - - local btn_notice = self._view:GetChild("btn_notice") - --[[ btn_notice.onClick:Set(function() - local noticeView = NoticeView.new(self._root_view) - noticeView:FillData(DataManager.SelfUser.notices.data) - noticeView:Show() - end) ---]] - btn_notice.displayObject.gameObject:SetActive(false) - - local btn_service = self._view:GetChild("btn_service") - --[[btn_service.onClick:Set(function() - self:__show_service() - end)--]] - btn_service.displayObject.gameObject:SetActive(false) - + -- local btn_exit = self._view:GetChild("btn_exit") + -- btn_exit.onClick:Set(handler(self, function() + -- local _curren_msg = MsgWindow.new(self._root_view, '确认退出游戏', MsgWindow.MsgMode.OkAndCancel) + -- _curren_msg.onOk:Add(function() + -- Application.Quit() + -- end) + -- _curren_msg:Show() + -- end)) self.groupMainView = GroupMainView.new(self._view:GetChild("group"), self._root_view, self._view) - --self.groupMainView:Show() local btn_more_group = self._view:GetChild("btn_more_group") btn_more_group.onClick:Set(function() - --self.groupMainView._view.visible = true ViewUtil.ShowModalWait(self._root_view, "请稍等,获取牌友圈中...") local enterGroupCallBackFunc = function(code) ViewUtil.CloseModalWait() @@ -176,82 +91,11 @@ function M:InitView(url) self.groupMainView._view.visible = true else Application.Quit() - -- ViewUtil.ErrorTip(-1, "code!" + code) - - printlog("获取圈子数据失败=======>>>>") end end self.groupMainView:Show(nil, enterGroupCallBackFunc) end) - -- local btn_more_group = self._view:GetChild("btn_more_group") - -- btn_more_group.touchable = true - -- btn_more_group.onClick:Set(function() - -- local groups = DataManager.groups.groupList - -- if #groups == 0 then - -- self.groupMainView._view.visible = true - -- self.groupMainView:Show() - -- -- if not DataManager.SelfUser.phone then - -- -- local phone_view = PhoneBindView.new() - -- -- phone_view:Show() - -- -- return - -- -- end - -- else - -- self.groupMainView:DEnterGroup() - -- end - -- --self.groupMainView:DEnterGroup() - - -- end) - - -- self.btn_joingroup.onClick:Set(function() - -- local groups = DataManager.groups.groupList - -- if #groups == 0 then - -- local jgv = JoinGroupView.new(self._root_view) - -- jgv:Show() - -- else - -- local info = GroupInfoView.new(groups[1], self.fg_info) - -- self._groupInfoView = info - -- info:SetCallBack(function() - -- self._groupInfoView = nil - -- self:Show() - -- self._view.visible = true - -- end) - -- info:Show() - -- self._view.visible = false - -- end - -- if not DataManager.SelfUser.phone then - -- --local phone_view = PhoneBindView.new() - -- --phone_view:Show() - -- -- return - -- end - -- end) - -- self.btn_joingroup.touchable = true - - - local lst_game = self._view:GetChild("lst_game") - lst_game.displayObject.gameObject:SetActive(false) - --[[local games = DataManager.SelfUser.games - for i = 1, math.min( 4,#games ) do - local tem = games[i] - local item = lst_game:AddItemFromPool() - item.text = tem.name - local config = ExtendManager.GetExtendConfig(tem.game_id) - config.game_data = tem - local mode = config:GetGameInfo() - item.icon = mode:GetIconUrl() - item.onClick:Set(function () - local _createRoomView = CreateRoomView.new(i) - _createRoomView.onCeateRoom = function () - ViewManager.ChangeView(ViewManager.View_Main,DataManager.CurrenRoom.game_id) - end - _createRoomView:Show() - end) - end--]] - - local message = self._view:GetChild("com_message") - --message.visible = true - self._message = message:GetChild("message") - self._tex_message = self._message:GetChild("tex_message") self:__GetMessage() end @@ -260,34 +104,28 @@ function M:OnJoinRoomAction(context) joinRoomView:Show() end -function M:__show_service() - local _buy_win = BaseWindow.new("ui://Lobby/Win_service", self._root_view) - _buy_win._close_destroy = true - _buy_win:Show() - local sview = _buy_win._view - local btn_copy = sview:GetChild("btn_copy") - btn_copy.onClick:Set(function() - GameApplication.Instance:CopyToClipboard("xbkf888108") --湘北 - -- GameApplication.Instance:CopyToClipboard("ttwmq008")--fb - _buy_win:Destroy() - end) -end function M:__GetMessage(data) - -- print("on GetMessage~~~~~~~~~~~~~~~~~~~~~~~~~~~") if not data or not data.notice_list then self._mesList = "" + local message = self._view:GetChild("Comp_Message") + message.visible = false else - local message = self._view:GetChild("com_message") + local message = self._view:GetChild("Comp_Message") message.visible = true + if not self._message then + self._message = message:GetChild('Lab_Message') + end + if not self._tex_message then + self._tex_message = self._message:GetChild('text') + end local mesl = {} for i = 1, #data.notice_list do mesl[i] = data.notice_list[i].informContent end self._mesList = mesl + self:__moveMsg(0) end - - self:__moveMsg(0) end function M:__PopMsg(index) @@ -300,7 +138,6 @@ function M:__PopMsg(index) end function M:__moveMsg(index) - -- print("on moveMsg!!!!!!!!!!!!!!!!!!!!!!!!!") if not self._tex_message then return end index, self._tex_message.text = self:__PopMsg(index) self._tex_message.x = self._message.width @@ -328,8 +165,6 @@ end function M:__ShowShare() local pop_share = self._view:GetChild("pop_share") local shareUrl = GetGameInfo("invite_link") .. "?uid=" .. DataManager.SelfUser.account_id - --print("shareUrl=================") - --print(shareUrl) local btn_wx_session = pop_share:GetChild("btn_wx_session") btn_wx_session.onClick:Add(function() shareQRCodePicture(shareUrl, 0) @@ -377,13 +212,6 @@ function M:Show() ViewUtil.PlaySoundBg() UpdateBeat:Add(self.OnUpdate, self) coroutine.start(self.GetUserIp, self) - if self.alldonhua then - if not coroutine.status(self.alldonhua) == "running" then - coroutine.resume(self.alldonhua) - end - else - self:InitClip() - end -- 如果在圈子内的房间,显示tip local user = DataManager.SelfUser local tem = user.notices @@ -441,15 +269,16 @@ function M:Show() --如果本地没有配置且设备没有绑定则弹窗提示 local fristLogin = PlayerPrefs.GetString("isLock_" .. DataManager.SelfUser.account_id) if #fristLogin == 0 and DataManager.SelfUser.is_lock == 0 then - local _curren_msg = MsgWindow.new(self._root_view, "当前用户没有锁定设备\n为了您的安全\n请点击确定锁定当前设备", MsgWindow.MsgMode.OnlyOk, nil, - nil, { openClose = true }) - _curren_msg.onOk:Add( - function() - local settingView = LobbySettingView.new() - settingView:Show() - end - ) - _curren_msg:Show() + local _curren_msg = MsgWindow.new(self._root_view, "当前用户没有锁定设备\n为了您的安全\n请点击确定锁定当前设备", MsgWindow.MsgMode.OnlyOk, + nil, + nil, { openClose = true }) + _curren_msg.onOk:Add( + function() + local settingView = LobbySettingView.new() + settingView:Show() + end + ) + _curren_msg:Show() end PlayerPrefs.SetString("isLock_" .. DataManager.SelfUser.account_id, DataManager.SelfUser.account_id) end @@ -514,58 +343,3 @@ function M:GetUserIp() end) end end - -function M:InitClip() - -- local taohuaEnd = 114 - -- local taohuaName = "ui://Lobby/taohua_00" - -- local taohua = self._view:GetChild('clip_bg') - -- local taohuaIndex = 0 - - local renwuEnd = 143 - local renwuName = "ui://Lobby/renwu-AE_00" - local renwu = self._view:GetChild('clip_renwu') - local renwuIndex = 0 - - local pukeEnd = 60 - local pukeName = "ui://Lobby/puke_00" - local puke = self._view:GetChild('btn_ChuangJian') - local pukeIndex = 0 - - -- local jiangbeiEnd = 180 - -- local jiangbeiName = "ui://Lobby/jiangbei_00" - -- local jiangbei = self._view:GetChild('btn_more_group') - -- local jiangbeiIndex = 0 - - local hechengEnd = 96 - local hechengName = "ui://Lobby/hecheng 1_00" - local hecheng = self._view:GetChild('btn_joinroom') - local hechengIndex = 0 - self.alldonhua = coroutine.start( - function() - while true do - -- taohuaIndex = self:ReplaceClip1(taohuaEnd, taohua, taohuaIndex, taohuaName) - renwuIndex = self:ReplaceClip1(renwuEnd, renwu, renwuIndex, renwuName) - pukeIndex = self:ReplaceClip2(pukeEnd, puke, pukeIndex, pukeName) - -- jiangbeiIndex = self:ReplaceClip2(jiangbeiEnd, jiangbei, jiangbeiIndex, jiangbeiName) - hechengIndex = self:ReplaceClip2(hechengEnd, hecheng, hechengIndex, hechengName) - coroutine.wait(0.001) - end - end - ) -end - -function M:ReplaceClip1(e, t, i, n) - if i > e then - i = 0 - end - t.url = string.format("%s%03d", n, i) - return i + 1 -end - -function M:ReplaceClip2(e, t, i, n) - if i > e then - i = 0 - end - t.icon = string.format("%s%03d", n, i) - return i + 1 -end diff --git a/lua_probject/base_project/Game/View/LoginView.lua b/lua_probject/base_project/Game/View/LoginView.lua index 40785f86..62b32364 100644 --- a/lua_probject/base_project/Game/View/LoginView.lua +++ b/lua_probject/base_project/Game/View/LoginView.lua @@ -28,8 +28,7 @@ function M:init() local view = self._view view:GetChild("tex_version").text = "Version:" .. GetGameInfoPlatform("version") - -- print(GameApplication.Instance.accountTest and 1 or 0) - view:GetController("test").selectedIndex = GameApplication.Instance.accountTest and 1 or 0 + -- view:GetController("test").selectedIndex = GameApplication.Instance.accountTest and 1 or 0 -- Utils.LoadBg("loginbg", view) if GameApplication.Instance.accountTest then diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua index a70fbc37..59e48e72 100644 --- a/lua_probject/base_project/Game/View/MainView.lua +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -235,6 +235,13 @@ function M:InitView(url, isHideIpAdds) self._gamectr:PlayerReady() end) + local btn_readyonly = _view:GetChild('btn_readyonly') + if btn_readyonly then + btn_readyonly.onClick:Set(function() + self._gamectr:PlayerReady() + end) + end + local btn_xipai = _view:GetChild('btn_xipai') if btn_xipai then btn_xipai.onClick:Set(function() @@ -244,9 +251,12 @@ function M:InitView(url, isHideIpAdds) local btn_start = _view:GetChild('btn_start') - btn_start.onClick:Set(function() - self._gamectr:StartGame() - end) + if btn_start then + btn_start.onClick:Set(function() + self._gamectr:StartGame() + end) + end + local _btn_wxyqhy = _view:GetChild('btn_wxyqhy') if _btn_wxyqhy then @@ -883,6 +893,8 @@ function M:MarkSelfTuoguan() self._com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan_self') local com_tuoguan = self._com_tuoguan GRoot.inst:AddChild(com_tuoguan) + self._com_tuoguan.height = GRoot.inst.height + self._com_tuoguan.width = GRoot.inst.width --com_tuoguan:Center() --com_tuoguan.y = GRoot.inst.height - com_tuoguan.height --com_tuoguan.x = (GRoot.inst.width - com_tuoguan.width) * 0.5 @@ -1005,6 +1017,8 @@ function M:OnUpdate() if result then else + printlog("game_error", resultInfo) + printlog("game_error_tra", debug.traceback()) self._gamectr = ControllerManager.GetController(GameController) if self._gamectr then self._gamectr:ResetConnect() diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua index aa55cec7..5b0b33af 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -228,7 +228,6 @@ local function __fillRoomItem(self, index, item, room) end play.isHidden = isHidden end - room_item.ctr_color.selectedIndex = play and play.deskId or room.color or 0 if not room.default then for i = 1, room.maxPlayers do @@ -243,17 +242,17 @@ local function __fillRoomItem(self, index, item, room) local p = plist[i] if isHidden == 0 then p_head.tex_name.text = ViewUtil.stringEllipsis(p.nick) - p_head.tex_id.text = "ID:" .. p.aid + -- p_head.tex_id.text = "ID:" .. p.aid ImageLoad.Load(p.portrait, btn_head._iconObject, self.class) if p.hp then local str1 = "积分:" local hp = p.hp / 100 - p_head.text_score.text = str1 .. hp + -- p_head.text_score.text = str1 .. hp end else p_head.tex_name.text = "智能" - p_head.tex_id.text = "防作弊" + -- p_head.tex_id.text = "防作弊" -- btn_head._iconObject.url = "ui://Common/hiddenHead" -- ImageLoad.Load("ui://Common/hiddenHead", btn_head._iconObject, self.class) end @@ -279,7 +278,7 @@ local function __fillRoomItem(self, index, item, room) end end -- desk.touchable = false - desk.onClick:Set( + item.onClick:Set( function() if room.default or self.curGroup.lev == 3 then -- 房间点击:假房间 匹配,真房间 加入 @@ -439,7 +438,7 @@ local function __fillRoomData(self) local curGroup = self.curGroup local lst_room = self.lst_room local currentPlayID = self:GetSelectedPlayID() - local currentGameID = self:GetSelectedGameID() + local currentGameID = 0 -- self.lst_layer.visible = currentGameID > 0 --self.line1.visible = currentGameID > 0 @@ -753,42 +752,8 @@ end local function __fillPlayItem(self, index, item) local tex_gameName = item:GetChild('tex_gameName') local tex_playName = item:GetChild('tex_playName') - local pipeijoin = item:GetChild('pipeijoin') - - -- if (index == 0) then - -- -- tex_gameName.text = __getLayerName(self, 0) - -- item:GetController('all').selectedIndex = 1 - -- item.data = "" - -- else - -- item:GetController('all').selectedIndex = 0 - pipeijoin.onClick:Add( - function() - local currentPlayID = self:GetSelectedPlayID() - if currentPlayID == 0 then - if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then - local pid = self.fg_info[tostring(self.curGroup.id)] - if pid == 0 then - ViewUtil.ErrorTip(nil, '没有选择玩法') - return - end - local p_data = self.curGroup:getPlay(pid) - local currentGameID = self:GetSelectedGameID() - if currentGameID == p_data.gameId then - currentPlayID = pid - end - end - if currentPlayID == 0 then - ViewUtil.ErrorTip(nil, '没有选择玩法') - return - end - end - - self:__startGame("", currentPlayID, false) - end - ) tex_playName.text, tex_gameName.text = __getLayerName(self, self.playIdList[index + 1]) item.data = tex_playName.text - -- end end local _iconMap = {} @@ -897,7 +862,7 @@ local function __analysePlayListData(self) local count = 0 local curGroup = self.curGroup - local gameid = self:GetSelectedGameID() + local gameid = 0 for i = 1, #curGroup.playList do local p_data = curGroup.playList[i] local isvip = 0 @@ -963,20 +928,6 @@ local function __analyseGameListData(self) end end end - - self.lst_game.numItems = #self.gameIdList + 1 -end - -function M:GetSelectedGameID() - if self.lst_game.selectedIndex == -1 or self.lst_game.selectedIndex == 0 then - return 0 - else - if self.lst_game.selectedIndex <= #self.gameIdList then - return self.gameIdList[self.lst_game.selectedIndex] - else - return 0 - end - end end function M:GetSelectedPlayID() @@ -1099,41 +1050,11 @@ function M:InitView(url) self._view:GetController('alliance').selectedIndex = self.curGroup.type == 2 and 1 or 0 self.ctr_newmail = self._view:GetController('new_mail') - self.lst_game = self._view:GetChild('game_list') - self.lst_game:SetVirtual() - self.lst_game.itemRenderer = function(index, item) - __fillGameItem(self, index, item) - end - -- local btn_remit = self._view:GetChild('btn_remit') - -- btn_remit.visible = false - - self.lst_game.onClickItem:Add( - function(pas) - if self.currentSelectItem == pas.data then return end - local name = pas.data.icon - self.currentSelectItem = pas.data - self.currentGameItemName = name - self.lst_layer.selectedIndex = 0 - self:__refreshPay() - __analyseGameListData(self) - __analysePlayListData(self) - __fillRoomData(self) - end - ) - -- self.line1 = self._view:GetChild('line1') - --self.line1.visible = false self.lst_layer = self._view:GetChild('lst_layer') self.lst_layer:SetVirtual() self.lst_layer.itemRenderer = function(index, item) __fillPlayItem(self, index, item) - --if index>0 then - -- __fillPlayItem(self, index, item) - --else - -- item.width = 0 - -- item.height = 0 - -- item.visible = false - -- end end local btn_allGame = self._view:GetChild('btn_allGame') @@ -1173,15 +1094,6 @@ function M:InitView(url) end ) - local btn_quanbu = self._view:GetChild('btn_quanbu') - btn_quanbu.onClick:Set( - function() - self.lst_layer.selectedIndex = 0 - self:__loadPlayData() - end - ) - - self.roomItems = {} self.lst_room = self._view:GetChild('lst_room') self.lst_room:SetVirtual() @@ -1203,38 +1115,6 @@ function M:InitView(url) end self.lst_room.fairyBatching = true - -- 全部玩法的快速开始按钮 - local btn_start = self._view:GetChild('btn_start') - btn_start.onClick:Set( - function() - local pid = self.fg_info[tostring(self.curGroup.id)] - - if pid == 0 then - ViewUtil.ErrorTip(nil, '没有选择玩法!') - return - end - self:__startGame("", pid, false) - end - ) - - local goselectgames = self._view:GetChild('goselectgames') - goselectgames.onClick:Set( - function() - local gfg = GroupFastGamesView.new(self.curGroup.id, self._root_view, self.curGroup.playList, - DataManager.SelfUser.account_id) - - gfg:SetCallback( - function() - local showid = Utils.LoadLocalFile("selectplay" .. DataManager.SelfUser.account_id) - local gamename = Utils.LoadLocalFile("selectplayname" .. DataManager.SelfUser.account_id) - self._view:GetChild('btn_start2').text = gamename - self._view:GetChild('btn_start2'):GetController('isChoose').selectedIndex = 0 - self:__startGame("", tonumber(showid), false) - end - ) - gfg:Show() - end) - -- 快速开始按钮 local btn_start2 = self._view:GetChild('btn_start2') btn_start2.visible = true @@ -1266,14 +1146,14 @@ function M:InitView(url) return end - if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then + if self.lst_layer.selectedIndex == 0 then local pid = self.fg_info[tostring(self.curGroup.id)] if pid == 0 then ViewUtil.ErrorTip(nil, '没有选择玩法1') return end local p_data = self.curGroup:getPlay(pid) - local currentGameID = self:GetSelectedGameID() + local currentGameID = 0 if currentGameID == p_data.gameId then currentPlayID = pid end @@ -1310,50 +1190,6 @@ function M:InitView(url) self._view:GetChild('btn_start2').text = gamename end - -- 选择玩法按钮 - local btn_choose = self._view:GetChild('btn_choose') - btn_choose.onClick:Set( - function() - self.lstgameVisible = not self.lstgameVisible - if (self.lstgameVisible) then - self.lst_game:TweenMove(Vector2.New(3, 100), 0.3) - else - self.lst_game:TweenMove(Vector2.New(3, 760), 0.3) - end - end - -- function() - -- local sgv = - -- GroupSetDefaultGameView.new( - -- self.curGroup.id, - -- self._root_view, - -- function(num) - -- if num == 0 then - -- return - -- end - -- local pid = 0 - -- pid = self.curGroup.playList[num].id - -- btn_choose:GetChild('tex_gamename').text = __getLayerName(self, pid) - -- btn_choose:GetController('null').selectedIndex = 0 - -- local key = tostring(self.curGroup.id) - -- self.fg_info[key] = pid - -- local filename = 'fginfo_' .. DataManager.SelfUser.account_id - -- Utils.SaveLocalFile(filename, json.encode(self.fg_info)) - -- end - -- ) - -- local tem = self.fg_info[tostring(self.curGroup.id)] - -- local play_index = self.curGroup:getPlayIndex(tem) - -- if play_index == -1 then - -- play_index = 1 - -- end - - -- local setCallBackFunc=function() - -- __analysePlayListData(self) - -- end - -- sgv:FillData(self.curGroup.playList, play_index,setCallBackFunc) - -- sgv:Show() - -- end - ) - local btn_close = self._view:GetChild('btn_close') btn_close.onClick:Set( function() @@ -1465,7 +1301,6 @@ function M:__loadLastData() self.playNames[t.id] = t.name end table.sort(self.playIdList, handler(self, self.SortPlayList)) - self.lst_game.numItems = #self.gameIdList + 1 self.lst_layer.visible = false --self.line1.visible = false self.lst_layer.numItems = #self.playIdList + 1 @@ -2076,7 +1911,7 @@ end function M:_evtUpdateMsg() local joins = self.curGroup.joins - self._view:GetChild('btn_msg'):GetController('tip').selectedIndex = joins > 0 and 1 or 0 + -- self._view:GetChild('btn_msg'):GetController('tip').selectedIndex = joins > 0 and 1 or 0 if joins > 0 and self.curGroup.apply == 0 then local msg = '有玩家申请加入您的大联盟,请尽快处理' local msg_view = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OnlyOk) @@ -2168,17 +2003,6 @@ function M:__refreshManager() gl_view:Show() -- self:SetRoomListVisible(false) end) - local btn_fginfo = self._view:GetChild('btn_fginfo') - btn_fginfo.onClick:Set( - function() - local m = {} - m.uid = DataManager.SelfUser.account_id - m.portrait = DataManager.SelfUser.head_url - m.nick = DataManager.SelfUser.nick_name - local mflv = GroupMemberFagLogView.new(self.curGroup.id, m, true) - mflv:Show() - end - ) end function M:OnclickMember() @@ -2194,9 +2018,9 @@ function M:__ShowNotice() local str_notice = group.notice local empty_notice = not str_notice or str_notice == '' local com_notice = self._view:GetChild('com_notice') - local com_message = com_notice:GetChild('message') + local com_message = com_notice:GetChild('Lab_Message') com_notice.visible = not empty_notice - local tex_notice = com_message:GetChild('tex_message') + local tex_notice = com_message:GetChild('title') tex_notice.text = str_notice local speed_x = 100 local start_x = com_message.width + 100 @@ -2296,7 +2120,6 @@ function M:__loadGroupData() __analysePlayListData(self) -- self.lst_layer.selectedIndex = 0 - self.lst_game.selectedIndex = 0 self._view:GetController('all').selectedIndex = 1 @@ -2307,16 +2130,16 @@ function M:__loadGroupData() self:__ShowNotice() curGroup.update_room = false - local btn_msg = self._view:GetChild('btn_msg') - btn_msg.onClick:Set( - function() - -- if not self.mng_view1 then - self.mng_view1 = GroupManagerView.new(self._root_view, self.curGroup.id, 1) - -- end - self.mng_view1:Show(5) - -- self:SetRoomListVisible(false) - end - ) + -- local btn_msg = self._view:GetChild('btn_msg') + -- btn_msg.onClick:Set( + -- function() + -- -- if not self.mng_view1 then + -- self.mng_view1 = GroupManagerView.new(self._root_view, self.curGroup.id, 1) + -- -- end + -- self.mng_view1:Show(5) + -- -- self:SetRoomListVisible(false) + -- end + -- ) local btn_invite = self._view:GetChild('btn_invite') -- btn_invite.displayObject.gameObject:SetActive(false) ---[[ @@ -2484,7 +2307,7 @@ function M:__refreshPay() local currentPlayID = self:GetSelectedPlayID() - local currentGameID = self:GetSelectedGameID() + local currentGameID = 0 if currentPlayID > 0 then --self._view:GetChild("tex_name").text = __getLayerName(self,currentPlayID) diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua index 81fe312f..28cd53b4 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua @@ -82,13 +82,13 @@ function M:OnRenderItem(index, obj) local str_lev = data.lev == 3 and "合伙人" or "管理员" local act = hp >= 0 and "给您增加了" or "扣除了您" tex_title.text = "消息内容为:" --string.format("%s(%s) %s%s积分", nick, id, act, math.abs(hp)) - tex_content.text = string.format("%s [color=#08a446]%s[/color](%s) %s[color=#08a446] %s [/color]积分", str_lev, + tex_content.text = string.format("%s [color=#35AF1D]%s[/color](%s) %s[color=#35AF1D] %s [/color]积分", str_lev, nick, id, act, math.abs(hp)) else tex_title.text = "消息内容为:" --string.format("%s(%s) 转账给您%s积分", nick, id, math.abs(hp)) - tex_content.text = string.format("[color=#08a446]%s[/color](%s) 转账给您[color=#08a446] %s [/color]积分", nick, id, + tex_content.text = string.format("[color=#35AF1D]%s[/color](%s) 转账给您[color=#35AF1D] %s [/color]积分", nick, id, math.abs(hp)) - end + end obj:GetChild("tex_data").text = os.date("%Y-%m-%d %H:%M", data.time) end diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua index 29bf0abc..9293f9dd 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua @@ -52,60 +52,6 @@ function M:InitView(url) end) end) - self.btn_joingroup = self._par_veiw:GetChild('btn_join_group') - self.btn_joingroup.displayObject.gameObject:SetActive(false) - --[[self.btn_joingroup.onClick:Set(function() - local groups = DataManager.groups.groupList - if #groups == 0 then - local jgv = JoinGroupView.new(self._root_view) - jgv:Show() - else - local info = GroupInfoView.new(groups[1], self.fg_info) - self._groupInfoView = info - info:SetCallBack(function() - self._groupInfoView = nil - self:Show() - self._view.visible = true - end) - info:Show() - self._view.visible = false - end - if not DataManager.SelfUser.phone then - --local phone_view = PhoneBindView.new() - --phone_view:Show() - -- return - end - end)--]] - - -- local btn_setting = self._view:GetChild('btn_setting') - -- btn_setting.onClick:Set( - -- function() - -- local gsv = GroupSettingView.new(self._root_view) - -- gsv:FillData() - -- gsv:SetCallback( - -- function() - -- self:FillData() - -- end - -- ) - -- gsv:Show() - -- end - -- ) - - local btn_refresh = self._view:GetChild('btn_refresh') - btn_refresh.onClick:Set(function() - ViewUtil.ShowModalWait(self._root_view) - fgCtr:FG_GroupList(function(res) - ViewUtil.CloseModalWait() - if self._is_destroy then - return - end - if res.ReturnCode == 0 then - -- self:__fillTopGroups(res.Data.groups,res.Data.stickGroups) - self:FillData(res.Data.groups) - end - end) - end) - local lst_group = self._view:GetChild('lst_group') lst_group.onClickItem:Add(function(context) local curGroup = context.data.data @@ -164,22 +110,6 @@ function M:__fill_item(item, group) item:GetChild('tex_name').text = group.name item:GetChild('tex_id').text = "ID:" .. group.id local p_num = group.total_member_num - item:GetChild('tex_p_num').text = p_num > 99 and '99+' or p_num - - if group.lev < 3 then - if group.lev == 1 then - item:GetChild('tex_room_num').text = group.room_num - else - item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num - end - else - if group.show_num > 0 and group.room_num > group.show_num then - item:GetChild('tex_room_num').text = group.show_num > 99 and '99+' or group.show_num --group.show_num - else - item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num - end - end - local btn_head = item:GetChild('btn_head') btn_head.icon = 'ui://Common/Head0' ImageLoad.Load(group.o_portrait, btn_head._iconObject, self.class) @@ -217,13 +147,10 @@ function M:FillData() local ctr_empty_group = self._view:GetController('empty_group') if #groups == 0 then - self.btn_joingroup:GetController("info").selectedIndex = 0 ctr_empty_group.selectedIndex = 1 return else - self.btn_joingroup:GetController("info").selectedIndex = 1 ctr_empty_group.selectedIndex = 0 - self:__fill_item(self.btn_joingroup, groups[1]) end local lst_group = self._view:GetChild('lst_group') @@ -234,28 +161,6 @@ function M:FillData() local item = lst_group:AddItemFromPool() item.data = group self:__fill_item(item, group) - - local btn_top = item:GetChild('btn_top') - local ctr_select = btn_top:GetController('select') - ctr_select.selectedIndex = group.top_time > 0 and 1 or 0 - -- item:GetController('select_index').selectedIndex = group.top_time > 0 and 1 or 0 - btn_top.onClick:Set(function(context) - context:StopPropagation() - local fgCtr = ControllerManager.GetController(NewGroupController) - ViewUtil.ShowModalWait(self._root_view) - fgCtr:FG_TopGroup(group.id, ctr_select.selectedIndex == 0, function(res) - ViewUtil.CloseModalWait() - if self._is_destroy then - return - end - if res.ReturnCode == 0 then - ctr_select.selectedIndex = group.top_time > 0 and 1 or 0 - self:FillData() - else - ViewUtil.ErrorTip(res.ReturnCode, '置顶大联盟失败!') - end - end) - end) end -- end end diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua index 63bb9363..c40a0779 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua @@ -33,7 +33,7 @@ function M:InitInfo() obj.data.selected = true ViewUtil.ShowModalWait(true, "正在获取成员中", 0.01) self:RecursionGetNumber1(0, DataManager.SelfUser.account_id, {}) - --将外面设置为最外圈页面 + --将外面设置为最外圈页面20.536 self.ctr_index.selectedIndex = #self.page_config self._data_selectedData = obj end @@ -54,6 +54,8 @@ end function M:PartnerRender(data, obj) obj:GetChild('text_name').text = string.format("%d", data.uid) obj:GetChild('text_id').text = data.nick + obj:GetChild('text_name1').text = string.format("%d", data.uid) + obj:GetChild('text_id1').text = data.nick obj:GetChild('text_lev').text = data.partnerLev and data.partnerLev + 1 or 1 obj:GetController('show').selectedIndex = data.partnerLev and 1 or 0 obj:GetController('isLine').selectedIndex = 1 @@ -61,7 +63,7 @@ function M:PartnerRender(data, obj) obj.data.list = obj:GetChild('list') obj.data.info = data self._map_members[data.uid] = obj - obj:GetChild('area').onClick:Set(function() + obj.onClick:Set(function() if obj.data.info.uid == DataManager.SelfUser.account_id then if obj.data.info.uid ~= self._data_selectedData.data.info.uid then self:RecursionReSize(self._data_selectedData, -1, true, obj.data.info.uid) @@ -137,8 +139,7 @@ function M:RecursionSetScrollPannel(obj, scrollIndex) local father = self._map_members[obj.data.info.parentId] self:RecursionSetScrollPannel(father, scrollIndex + father.data.list:GetChildIndex(obj) + 1) else - print("lingmeng RecursionSetScrollPannel", scrollIndex, self._viewList_partner.scrollPane.posY, scrollIndex * 85) - self._viewList_partner.scrollPane:SetPosY(scrollIndex * 85, true) + self._viewList_partner.scrollPane:SetPosY(scrollIndex * 115, true) end end diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua index 7171e66b..bdeb3b24 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua @@ -1,13 +1,12 @@ - -local TimeSettingPanel = import(".TimeSettingPanel") +local TimeSettingPanel = import(".TimeSettingPanelTog") local GroupBankLogView = {} local M = GroupBankLogView -function GroupBankLogView.new(blur_view,group_id,uid) - setmetatable(M, {__index = BaseWindow}) - local self = setmetatable({}, {__index = M}) +function GroupBankLogView.new(blur_view, group_id, uid) + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) self.class = "GroupBankLogView" self._close_destroy = true self.uid = uid @@ -18,18 +17,24 @@ function GroupBankLogView.new(blur_view,group_id,uid) end function M:init(url) - BaseWindow.init(self,url) + BaseWindow.init(self, url) + local group = DataManager.groups:get(self.group_id) + self.take_log = {} self.lst_log = self._view:GetChild("lst_log") - self.lst_log:SetVirtual() + self.lst_log:SetVirtual() self.lst_log.itemRenderer = function(index, obj) self:OnRenderItem(index, obj) - end + end self.lst_log.scrollPane.onPullUpRelease:Set(function() self:getTakeLog(self.lst_log.numItems) end) - self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), + -308, 0, function() + self.take_log = {} + self:getTakeLog(0) + end, { showDay = group.lev < 3 and 30 or 7 }) self._view:GetChild("btn_search").onClick:Set(function() self.take_log = {} self:getTakeLog(0) @@ -41,8 +46,8 @@ end function M:getTakeLog(index) local begin_time, end_time = self.time_panel:GetDate() local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_GetBankLog(self.group_id, index, 6, begin_time, end_time, self.uid,function(res) - if res.ReturnCode ~= 0 then + fgCtr:FG_GetBankLog(self.group_id, index, 6, begin_time, end_time, self.uid, function(res) + if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "获取提取详情失败") else local hp_logs = res.Data.hp_logs @@ -64,4 +69,4 @@ function M:OnRenderItem(index, obj) obj:GetChild("tex_data").text = os.date("%Y-%m-%d\r%H:%M", data.time) end -return M \ No newline at end of file +return M diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua index 2517aace..29065fba 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua @@ -238,9 +238,6 @@ end -- 填充体力值详情对象 function M:OnRenderItem(index, obj) local data = self.hp_log[index + 1] - -- print("lingmeng render", self.group_id, data.pid, DataManager.groups:get(self.group_id), - -- DataManager.groups:get(self.group_id):getPlay(data.pid)) - -- pt(DataManager.groups:get(self.group_id).playList) local play = DataManager.groups:get(self.group_id):getPlay(data.pid) obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(self.member.nick) obj:GetChild("tex_id").text = string.format("ID:%s", ViewUtil.stringEllipsis(self.member.uid)) @@ -260,13 +257,13 @@ function M:OnRenderItem(index, obj) if data.reason ~= 15 or not data.detail then btn_check.selected = false obj:GetController("c1").selectedIndex = 0 - obj.height = 94 + -- obj.height = 94 end btn_check.onClick:Set(function() local lst = obj:GetChild("lst") lst:RemoveChildrenToPool() if not btn_check.selected then - obj.height = 94 + -- obj.height = 94 self.lst_fag:RefreshVirtualList() return end diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua index ef929d36..cfe5dd18 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua @@ -278,7 +278,7 @@ function M:init(url) local btn_disbing = lst_mng:AddItemFromPool() btn_disbing.icon = "ui://NewGroup/mng_disbing" btn_disbing.onClick:Set(function() - local msg_tip = MsgWindow.new(self._root_view, string.format("是否要取消用户【%s(%d)】?",member.nick,member.uid), MsgWindow.MsgMode.OnlyOk) + local msg_tip = MsgWindow.new(self._root_view, string.format("是否要取消用户【%s(%d)】?",member.nick,member.uid), MsgWindow.MsgMode.OkAndCancel) msg_tip.onOk:Add(function(...) ViewUtil.ShowModalWait() fgCtr:FG_Reset_Lock(self.group_id, member.uid,0, function(res) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua index 3d963cb4..57114635 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberHpListView.lua @@ -69,24 +69,12 @@ end function M:FillView() BaseWindow.init(self, 'ui://NewGroup/View_GroupMemberHpList') - local rtype = self._view:GetChild("n132") - rtype.visible = false - rtype.onChanged:Set(function() - if tostring(self.online) == rtype.value then - return - end - self.online = tonumber(rtype.value) - self:GetMemberData(0) - --printlog("aaaaaaaa222222222222222222222222222222") - end) + local btn_refren = self._view:GetChild("btn_refren") - local rtype = self._view:GetChild("n136") - - rtype.onClick:Set(function() + btn_refren.onClick:Set(function() self:GetMemberData(0) self._ctr_search.selectedIndex = 0 - --printlog("aaaaaaaa222222222222222222222222222222") end) -- 初始化成员列表 @@ -95,12 +83,6 @@ function M:FillView() self.lst_member.itemRenderer = function(index, obj) self:OnRenderItem(index, obj) end - -- self.lst_member.scrollPane.onPullUpRelease:Set( - -- function() - -- --printlog("aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb ",self.lst_member.numItems) - -- self:GetMemberData(self.lst_member.numItems) - -- end - -- ) -- 初始化搜索成员列表 self.lst_member_find = self._view:GetChild('lst_member_find') @@ -109,10 +91,6 @@ function M:FillView() self:OnRenderItemFind(index, obj) end - --local n50=self._view:GetChild('n50') - --print(n50) - --n50.displayObject.gameObject.transform.localPosition.x=214 - --print(n50.displayObject.gameObject.transform.localPosition.x) -- 搜索玩家 self._ctr_search = self._view:GetController('search') self._view:GetChild('btn_search').onClick:Set( @@ -332,50 +310,8 @@ function M:FillItem(obj, member, refresh, index) tex_fag.text = d2ad(member.hp) obj:GetChild('tex_id').text = '' .. member.uid - --obj:GetChild("tex_cost_count").text = d2ad(member.last_hp_cost) - - --if member.online == 1 then - -- obj:GetChild('tex_last_login').text = '在线' - -- else - if member.last_time ~= 0 then - -- local now_time = os.date("*t",now) - -- local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) - -- local cha = math.ceil((today - member.last_time) / (24 * 60 *60)) - -- if (cha > 0) then - -- obj:GetChild('tex_last_login').text = cha.."天前" --'最近登录\n' .. os.date('%Y/%m/%d', member.last_time) - -- else - -- obj:GetChild('tex_last_login').text = os.date('%Y/%m/%d', member.last_time) - -- end - --print("11111aaaaaaaaaaaaaaaaaaaa ",os.date('%Y/%m/%d', member.last_time)) - obj:GetChild('tex_last_login').text = "最近登录:" .. os.date('%Y/%m/%d', member.last_time) - else - obj:GetChild('tex_last_login').text = '加入时间\n' .. os.date('%Y/%m/%d', member.join_time) - end - -- end - - - obj:GetChild('tex_zongchangci').text = member.parentId - -- obj:GetChild('tex_pername').text = member.parentId_nick or "" - obj:GetChild('tex_ruhui').text = os.date('%Y/%m/%d %H:%M:%S', member.join_time) - - --上级 - obj:GetChild('tex_shangjiName').text = member.parentId_nick or "" - if member.parentId == 0 then - obj:GetChild('tex_shangjiID').text = "" - else - obj:GetChild('tex_shangjiID').text = member.parentId - end - local perm_array = MngPermission.getPermData(group.permission) - -- 体力值操作按钮事件 - if group.lev < 3 or member.parentId == DataManager.SelfUser.account_id then - obj:GetController('fag').selectedIndex = 1 - else - obj:GetController('fag').selectedIndex = 0 - end - - --obj:GetChild("btn_tag").title = member.score local fgCtr = ControllerManager.GetController(NewGroupController) local p = group:getMember(member.uid) @@ -446,56 +382,7 @@ function M:FillItem(obj, member, refresh, index) end ) - obj:GetChild('btn_operate').onClick:Set( - function() - local mflv = - GroupMemberOperateView.new( - self.group_id, - member, - function(delete) - if delete ~= nil and delete == true then - local group = DataManager.groups:get(self.group_id) - self.member_data = group.members - self.lst_member.numItems = self:GetChildNumForPage() - self._view:GetController('search').selectedIndex = 0 - else - self.lst_member.numItems = self:GetChildNumForPage() - if refresh then - self:FillItem(obj, member) - end - end - end, - function() - self:GetMemberData(0) - end - ) - mflv:Show() - end - ) - - local btnBxx = obj:GetChild('btn_bxx') - btnBxx.visible = (not (member.lev == 3 and member.partnerLev == 0)) and - not (DataManager.SelfUser.account_id == member.uid) - --btnBxx.visible = not (DataManager.SelfUser.account_id == member.uid) - obj:GetChild('btn_bxx').onClick:Set( - function() - local ctrNum = 1 - -- if not (member.lev == 3 and member.partnerLev == 0) then - -- ctrNum = 2 - -- end - ctrNum = 2 - local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view, ctrNum, member.uid) - gmv:SetCallback( - function() - btnBxx.selected = false - end - ) - gmv:Show() - end - ) - local superBtn = obj:GetChild('super_btn') - -- superBtn.visible = group.lev == 1 local superBtnUp = obj:GetChild('superior_btn_up') obj:GetChild("superior_btn_up").onClick:Set( function() @@ -536,23 +423,6 @@ function M:FillItem(obj, member, refresh, index) self:RecursionGetSubNumber(fgCtr, 0, text, {}) end ) - obj:GetController('all').selectedIndex = 0 - obj:GetChild("all_btn").onClick:Set( - function() - ViewUtil.ShowModalWait(self._root_view) - local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_GetTotalHp(self.group_id, member.uid, function(res) - ViewUtil.CloseModalWait() - if res.ReturnCode == 0 then - local hp = d2ad(res.Data.hp) - obj:GetChild("tex_all").text = hp - obj:GetController('all').selectedIndex = 1 - else - ViewUtil.ErrorTip(res.ReturnCode, "目标没有总线值") - end - end) - end - ) end function M:RecursionGetSubNumber(fgCtr, index, uid, tempTable) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua index e9e714c2..034f05a3 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua @@ -62,18 +62,6 @@ end function M:FillView() self._view = UIPackage.CreateObjectFromURL('ui://NewGroup/View_GroupMemberList1') - local rtype = self._view:GetChild("n132") - rtype.visible = false - - rtype.onChanged:Set(function() - if tostring(self.online) == rtype.value then - return - end - self.online = tonumber(rtype.value) - self:GetMemberData(0) - --printlog("aaaaaaaa222222222222222222222222222222") - end) - -- 初始化成员列表 self.lst_member = self._view:GetChild('lst_member') self.lst_member:SetVirtual() diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua index 595cc2b9..3dfa9f51 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone2.lua @@ -241,19 +241,15 @@ end function M:ListRenderer(index, obj) local tempLev, tempIndex = self:RecursionGetIndex(index + 1, 1) local dataInfo = self._data_record[tempLev][tempIndex] - local nameStr = ViewUtil.stringEllipsis(dataInfo.nick) + local nameStr = ViewUtil.stringEllipsis(dataInfo.nick or "") if dataInfo.hpall and dataInfo.hpall.total_member and (dataInfo.partnerLev ~= 0 or dataInfo.lev == 1) then nameStr = string.format("%s(%d)", nameStr, dataInfo.hpall.total_member - 1) end obj:GetChild("tex_name").text = nameStr obj:GetChild("tex_id").text = "ID:" .. dataInfo.uid local tex_total_score = obj:GetChild("tex_total_score") - local ctr_show_total = obj:GetController("show_total") if dataInfo.hpall then tex_total_score.text = d2ad(dataInfo.hpall.hp) - ctr_show_total.selectedIndex = 1 - else - ctr_show_total.selectedIndex = 0 end obj:GetChild("tex_round_valid").text = d2ad((dataInfo.reward_tongji or dataInfo.reward_hp) + dataInfo .total_win) --d2ad(data.reward_hp) --data.valid_round / 100 @@ -277,34 +273,6 @@ function M:ListRenderer(index, obj) self:MoreChanged(context, { lev = tempLev, index = tempIndex }) end) - local btn_check_members = obj:GetChild("btn_check_members") - btn_check_members.visible = not dataInfo.partnerLev or dataInfo.partnerLev > 0 - btn_check_members.onClick:Set(function() - ViewUtil.ShowModalWait(self._root_view) - local fgCtr = ControllerManager.GetController(NewGroupController) - if dataInfo.uid == DataManager.SelfUser.account_id then - fgCtr:FG_GetMembersCount(self.group_id, function(res) - ViewUtil.CloseModalWait() - if res.ReturnCode == 0 then - tex_total_score.text = d2ad(res.Data.hp_num1 + res.Data.otherHp) - ctr_show_total.selectedIndex = 1 - else - ViewUtil.ErrorTip(res.ReturnCode, "目标没有总线值") - end - end) - else - fgCtr:FG_GetTotalHp(self.group_id, dataInfo.uid, function(res) - ViewUtil.CloseModalWait() - if res.ReturnCode == 0 then - local hp = d2ad(res.Data.hp) - tex_total_score.text = hp - dataInfo._total_hp = hp - ctr_show_total.selectedIndex = 1 - end - end) - end - end) - obj:GetChild('btn_super').visible = not dataInfo.partnerLev or dataInfo.partnerLev > 0 obj:GetChild('btn_super').onClick:Set(function() local myInfo = self._data_record[tempLev][tempIndex] diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua index 88f8fd9d..418f115c 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua @@ -99,7 +99,7 @@ function M:GetRewardsData() end end) msg_win:Show() - end, 3) + end, 1) gfiv:Show() end) end @@ -175,7 +175,7 @@ function M:OnRenderRewardsItem(index, obj) d2ad(data.max_value) - d2ad(data.cur_value)) end end) - end, 3) + end, 1) gfiv:Show() end) obj:GetChild("btn_set_all").onClick:Set(function() @@ -236,7 +236,7 @@ function M:OnRenderRewardsItem(index, obj) group.lev < 3, data.xipai_rewardValueType or 1) end end) - end, 3) + end, 1) gfiv:Show() end) @@ -300,7 +300,7 @@ function M:OnRenderRewardsItem(index, obj) data.anchou_max_value, group.lev < 3, data.anchou_rewardValueType or 1) end end) - end, 3) + end, 1) gfiv:Show() end) diff --git a/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua index 04879a1b..4085a931 100644 --- a/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua +++ b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua @@ -19,8 +19,6 @@ function M:init(max) self.tex_gamename = item:GetChild("tex_gamename") self.tex_roomid = item:GetChild("tex_roomid") self.btn_set = item:GetChild("btn_set") - self.desk = item:GetChild("desk") - self.ctr_color = self.desk:GetController("color") self.tex_limit = item:GetChild("tex_limit") self.btn_detail = item:GetChild("btn_detail") --self.btn_detail.visible = false @@ -37,14 +35,14 @@ function M:init(max) for i=1,max do --printlog("==================================",i) - local p_item = self.desk:GetChild("head"..i) + local p_item = item:GetChild("head"..i) local btn_head = p_item:GetChild("btn_head") self.def_icon = btn_head._iconObject.texture local tex_name = p_item:GetChild("tex_name") local tex_id = p_item:GetChild("tex_id") --tex_id.visible = self.ishow - local text_score=p_item:GetChild("tex_score") - text_score.visible = false + -- local text_score=p_item:GetChild("tex_score") + -- text_score.visible = false self.heads[i] = {p_item = p_item,btn_head = btn_head,tex_name = tex_name,tex_id = tex_id,text_score=text_score} end @@ -53,9 +51,6 @@ end function M:SetPlay(play) self.play = play - -- if play.gameId == 203 then - -- self.desk.touchable = false - -- end end function M:ShowDetails(play) diff --git a/lua_probject/base_project/Game/View/PlayerInfoView2.lua b/lua_probject/base_project/Game/View/PlayerInfoView2.lua new file mode 100644 index 00000000..65a67f18 --- /dev/null +++ b/lua_probject/base_project/Game/View/PlayerInfoView2.lua @@ -0,0 +1,440 @@ + +local PlayerInfoView = { + _view = nil, + _main_view = nil, + _tex_player_name = nil, + _tex_player_id = nil, + _tex_score = nil, + _ctr_offline = nil, + _ctr_bank = nil, + _ctr_room_owner = nil, + _ctr_mask_voice = nil, + _btn_head = nil, + _biaoqing = nil, + _chat = nil, + _player = nil, + __runwait_voice = nil, + _isHideIpAdds = false +} + +local M = PlayerInfoView + +function M.new(view, main_view, isHideIpAdds) + local self = {} + setmetatable(self, { __index = PlayerInfoView }) + self._view = view + self._main_view = main_view + self._isHideIpAdds = isHideIpAdds + self.isShowTGTimer = false + self.currentTime = 0 + self.totalTime = 0 + --self.isShow = fasle + self:init() + return self +end + +function M:init(flag_witness) + local view = self._view + self.flag_witness = flag_witness + UIPackage.AddPackage('base/chat/ui/Chat') + self._tex_player_name = view:GetChild('name') + -- self._tex_score = view:GetChild('text_jifen') + + self._biaoqing = view:GetChild('face') + self._chat = view:GetChild('chat') + + self._ctr_read = view:GetController('read') + self._ctr_offline = view:GetController('offline') + self._tex_score = view:GetChild('text_jifen') + self._mask_voice = view:GetChild('mask_voice') + + self._btn_head = view:GetChild('btn_head') + self._ctr_bank = view:GetController('bank') + self._ctr_room_owner = view:GetController('room_owner') + self._ctr_mask_voice = view:GetController('mask_voice') + self._ctr_dismiss_room = view:GetController('dismiss_room') + self._ctr_site = view:GetController('site') + + self._list_scoreAnimation = self._view:GetChild("list_scoreAnimation") + self.cScore = self._view:GetController("cScore") + + self.PlayerTGTips = view:GetChild('tuoguanTips') + if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + self.PlayerTGTips.displayObject.gameObject:SetActive(false) + end +end + +function M:IsShowTGTips(isShow, time) + --printlog("isShowisShowisShow==== ",isShow," time ",time) + if time == nil then time = 0 end + + self.isShowTGTimer = isShow + -- if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + -- self.PlayerTGTips.displayObject.gameObject:SetActive(isShow) + -- end + self.currentTime = 0 + if isShow then + --关闭头像上的显示倒计时,在页面中显示 + -- if self.PlayerTGTips then + -- self.PlayerTGTips.text = "开启托管剩余时间" .. time .. "s" + -- end + --显示在中间转盘里 + self.totalTime = time + TimerManager.AddTimer(self.OnUpdate, self) + else + TimerManager.RemoveTimer(self.OnUpdate, self) + end +end + +function M:OnUpdate() + --printlog("OnUpdate=====================") + if self.isShowTGTimer then + self.currentTime = self.currentTime + Time.deltaTime + if self.currentTime >= 1 then + self.currentTime = 0 + self.totalTime = self.totalTime - 1 + --printlog("当前计时器===>>>",self.totalTime) + --关闭头像上的显示倒计时,在页面中显示 + -- if self.PlayerTGTips then + -- self.PlayerTGTips.text = "开启托管剩余时间" .. self.totalTime .. "s" + -- end + + + + if self.totalTime <= 0 then + self.isShowTGTimer = false + if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + self.PlayerTGTips.displayObject.gameObject:SetActive(false) + end + end + end + + if self.muShiPlayerUpdate then + self:muShiPlayerUpdate() + end + end + if self.voiceTimePlay then + if self.voiceTime > 0 then + self.voiceTime = self.voiceTime - Time.deltaTime + self._mask_voice.text = math.floor(self.voiceTime) + else + self.voiceTimePlay = false + self._ctr_mask_voice.selectedIndex = 0 + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 + end + end +end + +function M:FillData(player) + self._player = player + if player == nil then + return + end + local isHidden = false + local room = DataManager.CurrenRoom + if room and room.playback ~= true and room.room_config and room.room_config.isHidden then + isHidden = room.room_config.isHidden == 1 + end + if isHidden == false then + ImageLoad.Load(player.self_user.head_url, self._btn_head._iconObject) + self._btn_head.onClick:Set( + function() + --local headView = HeadView.new(self._main_view._root_view, player.self_user, self._isHideIpAdds) + --headView:Show() + end + ) + else + local ctr = self._btn_head:GetController("hidden") + if ctr then + ctr.selectedIndex = 1 + end + end + + -- print("============================playinfoview") + pt(player) + + if isHidden + --and player.self_user.account_id ~= room.self_player.self_user.account_id + then + if player.orgSeat and player.orgSeat > 0 then + self._tex_player_name.text = "玩家" .. player.orgSeat + else + self._tex_player_name.text = "玩家" .. player.seat + player.orgSeat = membe_clone(player.seat) + end + if self._tex_player_id then + self._tex_player_id.text = "" + end + else + self._tex_player_name.text = player.self_user.nick_name + if self._tex_player_id then + self._tex_player_id.text = "ID:" .. player.self_user.account_id + end + end + -- self._ctr_room_owner.selectedIndex = room.owner_id == player.self_user.account_id and 1 or 0 + self._ctr_room_owner.selectedIndex = player.seat == 1 and 1 or 0 + if (DataManager.CurrenRoom.self_player ~= player) then + self._ctr_offline.selectedIndex = player.line_state == 0 and 1 or 0 + end + self:UpdateScore() + self:Ready(player.ready) + + if player.entrust then + self:MarkTuoguan() + end +end + +function M:UpdateScore(score, doAnimation) + local lastScore = tonumber(self._tex_score.text) + + if not score then + score = self._player.total_score + -- local room = DataManager.CurrenRoom + -- if room:checkHpNonnegative() then + -- if self._player.cur_hp then + -- -- -- print(self._player.total_hp) + -- -- if self._player.total_hp then + -- -- score = d2ad(self._player.total_hp).."/"..d2ad(self._player.cur_hp) + -- -- else + -- score = d2ad(self._player.cur_hp) + -- -- end + -- end + -- end + end + self._tex_score.text = tostring(score) + + if doAnimation then + self:ScoreAnimation(score - lastScore) + end +end + +function M:SetStartType(peopleNum, seat) + if peopleNum == 2 then + if seat == 1 then + self._ctr_site.selectedIndex = 1 + else + self._ctr_site.selectedIndex = 2 + self._tex_player_name = 154 + end + elseif peopleNum == 3 then + self._ctr_site.selectedIndex = 2 + seat + elseif peopleNum == 4 then + self._ctr_site.selectedIndex = 5 + seat + else + self._ctr_site.selectedIndex = 0 + end +end + +function M:DismissRoom(state) + state = state or false + self._ctr_dismiss_room.selectedIndex = state == true and 1 or 0 +end + +function M:UpdateLineState(state) + self._ctr_offline.selectedIndex = state == 0 and 1 or 0 +end + +function M:Ready(isread) + print("lingmengReady") + self._ctr_read.selectedIndex = isread and 1 or 0 +end + +function M:MarkBank(isbank) + self._ctr_bank.selectedIndex = isbank and 1 or 0 +end + +-- 表情 语音 +function M:ShowInteraction(type, str) + if type == 3 then + print("lingmeng ShowInteractionq", str) + Voice.DownLoad( + str, + function(clip) + print("lingmeng ShowInteraction") + if (clip) then + print("lingmeng ShowInteraction1") + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip, 3) + print("lingmeng ShowInteraction2") + end + end + ) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex, chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + if language ~= 0 then + local msgs = self._main_view['Fix_Msg_Chat' .. language + 1] + self:SetChat(msgs[index]) + else + self:SetChat(self._main_view.Fix_Msg_Chat[chat_index]) + end + elseif type == 1 then + self:SetBiaoqing('ui://Chat/' .. str) + end +end + +function M:SetBiaoqing(url) + if (self.__runwait_biaoqing ~= nil) then + if self._biaoqing.numChildren > 0 then + self._biaoqing:RemoveChildAt(0, true) + end + coroutine.stop(self.__runwait_biaoqing) + end + self._biaoqing.alpha = 1 + local bq = UIPackage.CreateObjectFromURL(url) + self._biaoqing:AddChild(bq) + bq:Center() + -- self._biaoqing:GetChild("n1").icon = url + self.__runwait_biaoqing = nil + self.__runwait_biaoqing = coroutine.start(self.__WaitBiaoqing, self) +end + +function M:__WaitBiaoqing() + coroutine.wait(2) + self._biaoqing.alpha = 0 + -- self._biaoqing:GetChild("n1").icon = nil + self._biaoqing:GetChildAt(0):Dispose() +end + +function M:SetChat(msg) + -- body + self._chat.alpha = 1 + self._chat:GetChild('title').text = msg + if (self.__runwait_chat ~= nil) then + coroutine.stop(self.__runwait_chat) + end + self.__runwait_chat = nil + self.__runwait_chat = coroutine.start(self.__WaitChat, self) +end + +function M:__WaitChat() + coroutine.wait(2) + self._chat.alpha = 0 + self._chat:GetChild('title').text = '' +end + +function M:ShowMaskVoice(time, mask) + mask = mask or true + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic + 1 + if (mask) then + self._ctr_mask_voice.selectedIndex = 1 + end + if (self.voiceTimePlay) then + -- coroutine.stop(self.__runwait_voice) + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 + end + -- self._mask_voice:GetTransition('t0'):Play() + self._mask_voice.text = math.floor(time) + self.voiceTime = time + self.voiceTimePlay = true + + TimerManager.AddTimer(self.OnUpdate, self) + -- self.__runwait_voice = nil + -- self.__runwait_voice = coroutine.start(self.__WaitMaskVoice, self, time) +end + +function M:__WaitMaskVoice(time) + coroutine.wait(time) + self._ctr_mask_voice.selectedIndex = 0 + self.__runwait_voice = nil + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 +end + +function M:GetHeadCenter() + local btn_head = self._view:GetChild('btn_head') + local pt = Vector2(btn_head.x + 1 / 2 * btn_head.width, btn_head.y + 1 / 2 * btn_head.height) + return pt +end + +-- 添加、移除托管标记 +function M:MarkTuoguan() + local com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan') + self:AddMarkToHead(com_tuoguan, 'mark_tuoguan') +end + +function M:UnmarkTuoguan() + self:RemoveMarkFromHead('mark_tuoguan') +end + +-- 动态的往头像上加载组件 +function M:AddMarkToHead(com, key) + if key then + if self[key] then + self[key]:Dispose() + end + self[key] = com + end + self._view:AddChild(com) + com.touchable = false + com.xy = self:GetHeadCenter() + com.y = 0 +end + +-- 动态移除组件 +function M:RemoveMarkFromHead(key) + if self[key] then + self[key]:Dispose() + self[key] = nil + end +end + +function M:Destroy() + self.isShowTGTimer = false + TimerManager.RemoveTimer(self.OnUpdate, self) + self.OnUpdate = nil + self.muShiPlayerUpdate = nil +end + +function M:ScoreAnimation(score) + if score == 0 then + return + end + + local imgPath = "ui://Main_Majiang/score" + local symbol = "ui://Main_Majiang/score+" + if score < 0 then + imgPath = "ui://Main_Majiang/nscore" + symbol = "ui://Main_Majiang/nscore-" + score = score * -1 + end + + local imgs = {} + for i = 1, score do + imgs[#imgs + 1] = imgPath .. score % 10 + score = math.floor(score / 10) + if score <= 0 then + break + end + end + + self._list_scoreAnimation.itemRenderer = function(index, obj) + local loader = obj:GetChild("n1") + loader.url = imgs[#imgs - index] + end + + self._list_scoreAnimation.numItems = #imgs + --local obj = self._list_scoreAnimation:AddItemFromPool() + local obj = self._list_scoreAnimation:GetFromPool("ui://v0j9abjyuans1b1") + self._list_scoreAnimation:AddChildAt(obj, 0) + local loader = obj:GetChild("n1") + loader.url = symbol + + self.cScore.selectedIndex = 1 + + local Rxy = self._list_scoreAnimation.xy + self._list_scoreAnimation:TweenMove(Vector2.New( + self._list_scoreAnimation.x, + self._list_scoreAnimation.y - 100 + ), 2):OnComplete(function() + self._list_scoreAnimation.xy = Rxy + self.cScore.selectedIndex = 0 + self._list_scoreAnimation:TweenFade(0, 4):OnComplete(function() + self._list_scoreAnimation:TweenFade(1, 1) + end) + end) +end + +return M diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua index 24506efe..dad759c5 100644 --- a/lua_probject/base_project/Main.lua +++ b/lua_probject/base_project/Main.lua @@ -56,8 +56,16 @@ function Main() FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("SIYUAN", "base/static/fonts/SIYUAN.TTF"), null) FairyGUI.FontManager.RegisterFont( FairyGUI.DynamicFont.New("AlimamaFangYuanTiVF-Thin", "base/static/fonts/AlimamaFangYuanTiVF-Thin.ttf"), null) - --FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("FZCuYuan-M03","base/static/fonts/FZCuYuan-M03.TTF"),null) - --FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("HYFangLiJ","base/static/fonts/HYFangLiJ.ttf"),null) + FairyGUI.FontManager.RegisterFont( + FairyGUI.DynamicFont.New("AlimamaFangYuanTi-MediumRound", "base/static/fonts/AlimamaFangYuanTi-MediumRound.TTF"), + null) + FairyGUI.FontManager.RegisterFont( + FairyGUI.DynamicFont.New("AlimamaFangYuanTi-SemiBoldRound", "base/static/fonts/AlimamaFangYuanTi-SemiBoldRound.TTF"), + null) + + FairyGUI.FontManager.RegisterFont( + FairyGUI.DynamicFont.New("AlimamaFangYuanTi-BoldRound-700", "base/static/fonts/AlimamaFangYuanTi-BoldRound-700.TTF"), + null) _game_info = json.decode(GameApplication.Instance.GameInfo) --_game_info["login_url"]="http://8.134.59.224:8101/" --pt(_game_info) diff --git a/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua new file mode 100644 index 00000000..99a79232 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua @@ -0,0 +1,783 @@ +local CardCheck = { + + cardList = {}, + cardListSord = {}, + cardNum = 0, + cardSize = 0, + long = false, + planeNoBelt = false, + threeNoBelt = false, + planelack = false, + threelack = false, + fourDaiThree = false, + fristCard = true, + haveRuleCard = false, + tipCardList = {}, + touchCardSet = {}, + touchCardMao = {} +} + +local CardType = { + one = 1, + long = 2, + dui = 3, + duiLong = 10, + threeAndTwo = 4, + normolPlant = 5, + zha = 6, + onlyThree = 7, + onlyPlant = 8, + zhaAndThreee = 9, + lessThree = 11, + lessPlant = 12 +} + +local M = CardCheck + +function M:InitFlag() + local config = DataManager.CurrenRoom.room_config.config + self.planeNoBelt = config.planeNoBelt == 1 + self.threeNoBelt = config.threeNoBelt == 1 + self.planelack = config.planelack == 1 + self.threelack = config.threelack == 1 + self.fourDaiThree = config.fourDaiThree + self.rule = config.rule + self._flag_fristCard = true + print("==============================lingmengcheckinitFlag") + pt(config) + pt(self) + return self +end + +function M:InitLastCard(cardList, mustPutMaxCard) + self._flag_fristCard = false + self:Clear() + self._flag_mustMax = mustPutMaxCard + self.type = 0 + self.specilCard = {} + self.lastCardNum = #cardList + self._flag_allCards = false + self._flag_checkLst = true + if #cardList == 0 then + self._flag_fristCard = true + return + end + table.sort(cardList) + pt(cardList) + self.lastMinCard = math.floor(cardList[1] / 10) + local temp_long = 0 + for i = 1, #cardList do + local number = math.floor(cardList[i] / 10) + if self.cardList[number] then + self.cardList[number] = self.cardList[number] + 1 + else + self.cardList[number] = 1 + self.cardSize = self.cardSize + 1 + table.insert(self.cardListSord, number) + end + self.cardNum = self.cardNum + 1 + if i == 1 then + temp_long = 1 + elseif temp_long == i - 1 then + if math.abs(math.floor(cardList[i - 1] / 10) - number) == 1 then + temp_long = i + end + end + end + self.long = temp_long == self.cardNum and self.cardNum >= 5 + print("lingmengCheckAloneOrLong2") + if self:CheckAloneOrLong() then + self.type = self:CheckAloneOrLong() + return + end + print("lingmengCheckDuiZi2") + if self:CheckDuiZi() then + self.type = self:CheckDuiZi() + return + end + print("lingmengCheckSanDai2") + + if self:CheckSanDai() then + local a, b, c = self:CheckSanDai() + self.type = a + if b then + self.specilCard = b + end + if c then + self.lastMinCard = c + end + return + end + print("lingmengCheckZha2") + + if self:CheckZha() then + local a, b, c = self:CheckZha() + self.type = a + if b then + self.specilCard = b + end + if c then + self.lastMinCard = c + end + return + end + if self.type == 0 then + -- ViewUtil.ErrorTip(-1, "上一份牌型判断错误") + end +end + +function M:initCards(cardList, data) + print("lingmenginitCards") + pt(cardList) + local temp_long = 0 + data = data or {} + self:Clear() + self._flag_allCards = data.flag_allCards or false + self._flag_ruleCard = data.flag_ruleCard or false + if data.flag then + for i = 1, #cardList do + if cardList[i].card_code_number == 34 then + self.haveRuleCard = true + end + local number = math.floor(cardList[i][1].card_code_number / 10) + if self.cardList[number] then + self.cardList[number] = self.cardList[number] + 1 + else + self.cardList[number] = 1 + self.cardSize = self.cardSize + 1 + table.insert(self.cardListSord, number) + end + self.cardNum = self.cardNum + 1 + if i == 1 then + temp_long = 1 + elseif temp_long == i - 1 then + if math.abs(math.floor(cardList[i - 1][1].card_code_number / 10) - number) == 1 then + temp_long = i + end + end + end + else + for i = 1, #cardList do + if cardList[i].card_code_number == 34 then + self.haveRuleCard = true + end + local number = math.floor(cardList[i].card_code_number / 10) + if self.cardList[number] then + self.cardList[number] = self.cardList[number] + 1 + else + self.cardList[number] = 1 + self.cardSize = self.cardSize + 1 + table.insert(self.cardListSord, number) + end + self.cardNum = self.cardNum + 1 + if i == 1 then + temp_long = 1 + elseif temp_long == i - 1 then + if math.abs(math.floor(cardList[i - 1].card_code_number / 10) - number) == 1 then + temp_long = i + end + end + end + end + + print(self.cardNum, self.cardSize, temp_long) + pt(self.cardList) + self.long = temp_long == self.cardNum and self.cardNum >= 5 +end + +function M:CheckCards() + if self.cardNum ~= 4 and self.cardNum ~= self.lastCardNum and not self._flag_fristCard then + return + end + if self.cardNum == 1 and self._flag_mustMax and self.maxCard ~= self.cardListSord[1] then + return + end + if self.cardNum == 0 then + return + end + if self.rule == 1 and self._flag_ruleCard and DataManager.CurrenRoom.curren_round == 1 and not self.haveRuleCard then + return + end + + print("lingmeng self.lastMinCard", self.lastMinCard) + + print("lingmengCheckAloneOrLong") + if self:CheckAloneOrLong() then + return true + end + print("lingmengCheckDuiZi") + + if self:CheckDuiZi() then + return true + end + print("lingmengCheckSanDai") + if self:CheckSanDai() then + if self._flag_fristCard then + return true + end + local a, b, c = self:CheckSanDai() + self.type = a + if b then + self.specilCard = b + end + if c then + return c > (self.lastMinCard or 0) + end + return true + end + print("lingmengCheckZha") + + if self:CheckZha() then + return true + end + + return false +end + +function M:CheckOutCard(cardList) + print("lingmengCheckOutCard===============") + pt(cardList) + self.tipCardList = {} + self.touchCardSet = {} + self.touchCardMao = {} + local cardMap = {} + local cardSet = {} + local temp_long = 0 + local temp_longList = {} + local longList = {} + local lastCard = -1 + + local flag_threeOrFour = false + for i = 1, #cardList do + local number = math.floor(cardList[i].card_code_number / 10) + if cardMap[number] then + cardMap[number].value = cardMap[number].value + 1 + table.insert(cardMap[number].cardList, cardList[i]) + else + cardMap[number] = {} + cardMap[number].value = 1 + cardMap[number].cardList = {} + table.insert(cardMap[number].cardList, cardList[i]) + table.insert(cardSet, number) + end + if cardMap[number].value >= 3 then + flag_threeOrFour = true + end + if lastCard ~= number then + if lastCard - number ~= 1 then + if temp_long >= 5 then + table.insert(longList, temp_longList) + end + temp_long = 1 + temp_longList = {} + else + temp_long = temp_long + 1 + end + lastCard = number + table.insert(temp_longList, number) + end + end + if temp_long >= 4 then + table.insert(longList, temp_longList) + end + + table.sort(cardSet) + self.maxCard = cardSet[#cardSet] + + if self._flag_fristCard then + if self._flag_mustMax then + self:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList) + else + self:CheckOutCardGetFristTipList(cardSet, cardMap) + end + return + end + + local cardType, only, longLength = self:CheckOutCardGetType() + + + local tipCardSet = self:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength) + + self:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType) + + if cardType >= 3 and only == 0 then + self:CheckOutCardGetAllCardSetAndMap() + end +end + +function M:CheckOutCardGetAllCardSetAndMap() + self.touchCardSet = {} + self.touchCardMao = {} + for i = 3, 15 do + table.insert(self.touchCardSet, i) + self.touchCardMao[i] = 1 + end +end + +function M:CheckOutCardGetFristTipList(cardSet, cardMap) + for i = 1, #cardSet do + local card = cardSet[i] + table.insert(self.touchCardSet, card) + self.touchCardMao[card] = 1 + local temp = {} + table.insert(temp, cardMap[card].cardList[1]) + table.insert(self.tipCardList, temp) + end +end + +function M:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList) + if flag_threeOrFour then + for i = 3, 15 do + if cardMap[i] then + if i == cardSet[#cardSet] then + table.insert(self.touchCardSet, i) + self.touchCardMao[i] = 1 + table.insert(self.tipCardList, cardMap[i].cardList) + elseif cardMap[i].value >= 2 then + table.insert(self.touchCardSet, i) + self.touchCardMao[i] = 1 + table.insert(self.tipCardList, cardMap[i].cardList) + else + table.insert(self.touchCardSet, i) + self.touchCardMao[i] = 1 + end + else + table.insert(self.touchCardSet, i) + self.touchCardMao[i] = 1 + end + end + else + for i = 1, #cardSet do + local card = cardSet[i] + if i == #cardSet then + table.insert(self.touchCardSet, card) + self.touchCardMao[card] = 1 + table.insert(self.tipCardList, cardMap[card].cardList) + elseif cardMap[card].value >= 2 then + table.insert(self.touchCardSet, card) + self.touchCardMao[card] = 1 + table.insert(self.tipCardList, cardMap[card].cardList) + end + end + end + ---单数顺另外添加到提示和现实 + for i = 1, #longList do + local tempTipList = {} + for j = 1, #longList[i] do + local card = longList[i][j] + if not self.touchCardMao[card] then + table.insert(self.touchCardSet, card) + self.touchCardMao[card] = 1 + end + table.insert(tempTipList, cardMap[card].cardList[1]) + end + table.insert(self.tipCardList, tempTipList) + end +end + +function M:CheckOutCardGetType() + local cardType = 0 + local only = 0 + local longLength = 1 + if self.type == 0 then + return cardType, only, longLength + end + if self.type == CardType.one or self.type == CardType.long then + cardType = 1 + if self.type == CardType.long then + longLength = self.lastCardNum + end + elseif self.type == CardType.dui or self.type == CardType.duiLong then + cardType = 2 + if self.lastCardNum > 2 then + longLength = self.lastCardNum / 2 + end + elseif self.type == CardType.threeAndTwo or self.type == CardType.onlyThree or self.type == CardType.lessThree or self.type == CardType.normolPlant or self.type == CardType.onlyPlant or self.type == CardType.lessPlant then + cardType = 3 + if self.type == CardType.onlyThree or self.type == CardType.onlyPlant then + only = 1 + if self.type == CardType.onlyPlant then + longLength = self.lastCardNum / 3 + end + end + if self.type == CardType.normolPlant then + longLength = self.lastCardNum / 5 + end + elseif self.type == CardType.zha or self.type == CardType.zhaAndThreee then + cardType = 4 + if self.type == CardType.zha then + only = 1 + end + end + return cardType, only, longLength +end + +function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength) + print("lingmengCheckOutCardGetTouchSet", cardType, longLength, self.lastMinCard) + pt(cardSet) + pt(cardMap) + local tempLong = 0 + local lastCard = 0 + local tempCardSet = {} + local tipCardSet = {} + local ZhaCardList = {} + for i = 1, #cardSet do + local card = cardSet[i] + if cardMap[card].value >= cardType and card > self.lastMinCard and cardMap[card].value ~= 4 then + if tempLong == 0 then + tempLong = 1 + else + if lastCard - card == -1 then + tempLong = tempLong + 1 + else + if tempLong >= longLength and (cardType ~= 1 or longLength >= 5 or not self._flag_mustMax) then + for j = 1, tempLong do + table.insert(self.touchCardSet, tempCardSet[j]) + self.touchCardMao[tempCardSet[j]] = 1 + end + end + table.insert(tipCardSet, tempCardSet) + tempLong = 1 + tempCardSet = {} + end + end + table.insert(tempCardSet, card) + lastCard = card + end + if cardMap[card].value == 4 then + table.insert(self.touchCardSet, card) + self.touchCardMao[card] = 1 + table.insert(ZhaCardList, card) + end + end + if tempLong >= longLength then + for j = 1, tempLong do + if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or j == tempLong then + table.insert(self.touchCardSet, tempCardSet[j]) + self.touchCardMao[tempCardSet[j]] = 1 + end + end + end + table.insert(tipCardSet, tempCardSet) + for i = 1, #ZhaCardList do + table.insert(tipCardSet, ZhaCardList[i]) + end + return tipCardSet +end + +function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType) + print("lingmengCheckOutCardSetTipList", longLength, cardMap, cardType) + pt(tipCardSet) + for i = 1, #tipCardSet do + if type(tipCardSet[i]) == 'number' then + table.insert(self.tipCardList, cardMap[tipCardSet[i]].cardList) + else + local tipCardSetLen = #tipCardSet[i] + if tipCardSetLen == longLength then + local tempList = {} + local tempSanDaiCard = {} + for j = 1, tipCardSetLen do + local card = tipCardSet[i][j] + tempSanDaiCard[card] = true + local minNum = Mathf.Min(cardMap[card].value, cardType) + for k = 1, minNum do + if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then + table.insert(tempList, cardMap[card].cardList[k]) + end + end + end + if #tempList > 0 then + if self.type == 4 or self.type == 5 then + local removeSanDaiList = {} + for k, v in pairs(cardMap) do + if not tempSanDaiCard[k] then + for i, v1 in ipairs(v.cardList) do + table.insert(removeSanDaiList, v1) + end + end + end + if #removeSanDaiList <= longLength * 2 then + table.insert(self.tipCardList, tempList) + else + self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList) + end + else + table.insert(self.tipCardList, tempList) + end + end + else + for j = 1, tipCardSetLen do + if j + longLength - 1 <= tipCardSetLen then + local tempList = {} + local tempSanDaiCard = {} + for k = j, j + longLength - 1 do + local card = tipCardSet[i][k] + tempSanDaiCard[card] = true + local minNum = Mathf.Min(cardMap[card].value, cardType) + for l = 1, minNum do + if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then + table.insert(tempList, cardMap[card].cardList[l]) + end + end + end + if #tempList > 0 then + if self.type == 4 or self.type == 5 then + local removeSanDaiList = {} + for k, v in pairs(cardMap) do + if not tempSanDaiCard[k] then + for i, v1 in ipairs(v.cardList) do + table.insert(removeSanDaiList, v1) + end + end + end + if #removeSanDaiList <= longLength * 2 then + table.insert(self.tipCardList, tempList) + else + self:GetSanDaiTips(tempList, longLength * 2, removeSanDaiList) + end + else + table.insert(self.tipCardList, tempList) + end + end + end + end + end + end + end +end + +function M:GetSanDaiTips(tempList, childNum, cardList) + local childIndex = {} + local cardLen = #cardList + for i = 1, childNum do + childIndex[i] = i + end + while childIndex[1] <= cardLen - childNum do + if childIndex[childNum] == cardLen then + for i = childNum - 1, 1, -1 do + if childIndex[i] ~= cardLen + i - childNum then + childIndex[i] = childIndex[i] + 1 + for j = i + 1, childNum do + childIndex[j] = childIndex[j - 1] + 1 + end + end + end + else + childIndex[childNum] = childIndex[childNum] + 1 + end + local tempList_copy = {} + for i, v in ipairs(tempList) do + tempList_copy[i] = v + end + for i = 1, childNum do + table.insert(tempList_copy, cardList[childIndex[i]]) + end + table.insert(self.tipCardList, tempList_copy) + end +end + +function M:CheckAloneOrLong() + if self.cardNum == 1 and M:CheckType(CardType.one) then + return CardType.one + end + if self.long and M:CheckType(CardType.long) then + return CardType.long + end +end + +function M:CheckDuiZi() + if self.cardNum == 2 and self.cardSize == 1 and M:CheckType(CardType.dui) then + return CardType.dui + end + if self.cardNum % 2 == 0 and M:CheckType(CardType.duiLong) then + local last_k + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v == 2 then + if not last_k then + last_k = k + else + if math.abs(last_k - k) ~= 1 then + return + end + last_k = k + end + else + return + end + end + return CardType.duiLong + end +end + +--三带有着不同比大小极致,需要返回是哪些牌三带和最小的三带牌 +function M:CheckSanDai() + --三张 + if self.cardNum == 5 and M:CheckType(CardType.threeAndTwo) then + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v >= 3 then + return CardType.threeAndTwo, { k }, k + end + end + end + + if self.threelack and self.cardNum == 4 and self.cardSize == 2 and M:CheckType(CardType.lessThree) then + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v >= 3 then + return CardType.lessThree, { k }, k + end + end + return CardType.lessThree + end + + if self.threeNoBelt and self.cardNum == 3 and self.cardSize == 1 and M:CheckType(CardType.onlyThree) then + return CardType.onlyThree + end + + + --飞机 + local temp_normol_feiji + if self.cardNum % 5 == 0 then + temp_normol_feiji = self.cardNum / 5 + end + + if temp_normol_feiji and M:CheckType(CardType.normolPlant) then + local last_k + local key_table = {} + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v >= 3 then + table.insert(key_table, k) + if not last_k then + last_k = k + else + if math.abs(last_k - k) ~= 1 then + return + end + last_k = k + end + end + end + if #key_table >= temp_normol_feiji then + return CardType.normolPlant, key_table, key_table[1] + else + return + end + end + + print("liengmengCheckthreelack", self.threelack, self._flag_allCards) + + if self.threelack and M:CheckType(CardType.lessPlant) then + local last_k + local key_table = {} + local num_four = 0 + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v >= 3 then + if v == 4 then + num_four = 1 + end + table.insert(key_table, k) + print("liengmengCheckthreelack2", last_k, k) + + if not last_k then + last_k = k + else + if math.abs(last_k - k) ~= 1 then + return + end + last_k = k + end + end + end + print("liengmengCheckthreelack4", #key_table, self.cardNum - #key_table * 3 < #key_table * 2) + + if self.cardNum - #key_table * 3 < #key_table * 2 and not (self.cardNum == 4 and num_four == 1) then + return CardType.lessPlant, key_table, key_table[1] + else + return + end + end + + print("liengmengCheckplaneNoBelt", self.planeNoBelt, self.cardNum % 3) + + if self.planeNoBelt and self.cardNum % 3 == 0 and M:CheckType(CardType.onlyPlant) then + local last_k + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v == 3 then + if not last_k then + last_k = k + else + if math.abs(last_k - k) ~= 1 then + return + end + last_k = k + end + else + return + end + end + return CardType.onlyPlant + end +end + +function M:CheckZha() + if self.cardNum == 4 and self.cardSize == 1 then + return CardType.zha + end + + if self.fourDaiThree and self.cardNum == 7 and M:CheckType(CardType.zhaAndThreee) then + local flag_four + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] + if v == 4 then + return CardType.zhaAndThreee, { k }, k + end + end + return + end +end + +function M:CheckType(type) + if type == CardType.duiLong then + return self._flag_checkLst or self._flag_fristCard or (type == self.type and self.cardNum == self.lastCardNum) + elseif type == CardType.lessPlant or type == CardType.lessThree then + return self._flag_checkLst or (self._flag_fristCard and self._flag_allCards) or type == self.type + else + return self._flag_checkLst or self._flag_fristCard or type == self.type + end +end + +function M:GetTipsList() + return self.tipCardList +end + +function M:GetTouchSet() + return self.touchCardSet +end + +function M:GetTouchCardMap() + return self.touchCardMao +end + +function M:Clear() + self.cardList = {} + self.cardListSord = {} + self.cardNum = 0 + self.cardSize = 0 + self.long = false + self._flag_checkLst = false + self.haveRuleCard = false +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua index 1d351ea8..973ce45f 100644 --- a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua @@ -6,6 +6,7 @@ local EXGameInfo = {} local M = EXGameInfo +local roundTable = { 10, 15, 20 } function EXGameInfo.new(blur_view) setmetatable(M, { __index = IGameInfo }) local self = setmetatable({}, { __index = M }) @@ -18,94 +19,49 @@ function M:FillData(view, index) self._maxPlayer = 2 -- 默认玩家人数 self._roundChoice = 5 -- 回合选项数 - if oldGameVersion == 1 then - self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast") + -- if oldGameVersion == 1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play") + + 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 - self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang") + com_editSetting:GetController("oneRound").selectedIndex = 0 end - - - if oldGameVersion == 2 then - self._config:GetController("xipai").selectedIndex = 0 - - self.xipaiValueText = self._config:GetChild('xipaifen') - self.xipaiValueText.text = 1 - self.xipaiValue = 1 - - self.anchouValueText = self._config:GetChild('anchoufen') - self.anchouValueText.text = 1 - self.anchouValue = 1 - - local btn_cr = self._config:GetChild('sdsrbtn') - btn_cr.onClick:Set( - function() - local gniv = GroupNumberInputView_Game.new(nil, function(num) - local value = limit - if otype == 1 then - value = value + ad2d(num) - elseif otype == -1 then - value = value - ad2d(num) - else - value = ad2d(num) - end - - if value < 0 then - ViewUtil.ErrorTip(1, "输入数据异常!") - end - - self.xipaiValueText.text = value / 100 - self.xipaiValue = value / 100 - 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 / 100 - self.anchouValue = value / 100 - end, 3, nil) - gniv:Show() - end - ) - end - - - - self._config:GetChild("people_2").onClick:Set(function() - self._config:GetController("rule").selectedIndex = 0 - end) - - local piao = self._config:GetController("piao") - local daniao = self._config:GetController("daniao") - - piao.onChanged:Add(function() - if piao.selectedIndex ~= 0 then - daniao.selectedIndex = 0 + self._config:GetController("round").onChanged:Set(function() + if ctr_round.selectedIndex == 0 then + com_editSetting:GetController("oneRound").selectedIndex = 1 + else + com_editSetting:GetController("oneRound").selectedIndex = 0 end end) + -- else + -- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang") + -- end - daniao.onChanged:Add(function() - if daniao.selectedIndex ~= 0 then - piao.selectedIndex = 0 - end - end) + + -- self._config:GetChild("people_2").onClick:Set(function() + -- self._config:GetController("rule").selectedIndex = 0 + -- end) + + -- local piao = self._config:GetController("piao") + -- local daniao = self._config:GetController("daniao") + + -- piao.onChanged:Add(function() + -- if piao.selectedIndex ~= 0 then + -- daniao.selectedIndex = 0 + -- end + -- end) + + -- daniao.onChanged:Add(function() + -- if daniao.selectedIndex ~= 0 then + -- piao.selectedIndex = 0 + -- end + -- end) end local _help_url = "ui://Info_Poker_RunFastNew/Com_help" @@ -115,7 +71,7 @@ end local _icon_url = "ui://Info_Poker_RunFastNew/icon" function M:GetIconUrl() - return _icon_url + return "ui://Lobby/paodekuai2", "ui://Lobby/paodekuai1" end local _icon_url1 = "ui://Info_Poker_RunFastNew/icon1" @@ -130,100 +86,109 @@ end function M:LoadConfigData(data) local _config = self._config + pt(data) _config:GetController("round").selectedIndex = data.opt - 1 - _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 - _config:GetController("play_list").selectedIndex = data.leaf - 1 - _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 - _config:GetController("heart10").selectedIndex = data.heartten - 1 - _config:GetController("bombSpring").selectedIndex = data.minboom - 1 - _config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1 - _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 - _config:GetController("showlength").selectedIndex = data.showlength - _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree - _config:GetController("demolition").selectedIndex = data.demolition - _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + _config:GetController("handcard").selectedIndex = 2 - data.leaf + _config:GetController("peopleNum").selectedIndex = 3 - data.maxPlayers + _config:GetController("showCardNum").selectedIndex = 1 - data.showlength + _config:GetController("wanfa1_1").selectedIndex = data.planeNoBelt + _config:GetController("wanfa1_2").selectedIndex = data.planelack + _config:GetController("wanfa1_3").selectedIndex = data.fourDaiThree and 1 or 0 + _config:GetController("wanfa1_4").selectedIndex = data.heartten - 1 + _config:GetController("wanfa1_5").selectedIndex = 2 - data.rule + _config:GetController("wanfa2_1").selectedIndex = data.specilAdd - local sandaidan = data.sandaidan - if sandaidan ~= nil and sandaidan == 1 then - _config:GetChild("sandaidan").selected = true + -- local sandaidan = data.sandaidan + -- if sandaidan ~= nil and sandaidan == 1 then + -- _config:GetChild("sandaidan").selected = true - _config:GetChild("planelack").selected = false - _config:GetChild("Threelack").selected = false - else - _config:GetChild("sandaidan").selected = false + -- _config:GetChild("planelack").selected = false + -- _config:GetChild("Threelack").selected = false + -- else + -- _config:GetChild("sandaidan").selected = false - _config:GetChild("planelack").selected = data.planelack == 1 and true or false - _config:GetChild("Threelack").selected = data.threelack == 1 and true or false - end + -- _config:GetChild("planelack").selected = data.planelack == 1 and true or false + -- _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + -- end - local fs = data.fs - if fs ~= nil and fs == 1 then - _config:GetChild("fan_sprint").selected = true - else - _config:GetChild("fan_sprint").selected = false - end + -- local fs = data.fs + -- if fs ~= nil and fs == 1 then + -- _config:GetChild("fan_sprint").selected = true + -- else + -- _config:GetChild("fan_sprint").selected = false + -- end - local ba = data.ba - if ba ~= nil and ba == 1 then - _config:GetChild("boom_add").selected = true - else - _config:GetChild("boom_add").selected = false - end + -- local ba = data.ba + -- if ba ~= nil and ba == 1 then + -- _config:GetChild("boom_add").selected = true + -- else + -- _config:GetChild("boom_add").selected = false + -- end - _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + -- _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false - if data.piao ~= nil then - _config:GetController("piao").selectedIndex = data.piao - end + -- if data.piao ~= nil then + -- _config:GetController("piao").selectedIndex = data.piao + -- end - if data.daniao ~= nil then - _config:GetController("daniao").selectedIndex = data.daniao - end + -- if data.daniao ~= nil then + -- _config:GetController("daniao").selectedIndex = data.daniao + -- end - if _config:GetChild("fourBeltThree") then - _config:GetChild("fourBeltThree").selected = data.fourDaiTwo - end + -- if _config:GetChild("fourBeltThree") then + -- _config:GetChild("fourBeltThree").selected = data.fourDaiTwo + -- end - if _config:GetChild("fourBeltTwo") then - _config:GetChild("fourBeltTwo").selected = data.fourDaiThree - end + -- if _config:GetChild("fourBeltTwo") then + -- _config:GetChild("fourBeltTwo").selected = data.fourDaiThree + -- end - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected = data.xi_pai - end + -- if _config:GetChild("xipai") then + -- _config:GetChild("xipai").selected = data.xi_pai + -- end - if oldGameVersion == 2 then - self.xipaiValueText.text = data.xi_pai_score / 100 - self.xipaiValue = data.xi_pai_score / 100 + -- if oldGameVersion == 2 then + -- self.xipaiValueText.text = data.xi_pai_score / 1000 + -- self.xipaiValue = data.xi_pai_score / 1000 - self.anchouValueText.text = data.an_chou_score / 100 - self.anchouValue = data.an_chou_score / 100 - end + -- self.anchouValueText.text = data.an_chou_score / 1000 + -- self.anchouValue = data.an_chou_score / 1000 + -- end end function M:SelectedConfigData() local _config = self._config local round = _config:GetController("round").selectedIndex - local rule = _config:GetController("rule").selectedIndex - local leaf = _config:GetController("play_list").selectedIndex - local willBeOut = _config:GetController("willBeOut").selectedIndex - local bombSpring = _config:GetController("bombSpring").selectedIndex - local heart10 = _config:GetController("heart10").selectedIndex - local player_num = _config:GetController("player_num").selectedIndex - local AA = _config:GetController("Cost").selectedIndex - local showlength = _config:GetController("showlength").selectedIndex - local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex - local demolition = _config:GetController("demolition").selectedIndex - local fangzuobi = _config:GetController("fangzuobi").selectedIndex - local planelack = _config:GetChild("planelack").selected and 1 or 0 - local threelack = _config:GetChild("Threelack").selected and 1 or 0 - local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 - local piao = _config:GetController("piao").selectedIndex - local daniao = _config:GetController("daniao").selectedIndex - local sandaidan = _config:GetController("sandaidan").selectedIndex - local ba = _config:GetChild("boom_add").selected and 1 or 0 - local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + local handcard = _config:GetController("handcard").selectedIndex + local peopleNum = _config:GetController("peopleNum").selectedIndex + local showCardNum = _config:GetController("showCardNum").selectedIndex + local wanfa1_1 = _config:GetController("wanfa1_1").selectedIndex + local wanfa1_2 = _config:GetController("wanfa1_2").selectedIndex + local wanfa1_3 = _config:GetController("wanfa1_3").selectedIndex + local wanfa1_4 = _config:GetController("wanfa1_4").selectedIndex + local wanfa1_5 = _config:GetController("wanfa1_5").selectedIndex + local wanfa2_1 = _config:GetController("wanfa2_1").selectedIndex + + -- local rule = _config:GetController("rule").selectedIndex + -- local leaf = _config:GetController("play_list").selectedIndex + -- local willBeOut = _config:GetController("willBeOut").selectedIndex + -- local bombSpring = _config:GetController("bombSpring").selectedIndex + -- local heart10 = _config:GetController("heart10").selectedIndex + -- local player_num = _config:GetController("player_num").selectedIndex + -- local AA = _config:GetController("Cost").selectedIndex + -- local showlength = _config:GetController("showlength").selectedIndex + -- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + -- local demolition = _config:GetController("demolition").selectedIndex + -- local fangzuobi = _config:GetController("fangzuobi").selectedIndex + -- local planelack = _config:GetChild("planelack").selected and 1 or 0 + -- local threelack = _config:GetChild("Threelack").selected and 1 or 0 + -- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + -- local piao = _config:GetController("piao").selectedIndex + -- local daniao = _config:GetController("daniao").selectedIndex + -- local sandaidan = _config:GetController("sandaidan").selectedIndex + -- local ba = _config:GetChild("boom_add").selected and 1 or 0 + -- local fs = _config:GetChild("fan_sprint").selected and 1 or 0 ----- local fourDaiTwo = false @@ -244,66 +209,183 @@ function M:SelectedConfigData() ---- local _data = {} _data["account_id"] = DataManager.SelfUser.Id - _data["opt"] = round + 1 - _data["rule"] = rule == 0 and 2 or 1 - _data["leaf"] = leaf + 1 - _data["AA"] = AA - _data["willBeOut"] = willBeOut + 1 - _data["showlength"] = showlength - _data["heartten"] = willBeOut == 0 and heart10 + 1 or 2 - _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 - _data["maxPlayers"] = player_num + 2 - _data["fourBeltThree"] = fourBeltThree - _data["demolition"] = demolition - _data["fangzuobi"] = fangzuobi - _data["threeA"] = ThreeA - _data["piao"] = piao - _data["daniao"] = daniao - _data["sandaidan"] = sandaidan - _data["ba"] = ba - _data["fs"] = fs + -- _data["AA"] = AA + -- _data["willBeOut"] = willBeOut + 1 + -- _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + -- _data["fourBeltThree"] = fourBeltThree + -- _data["demolition"] = demolition + -- _data["fangzuobi"] = fangzuobi + -- _data["threeA"] = ThreeA + -- _data["piao"] = piao + -- _data["daniao"] = daniao + -- _data["sandaidan"] = sandaidan + -- _data["ba"] = ba + -- _data["fs"] = fs _data["fourDaiTwo"] = fourDaiTwo - _data["fourDaiThree"] = fourDaiThree + + -----------------------lingmeng---------------------------- + + _data["AA"] = 0 + _data["willBeOut"] = 1 + _data["minboom"] = 2 + _data["fourBeltThree"] = 0 + _data["demolition"] = 0 + _data["fangzuobi"] = 0 + _data["threeA"] = 0 + _data["piao"] = 0 + _data["daniao"] = 0 + _data["sandaidan"] = 0 + _data["ba"] = 0 + _data["fs"] = 0 - if willBeOut == 1 then - -- body - _data["planelack"] = 0 - _data["threelack"] = 0 - else - if sandaidan == 1 then - _data["planelack"] = 0 - _data["threelack"] = 0 - else - _data["planelack"] = planelack - _data["threelack"] = threelack - end + _data["leaf"] = handcard == 0 and 2 or handcard --手牌 1是15张,2是16张 + _data["opt"] = round + 1 --局数 1是10局 2是15局 3是20局 ("未知") + _data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人 + _data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法 + _data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示 + _data["planeNoBelt"] = wanfa1_1 --飞机不带 + _data["threeNoBelt"] = wanfa1_1 --三张不带 + _data["planelack"] = wanfa1_2 --飞机可少带接完 + _data["threelack"] = wanfa1_2 --三张可少带接完 + _data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法 + if wanfa1_3 == 1 then + _data["fourDaiThree"] = true end + _data["heartten"] = wanfa1_4 + 1 --红桃扎鸟 1没有该玩法 2有该玩法 似乎说的是红桃10分数翻倍,具体要问江西那边 + _data["specilAdd"] = wanfa2_1 --特殊加分规则:只出一张加扣10分,出2-3张加扣5分 0没有该玩法 1有该玩法 + + + + + ----------------------------------------------------------- + + + -- if willBeOut == 1 then + -- -- body + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + -- if sandaidan == 1 then + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + -- _data["planelack"] = planelack + -- _data["threelack"] = threelack + -- end + -- end _data['xi_pai'] = xi_pai - local xi_pai_score = 0 - local an_chou_score = 0 + local xi_pai_score = 1 + local an_chou_score = 1 - if oldGameVersion == 2 then - xi_pai_score = self.xipaiValue - an_chou_score = self.anchouValue - end + -- if oldGameVersion == 2 then + -- xi_pai_score = self.xipaiValue + -- an_chou_score = self.anchouValue + -- end - _data['xi_pai_score'] = xi_pai_score * 100 - _data['an_chou_score'] = an_chou_score * 100 + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 return _data end function M:OnChangeOption(ctype, pay_obj) IGameInfo.OnChangeOption(self, ctype, pay_obj) - local people = self._config:GetController("player_num") - people.onChanged:Set(function() - self._maxPlayer = people.selectedIndex + 2 + local peopleNum = self._config:GetController("peopleNum") + peopleNum.onChanged:Set(function() + self._maxPlayer = peopleNum.selectedIndex == 1 and 2 or 3 self:ShowVariablePrice(ctype, pay_obj) end) end +function M:LoadConfigToDetail(data, hpdata) + local configData = data + if type(data) == 'string' then + configData = json.decode(data) + end + + local hpData = configData.hpData or hpdata + if type(hpData) == 'string' then + if hpData == "null" then + hpData = nil + else + hpData = json.decode(hpData) + end + end + local returnString = "" + + if hpData then + returnString = string.format("%s倍,", hpData.times / 1000) + end + + returnString = string.format("%s人数%s人", returnString, configData.maxPlayers) + + if hpData then + returnString = string.format("%s %s局", returnString, hpData.maxRound) + end + if configData.leaf then + returnString = string.format("%s,%s", returnString, configData.leaf == 1 and "15张手牌" or "16张手牌") + end + if configData.showlength then + returnString = string.format("%s,%s", returnString, configData.showlength == 0 and "不显示牌数" or "显示牌数") + end + if configData.planeNoBelt and configData.threeNoBelt then + if configData.planeNoBelt == 0 and configData.threeNoBelt == 0 then + returnString = string.format("%s,%s", returnString, "三张、飞机必带") + elseif configData.planeNoBelt == 0 then + returnString = string.format("%s,%s", returnString, "三张必带、飞机可不带") + elseif configData.threeNoBelt == 0 then + returnString = string.format("%s,%s", returnString, "三张可不带、飞机必带") + else + returnString = string.format("%s,%s", returnString, "三张、飞机可不带") + end + else + if configData.planeNoBelt then + returnString = string.format("%s%s", returnString, configData.planeNoBelt == 0 and "" or ",飞机可不带") + end + if configData.threeNoBelt then + returnString = string.format("%s%s", returnString, configData.threeNoBelt == 0 and "" or ",三张可不带") + end + end + + if configData.planelack and configData.threelack then + if configData.planelack == 0 and configData.threelack == 0 then + returnString = string.format("%s,%s", returnString, "三张、飞机不可少带接完") + elseif configData.planelack == 0 then + returnString = string.format("%s,%s", returnString, "三张不可少带接完、飞机可少带接完") + elseif configData.threelack == 0 then + returnString = string.format("%s,%s", returnString, "三张可少带接完、飞机不可少带接完") + else + returnString = string.format("%s,%s", returnString, "三张、飞机可少带接完") + end + else + if configData.planelack then + returnString = string.format("%s%s", returnString, configData.planelack == 0 and "" or ",飞机可少带") + end + if configData.threelack then + returnString = string.format("%s%s", returnString, configData.threelack == 0 and "" or ",三张可少带") + end + end + if configData.fourDaiThree then + returnString = string.format("%s%s", returnString, configData.fourDaiThree and ",四带三" or "") + end + if configData.heartten then + returnString = string.format("%s%s", returnString, configData.heartten == 1 and "" or ",红桃10扎鸟") + end + if configData.rule then + returnString = string.format("%s%s", returnString, + configData.rule == 1 and ",首局黑桃三必出" or "") + end + if configData.specilAdd then + returnString = string.format("%s%s", returnString, configData.specilAdd == 0 and "" or ",只出一张加扣10分,出2-3张加扣5分") + end + + returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData) + + return returnString +end + return M diff --git a/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua b/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua new file mode 100644 index 00000000..4fcc92d2 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua @@ -0,0 +1,827 @@ +local PKMainView = import("main.poker.PKMainView") +local RunFast_PlayerPokerInfoView = import(".RunFast_PlayerPokerInfoView") +local RunFast_PlayerSelfPokerInfoView = import(".RunFast_PlayerSelfPokerInfoView") +local RunFast_GameEvent = import(".RunFast_GameEvent") +local RunFast_ResultView = import(".RunFast_ResultView") +local RunFast_RightPanelView = import(".RunFast_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local RunFast_CardCheck = import(".CardCheck") + +local M = {} + +function M.new() + local self = setmetatable({}, { __index = M }) + self.class = "EXMJWitness" + self:init() + + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +function M:InitView(url) + local _room = DataManager.CurrenRoom + local room = DataManager.CurrenRoom + self._full = true + UIPackage.AddPackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") + getmetatable(M).__index.InitView(self, + "ui://Extend_Poker_RunFastNew/RunFast_Main_New_" .. _room.room_config.people_num) + local user_id = DataManager.SelfUser.account_id + + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. "pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self, true) + tem.visible = false + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + for i = 1, #self._room.player_list do + if self._room.self_player.seat == self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible = false + btn2:Center() + btn2.y = btn2.y + 50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait2() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self.ctr_time = self._view:GetController("time") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + if not _room.self_player.ready then + local round = DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig = DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round > 1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + self._state.selectedIndex = 4 + + self._view:GetChild("btn_back_jiesan").onClick:Set(function() + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + end) + + self:ChangeBgmMusic() + self:EventInit() + UpdateBeat:Add(self.OnUpdate, self) + + self._text_currenRound = self._view:GetChild('Text_CurrenRound') + self._text_maxRound = self._view:GetChild('Text_MaxMaxRound') + + self._cardCheck = RunFast_CardCheck:InitFlag() + self._gamectr._cardCheck = self._cardCheck + self:UpdateRound(0) + + --按钮功能全部未开放 + -- self._view:GetChild('Btn_Spectator').onClick:Set(function() + -- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放") + -- end) + self._view:GetChild('btn_invite').onClick:Set(function() + ViewUtil.ErrorMsg(self._view, "", "该功能还未开放") + end) + + self._view:GetChild('text_roomId').text = self._room.room_id + self._ctr_inClear = self._view:GetController('Inclear') + self._view:GetChild('btn_ready_inClear').onClick:Set(function() + if self.result_view and self.result_view._view then + self._ctr_inClear.selectedIndex = 0 + self.result_view:ClearReady() + else + self.result_view = nil + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + end + end) + ---------------------------------------------------- + --闹钟倒计时报时 + self._leftTime_xiangling = 5 + self._leftTime_bianhong = true + + -----------如果进入观战时,已经开始游戏,则渲染画面------------ + if _room.curren_round > 0 then + self:UpdateRound(_room.curren_round) + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then + -- body + + if self._room.room_config.showlength == 1 then + -- body + head_info._view:GetController("shengyu").selectedIndex = 1 + else + head_info._view:GetController("shengyu").selectedIndex = 0 + end + + -- body + head_info._view:GetChild("shengyu").text = p.hand_count + end + p:Clear() + head_info:MarkBank(p.seat == _room.banker_seat) + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + end + end + ----------- + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = RunFast_RightPanelView.new(self, rightpanel) + + local viewList_witness = self._view:GetChild('comp_witness'):GetChild('list_players') + viewList_witness:SetVirtual() + viewList_witness.itemRenderer = function(index, obj) + obj:GetChild('title').text = room.witness_player_list[index + 1].nick + ImageLoad.Load(room.witness_player_list[index + 1].portrait, obj:GetChild('btn_head')._iconObject) + end + + local btn_witness = self._view:GetChild('btn_pangGuang') + if btn_witness then + btn_witness.onClick:Set(function() + self._view:GetController('witness').selectedIndex = 1 + end) + end + + --直接渲染观战人员 + if room.witness_player_list then + if viewList_witness.numItems == #room.witness_player_list then + viewList_witness:RefreshVirtualList() + else + viewList_witness.numItems = #room.witness_player_list + end + end +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("RunFastNew_PK", string.format("extend/poker/runfast/sound/bgm%d.mp3", 1)) +end + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + getmetatable(M).__index.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + + + _gamectr:AddEventListener(RunFast_GameEvent.EventXiPai, function(...) + printlog("lingmeng pkwitness EventXiPai") + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnMingCard, function(...) + printlog("lingmeng pkwitness OnMingCard") + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnInitCard, function(...) + local arg = { ... } + local round = arg[1] + local cardlist = arg[2] + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible = false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self._ctr_inClear.selectedIndex = 0 + self:UpdateRound(round) + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then + -- body + + if self._room.room_config.showlength == 1 then + -- body + head_info._view:GetController("shengyu").selectedIndex = 1 + else + head_info._view:GetController("shengyu").selectedIndex = 0 + end + + -- body + head_info._view:GetChild("shengyu").text = p.hand_count + end + p:Clear() + head_info:MarkBank(p.seat == _room.banker_seat) + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnIndexMove, function(...) + local arg = { ... } + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + + self.ctr_time.selectedIndex = index + -- for i = 1, #self._player_info do + -- if index == i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + -- if index == 1 then + local card_info = self._player_card_info[index] + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + -- end + self._leftClock_continue = coroutine.start(function() + coroutine.wait(0.02) + card_info:SetOutCardInfo(nil, false) + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + if i == index then + card_info._ctr_time_clock.selectedIndex = 1 + self._tex_leftTime = card_info._view_comp_clock + else + card_info._ctr_time_clock.selectedIndex = 0 + end + -- if self._room.is_new_bout then + -- card_info.ctr_outpoker.selectedIndex = 0 + -- end + end + if self._left_time and self._left_time < 15 then + self._left_time = 15 + end + end) + + + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnBombScore, function(...) + printlog("lingmeng pkwitness OnBombScore") + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPlaySucc, function(...) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/playcard_chup.mp3") + -- self._popEvent = false + local arg = { ... } + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + local lastCardList = arg[7] + self.ctr_time.selectedIndex = 0 + local index = self:GetPos(p.seat) + if index == 1 then + self.caozuo = 0 + end + + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu") ~= nil then + -- body + -- body + if card_number ~= nil then + -- body + head_info._view:GetChild("shengyu").text = card_number + end + end + head_info:SetBaoDan(card_number == 1) + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + card_info._ctr_time_clock.selectedIndex = 0 + + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + -- card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + + -- if self._room.is_new_bout == true then + -- for i = 1, #self._room.player_list do + -- local player = self._room.player_list[i] + -- local card_info_i = self._player_card_info[self:GetPos(player.seat)] + -- if p.seat ~= player.seat then + -- card_info_i:SetOutCardInfo(nil, false) + -- end + -- end + -- self:_Effect(cardstype, p) + -- else + -- if cardstype == 11 and cardstype ~= 12 then + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(self._cardCheck.type, p) + + self:PlaySound(p.self_user.sex, + self:GetSoundFileName(self._cardCheck.type, num, self._room.is_new_bout)) + -- self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + self:PlaySound(p.self_user.sex, "card_1") + end) + end + end) + + + _gamectr:AddEventListener(RunFast_GameEvent.OnPassSuccCheckCard, function(...) + self._popEvent = false + local arg = { ... } + local seat = arg[1] + local cards = arg[2] + --self.MypokerList=cards + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(seat)] + if seat == self._room.self_player.seat then + card_info:ClearCheck() + card_info:InitPoker(cards, false) + end + + self._popEvent = true + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPassSucc, function(...) + self._popEvent = false + local arg = { ... } + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + coroutine.stop(self._leftClock_continue) + card_info._ctr_time_clock.selectedIndex = 0 + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + coroutine.start(function() + coroutine.wait(1) + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnErrorTip, function(...) + local arg = { ... } + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoTips, function(...) + printlog("lingmeng pkwitness OnPiaoTips") + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoAction, function(...) + printlog("lingmeng pkwitness OnPiaoAction") + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnOptions, function(...) + printlog("lingmeng pkwitness OnOptions") + end) + -- 托管 + _gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...) + printlog("lingmeng pkwitness Game_TuoGuan") + end) + _gamectr:AddEventListener(RunFast_GameEvent.OnResult, function(...) + local arg = { ... } + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + -- local energyTab = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible = true + end + + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + if win_seat == self._room.self_player.seat then + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + else + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/lose_music.mp3") + end + coroutine.stop(self._leftClock_continue) + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info._ctr_time_clock.selectedIndex = 0 + self._left_time = 0 + end + -- -- print("11111111111111") + -- coroutine.wait(1) + -- if self._room.self_player.seat == win_seat then + -- local sprint_seat_list = self:GetSpringSeats(info) + -- if #sprint_seat_list > 0 then + -- local url = "ui://Extend_Poker_RunFastNew/Spring" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + -- ViewUtil.PlaySound("RunFastNew_PK", "base/common/sound/win new.mp3") + -- end + -- -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_RunFastNew/Spring" or "ui://Extend_Poker_RunFastNew/Win_Mine" + -- else + -- local beigang = false + -- if #self:GetSpringSeats(info) > 0 then + -- for i = 1, #self:GetSpringSeats(info) do + -- if self:GetSpringSeats(info)[i] == self._room.self_player.seat then + -- local url = "ui://Extend_Poker_RunFastNew/spring2" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + -- beigang = true + -- end + -- end + -- end + -- -- if beigang == false then + -- -- self:CreateRankEff() + -- -- end + -- end + + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:SetBaoDan(false) + + head_info._view:GetChild('text_jifen').text = player.score + -- head_info:PlayScore(player.winscore, win_seat == player.seat) + head_info:PlayScore(player.card_score, win_seat == player.seat) + end + + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + + if player.seat ~= win_seat then + card_info.ctr_outpoker.selectedIndex = 0 + end + if player.seat ~= self._room.self_player.seat then + local oneTime = 7 / 60 + + -- card_info:UpdateHandPoker(player.cards, false, true) + + card_info._view_resultOut:RemoveChildrenToPool() + card_info._ctr_resultOut.selectedIndex = 1 + for i = 1, #player.handCards do + local child_card = card_info._view_resultOut:AddItemFromPool() + card_info:FillPoker(child_card, "", nil, player.handCards[i]) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/fanCard.mp3") + printlog("lingmeng oneTime", oneTime) + coroutine.wait(oneTime) + end + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + -- if #self:GetSpringSeats(info) > 0 then + -- -- -- print("222222222222222222") + -- coroutine.wait(1) + -- else + -- -- -- print("333333333333333333") + -- -- coroutine.wait(2) + -- end + coroutine.wait(2) + + self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, win_seat, 0, + remaincards) + self._ctr_inClear.selectedIndex = 0 + self.result_view:SetDestroryCallback(function() + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info.ctr_outpoker.selectedIndex = 0 + if card_info._ctr_resultOut then + card_info._ctr_resultOut.selectedIndex = 0 + end + end + end) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + -- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow") + -- _actionView.icon = "ui://Common/btn_comfirm" + -- _actionView.onClick:Set(function () + -- --local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:ConformToNextGame() + -- _actionView:Dispose() + -- end) + -- _actionView.xy = Vector2(900, 625) + -- self._view:AddChild(_actionView) + -- else + -- coroutine.wait(4) + -- self.result_view = RunFast_ResultView.new(self._root_view,info,self._room.room_id) + -- self.result_view:Show() + -- end + end) + if over == 1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnResultByDissolve, function(...) + local arg = { ... } + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil + if _room.curren_round > 0 then + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + end + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info._ctr_time_clock.selectedIndex = 0 + end + self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, winseat, dissolve, nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(RunFast_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = { ... } + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible = false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnBompScoreNew, function(...) + local arg = { ... } + local scoreList = arg[1] + for i = 1, #scoreList do + local score = scoreList[i].pomSore + local player = self._room:GetPlayerBySeat(scoreList[i].seat) + local head_info = self._player_info[self:GetPos(scoreList[i].seat)] + head_info:PlayScore(score, true) + head_info:UpdateScore(player.total_score) + end + end) + + --覆盖原始闹钟,原始闹钟仅限麻将使用 + _gamectr:AddEventListener( + GameEvent.TupGuanOpen, + function(...) + ---- print("刷新托管数据=====") + local arg = { ... } + local p = arg[1] + local player_card_info = self._player_card_info[self:GetPos(p.seat)] + self._tex_leftTime = player_card_info._view_comp_clock + self._left_time = tonumber(arg[3]) or 0 + end + ) +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return RunFast_PlayerSelfPokerInfoView.new(tem, self) + end + return RunFast_PlayerPokerInfoView.new(tem, self) +end + +function M:GetPos(seat) + return ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num) +end + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + -- self._text_round.text = string.format("%d / %d 局", round, total_round) + if not self._text_currenRound then + self._text_currenRound = self._view:GetChild('Text_CurrenRound') + end + if not self._text_maxRound then + self._text_maxRound = self._view:GetChild('Text_MaxMaxRound') + end + self._text_currenRound.text = round + self._text_maxRound.text = string.format("/%s局", total_round) +end + +function M:_Effect(type1, player) + if type1 == 1 or type1 == 3 or type1 == 7 then + self._popEvent = true + return + end + local info = self._player_card_info[self:GetPos(player.seat)] + info:PlayEffect(type1, function() + self._popEvent = true + end) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if type == 1 or type == 3 or type == 7 then + local num = self._cardCheck.lastMinCard + if type == 1 then + fileName = string.format("1_%d", num) + elseif type == 3 then + fileName = string.format("2_%d", num) + elseif type == 7 then + fileName = string.format("3_%d", num) + end + else + if not isNewBout and type ~= 6 then + local r = math.random(1, 3) + fileName = "dani_" .. r + else + if type == 8 or type == 12 then + fileName = 5 + else + fileName = type + end + end + end + + return fileName +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 + local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("RunFastNew_PK", sound_path) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua index 10df7cd1..a438bab2 100644 --- a/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua @@ -25,6 +25,7 @@ function ExtendConfig.new() self._viewMap = {} self._viewMap[ViewManager.View_Main] = RunFast_MainView self._viewMap[ViewManager.View_PlayBack] = RunFast_PlayerBackView + return self end @@ -64,8 +65,7 @@ function M:GetGameRule() end function M:GetIconUrl() - return "ui://Extend_Poker_RunFastNew/icon" - -- + return "ui://Lobby/paodekuai2", "ui://Lobby/paodekuai1" end function M:FillRoomConfig(room, _config) @@ -81,7 +81,6 @@ function M:FillRoomData(s2croom) local reload = s2croom["reload"] local _tableInfo = s2croom["tableInfo"] - room.xipaiScore = _tableInfo["xipai_score"] local _config = _tableInfo["config"] @@ -91,7 +90,8 @@ function M:FillRoomData(s2croom) if room.curren_round == 0 and reload then room.curren_round = 1 end - + room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true local playerList = _tableInfo["playerData"] for i = 1, #playerList do local _jp = playerList[i] @@ -134,9 +134,8 @@ function M:FillRoomData(s2croom) room.game_status = 0 if reload then local reloadInfo = s2croom["reloadInfo"] - - - + local bank_seat = reloadInfo["banker_seat"] + room.banker_seat = bank_seat local playing = reloadInfo["playing"] room.curren_turn_seat = reloadInfo["active_seat"] @@ -156,8 +155,6 @@ function M:FillRoomData(s2croom) p.hand_count = info_list[i]["card_size"] p.piao = info_list[i]["piao"] - p.niao = info_list[i]["niao"] - p.daNiao = info_list[i]["daNiao"] p.handCards = info_list[i]["handCards"] p.outCards = info_list[i]["outCards"] local last_outcard = info_list[i]["last_outcard"] @@ -170,7 +167,7 @@ function M:FillRoomData(s2croom) end end else - -- print("aaaaaaaaaaaaaaaa1111111111111111111111111") + -- -- print("aaaaaaaaaaaaaaaa1111111111111111111111111") --pt(s2croom) room.game_status = 1 @@ -197,8 +194,6 @@ function M:FillRoomData(s2croom) p.hand_list = info_list[i]["cards"] p.winscore = info_list[i]["winscore"] p.piao = info_list[i]["piao"] - p.niao = info_list[i]["niao"] - p.daNiao = info_list[i]["daNiao"] p.hand_count = info_list[i]["card_size"] p.thisboomnum = info_list[i]["thisboomnum"] p.open = info_list[i]["open"] @@ -259,4 +254,63 @@ function M:FillPlayBackData(pd_data) room.cmdList = pd_data["cmdList"] end +function M:FillWitnessData(pd_data) + print("==========================FillWitnessData1") + local room = DataManager.CurrenRoom + pt(room) + if _ctr_game == nil then + self:GetGameController() + end + + local _tableInfo = pd_data["tableInfo"] + room.xipaiScore = _tableInfo["xipai_score"] + + local _config = _tableInfo["config"] + room.room_config = RunFast_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + + room.witness_player_list = _tableInfo["playerSpectatorData"] + local playerList = _tableInfo["playerData"] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = RunFast_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = pd_data["owner"] + room.owner_id = owner + room.game_status = 0 +end + +function M:LoadConfigToDetail(data) + return data +end + return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua index b1a7c14c..33520a43 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua @@ -134,7 +134,6 @@ function M:OnEventXiPaiAnim(evt_data) end function M:SendCard(cards, currentCard) - -- print("lingmengSendCard", os.time()) local _data = {} _data["card"] = cards _data["all_card"] = currentCard @@ -187,14 +186,17 @@ function M:OnInitCard(evt_data) local cardlist = evt_data["cards"] local round = evt_data["round"] + local bank_seat = evt_data["bank_seat"] self._cacheEvent:Enqueue( function() for _, player in ipairs(self._room.player_list) do player:Clear() player.hand_count = #cardlist + player.hand_list = cardlist end self._room.curren_round = round + self._room.banker_seat = bank_seat DispatchEvent(self._dispatcher, RunFast_GameEvent.OnInitCard, round, cardlist) end ) @@ -204,12 +206,12 @@ function M:OnBombScore(evt_data) local scoreList = evt_data["gold_list"] self._cacheEvent:Enqueue( function() - for i = 1, #scoreList do - local score = scoreList[i].bom_score - local player = self._room:GetPlayerById(scoreList[i].aid) - player.total_score = player.total_score + score - end - DispatchEvent(self._dispatcher, RunFast_GameEvent.OnBombScore, scoreList) + -- for i = 1, #scoreList do + -- local score = scoreList[i].bom_score + -- local player = self._room:GetPlayerById(scoreList[i].aid) + -- player.total_score = player.total_score + score + -- end + -- DispatchEvent(self._dispatcher, RunFast_GameEvent.OnBombScore, scoreList) end ) end @@ -235,10 +237,13 @@ function M:OnPlaySuccCheck(evt_data) local player = self._room:GetPlayerBySeat(seat) local out_card_list = self:ChangeCodeByFrom(cards, true) player.hand_count = remain + -- if remain ~= 0 then + self._cardCheck:InitLastCard(out_card_list) + -- end local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList, - length) + length, out_card_list) end ) end @@ -282,7 +287,6 @@ function M:OnPassSucc(evt_data) DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPassSucc, p) end ) - end function M:OnPutError(evt_data) @@ -329,8 +333,8 @@ function M:OnOptions(evt_data) function() local lastCardList = self:GetLastCardList(self._room.self_player.seat) local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) - - DispatchEvent(self._dispatcher, RunFast_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass, + lastCardList) end ) end @@ -377,6 +381,8 @@ function M:OnResult(evt_data) function() for i = 1, #info do local p = self._room:GetPlayerBySeat(info[i]["seat"]) + print("lingmeng log200", info[i]["score"], p.total_score) + info[i].card_score = info[i]["score"] - p.total_score p.total_score = info[i]["score"] info[i]["self_user"] = p.self_user end @@ -390,6 +396,8 @@ function M:OnResult(evt_data) function() for i = 1, #info do local p = self._room:GetPlayerBySeat(info[i]["seat"]) + print("lingmeng log200", info[i]["score"], p.total_score) + info[i].card_score = info[i]["score"] - p.total_score p.total_score = info[i]["score"] info[i]["self_user"] = p.self_user end @@ -405,7 +413,7 @@ function M:OnResult(evt_data) info[i]["self_user"] = p.self_user end -- ControllerManager.ChangeController(LoddyController) - DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, result_type, info, winseat, dissolve) end end @@ -730,4 +738,19 @@ function M:LevelRoom(callBack) ) end +--炸弹分显示,新协议 +function M:OnBompScoreNew(evt_data) + local scoreList = evt_data["PlayerScoreList"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].pomSore + local player = self._room:GetPlayerBySeat(scoreList[i].seat) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnBompScoreNew, scoreList) + end + ) +end + return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua index ae9645c8..0363d22a 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua @@ -10,13 +10,12 @@ local RunFast_ResultView = import(".RunFast_ResultView") local RunFast_RightPanelView = import(".RunFast_RightPanelView") local PlayerInfoView = import(".EXPlayerInfoView") local TableBG = import('Game.Data.TableBG') +local RunFast_CardCheck = import(".CardCheck") local M = {} function M.new() setmetatable(M, { __index = PKMainView }) local self = setmetatable({}, { __index = M }) self.class = "RunFast_MainView" - self._full = true - self:init() self._gamectr = ControllerManager.GetController(GameController) return self @@ -31,9 +30,10 @@ local bg_config = { function M:InitView(url) local room = self._room + self._full = true UIPackage.AddPackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") - PKMainView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_" .. room.room_config.people_num, nil, 1, - default_bg, bg_config, nil, "ui://Extend_Poker_RunFastNew/SettingWindow1") + PKMainView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_New_" .. room.room_config.people_num, nil, 1, + default_bg, bg_config, nil) local _room = DataManager.CurrenRoom local user_id = DataManager.SelfUser.account_id local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. "pai") @@ -97,7 +97,7 @@ function M:InitView(url) ErrorMsgTip:Destroy() ErrorMsgTip = nil self._gamectr:LevelRoom(function(res) - ViewUtil.CloseModalWait() + ViewUtil.CloseModalWait2() NetResetConnectWindow.CloseNetReset() ControllerManager.ChangeController(LoddyController) ViewManager.ChangeView(ViewManager.View_Lobby) @@ -115,7 +115,7 @@ function M:InitView(url) self.ctr_state = self._view:GetController("state") self._ctr_action = self._view:GetController("action") - self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + -- self._tex_leftTime = self._view:GetChild("time"):GetChild("title") self.ctr_time = self._view:GetController("time") self._text_round = self._view:GetChild("round") self.ctr_card_eff = self._view:GetController("card_eff") @@ -172,8 +172,8 @@ function M:InitView(url) self:ChangeBgmMusic() self:EventInit() - self._view:GetChild("mask").onClick:Set(function() - self:ResetPoker() + self._view:GetChild("bg_mask").onClick:Set(function() + -- self:ResetPoker() end) local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() @@ -191,18 +191,64 @@ function M:InitView(url) end end - if self._view:GetChild("shengyu") ~= nil then - -- body + --剩余弄在头像上,三人就会有两个剩余 + -- if self._view:GetChild("shengyu") ~= nil then + -- -- body - if room.room_config.Leaf == 1 then - -- body - self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余15张" + -- if room.room_config.Leaf == 1 then + -- -- body + -- self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余15张" + -- else + -- self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余16张" + -- end + -- end + ------------------lingmeng-------------------------- + + -- self._tex_leftTime = self._view:GetChild('Comp_Clock'):GetChild('time') -- 重写 + self._text_currenRound = self._view:GetChild('Text_CurrenRound') + self._text_maxRound = self._view:GetChild('Text_MaxMaxRound') + + self._cardCheck = RunFast_CardCheck:InitFlag() + self._gamectr._cardCheck = self._cardCheck + self:UpdateRound(self._room.curren_round or 0) + + self._view:GetChild('text_roomId').text = self._room.room_id + self._ctr_inClear = self._view:GetController('Inclear') + self._view:GetChild('btn_ready_inClear').onClick:Set(function() + if self.result_view and self.result_view._view then + self._ctr_inClear.selectedIndex = 0 + self.result_view:ClearReady() else - self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余16张" + self.result_view = nil + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + self:ClearOk() end - end + end) + ---------------------------------------------------- + --闹钟倒计时报时 + self._leftTime_xiangling = 5 + self._leftTime_bianhong = true - --打鸟 + 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 + ----------屏幕大小发生变化 + GRoot.inst.onSizeChanged:Set(function() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if player.seat == self._room.self_player.seat then + player_card_info:InitPoker(player.hand_list, false) + else + end + end + end) + + --打鸟 if self._view:GetChild('btn_daNiao') then self._view:GetChild('btn_daNiao').onClick:Set(function() self._gamectr:SendDaNiaoAction(1) @@ -225,7 +271,7 @@ function M:UpdateCard(index) self._room.pai = index local card_info = self._player_card_info[1] -- for i=1,#self._room.player_list do - -- print(i) + -- -- print(i) -- end card_info:updatePoker() for _, player in ipairs(self._room.player_list) do @@ -270,6 +316,7 @@ function M:NewPlayerCardInfoView(tem, index) end function M:OnPlayerEnter(...) + ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/user_enter.mp3") MainView.OnPlayerEnter(self, ...) local arg = { ... } local p = arg[1] @@ -286,6 +333,7 @@ function M:OnPlayerEnter(...) end function M:OnPlayerReady(...) + ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/user_ready.mp3") local arg = { ... } local p = arg[1] local _room = self._room @@ -310,6 +358,7 @@ function M:OnPlayerReady(...) end function M:OnPlayerLeave(...) + ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/user_leave.mp3") MainView.OnPlayerLeave(self, ...) local _room = self._room if not _room.self_player.ready then @@ -379,7 +428,7 @@ function M:EventInit() end -- body - head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "剩" .. p.hand_count .. "张" + head_info._view:GetChild("shengyu").text = p.hand_count end p:Clear() head_info:FillData(p) @@ -399,7 +448,7 @@ function M:EventInit() ViewUtil.ShowModalWait(self._root_view,"等待其它玩家洗牌...") coroutine.start(function() coroutine.wait(3) - ViewUtil.CloseModalWait() + ViewUtil.CloseModalWait2() end) @@ -431,16 +480,21 @@ function M:EventInit() local arg = { ... } local card = arg[1] self.ctr_state.selectedIndex = 1 - self.ctr_card_eff.selectedIndex = 1 - self:PlayCardEff(card) + -- self.ctr_card_eff.selectedIndex = 1 + -- if self._room.room_config.people_num == 3 then + -- self:PlayCardEff(403) + -- end end) _gamectr:AddEventListener(RunFast_GameEvent.OnInitCard, function(...) local arg = { ... } local round = arg[1] local cardlist = arg[2] + self._popEvent = false - + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end if self.result_view ~= nil then self.result_view:Destroy() self.result_view = nil @@ -465,8 +519,9 @@ function M:EventInit() self.rank_view:Dispose() self.rank_view = nil end + self._ctr_inClear.selectedIndex = 0 self:UpdateRound(round) - ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/fapai.mp3") + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/fapai.mp3") local list = _room.player_list for i = 1, #list do local p = list[i] @@ -482,26 +537,37 @@ function M:EventInit() end -- body - head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "剩" .. p.hand_count .. "张" + head_info._view:GetChild("shengyu").text = p.hand_count end - p:Clear() + -- p:Clear() + head_info:MarkBank(p.seat == _room.banker_seat) head_info:FillData(p) local card_info = self._player_card_info[self:GetPos(p.seat)] card_info:Clear() head_info:Ready(false) + if p.seat == self._room.self_player.seat then if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then -- body - card_info:InitPoker(cardlist, true, 1) + card_info:InitPoker(cardlist, false, 1) else - card_info:InitPoker(cardlist, true) + card_info:InitPoker(cardlist, false) end else --card_info:UpdateHandPoker(#cardlist,true,false) --todo --card_info:UpdateRemainCard(#cardlist,true) end end + + if self._room.room_config.people_num == 3 and round == 1 then + local effect = self._view:GetTransition(string.format('to_%s', self:GetPos(self._room.banker_seat))) + effect:Play(1, 0, function() + self._popEvent = true + end) + else + self._popEvent = true + end end) @@ -517,29 +583,49 @@ function M:EventInit() local isNewBout = arg[2] local index = self:GetPos(seat) + self.ctr_time.selectedIndex = index - -- for i=1,#self._player_info do - -- if index==i then - -- -- body - -- local head_info = self._player_info[index] - -- head_info:MarkBank(true) - -- else - -- local head_info = self._player_info[i] - -- head_info:MarkBank(false) - -- end + -- for i = 1, #self._player_info do + -- if index == i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end -- end - if index == 1 then - local card_info = self._player_card_info[index] + -- if index == 1 then + local card_info = self._player_card_info[index] + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + -- end + self._leftClock_continue = coroutine.start(function() + coroutine.wait(0.02) card_info:SetOutCardInfo(nil, false) - -- if self.MypokerList ~= nil then - -- -- body - -- card_info:Clear() - -- card_info:InitPoker(self.MypokerList, false) - -- self.MypokerList = nil - -- end - end - self._left_time = 20 + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + if i == index then + card_info._ctr_time_clock.selectedIndex = 1 + self._tex_leftTime = card_info._view_comp_clock + else + card_info._ctr_time_clock.selectedIndex = 0 + end + -- if self._room.is_new_bout then + -- card_info.ctr_outpoker.selectedIndex = 0 + -- end + end + if self._left_time and self._left_time < 15 then + self._left_time = 15 + end + end) + + if self._room.ming_card ~= nil then self._view:GetTransition("t" .. index):Play() self._room.ming_card = nil @@ -553,16 +639,18 @@ function M:EventInit() _gamectr:AddEventListener(RunFast_GameEvent.OnBombScore, function(...) local arg = { ... } local scoreList = arg[1] - -- for i = 1, #scoreList do - -- 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)] - -- card_info:PlayScore(scoreList[i], true) - -- head_info:UpdateScore(player.total_score) - -- end + for i = 1, #scoreList do + 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)] + card_info:PlayScore(scoreList[i], true) + head_info:UpdateScore(player.total_score) + end end) _gamectr:AddEventListener(RunFast_GameEvent.OnPlaySucc, function(...) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/playcard_chup.mp3") + -- self._popEvent = false local arg = { ... } local p = arg[1] local card_number = arg[2] @@ -570,23 +658,27 @@ function M:EventInit() local num = arg[4] local otherList = arg[5] local length = arg[6] + local lastCardList = arg[7] self.ctr_time.selectedIndex = 0 - local index = self:GetPos(p.seat) if index == 1 then self.caozuo = 0 end + coroutine.stop(self._leftClock_continue) + local head_info = self._player_info[index] if head_info._view:GetChild("shengyu") ~= nil then -- body -- body if card_number ~= nil then -- body - head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "剩" .. card_number .. "张" + head_info._view:GetChild("shengyu").text = card_number end end local card_info = self._player_card_info[index] card_info:SetOutCardInfo(p.out_card_list, false, true) + card_info._ctr_time_clock.selectedIndex = 0 + for i = 1, #otherList do local other_seat = otherList[i] local other_card_info = self._player_card_info[self:GetPos(other_seat)] @@ -596,50 +688,30 @@ function M:EventInit() if index == 1 then card_info:DeleteHandCards(p.out_card_list) else - card_info:SetRemainCardNumber(card_number == 1) + -- card_info:SetRemainCardNumber(card_number == 1) --card_info:UpdateHandPoker(card_number,false,false) -- todo end - if self._room.is_new_bout == true then - for i = 1, #self._room.player_list do - local player = self._room.player_list[i] - local card_info_i = self._player_card_info[self:GetPos(player.seat)] - if p.seat ~= player.seat then - card_info_i:SetOutCardInfo(nil, false) - end - end - -- card_info:PlayCardTypeEff(cardstype) - -- if cardstype~=12 then - -- -- body + -- if self._room.is_new_bout == true then + -- for i = 1, #self._room.player_list do + -- local player = self._room.player_list[i] + -- local card_info_i = self._player_card_info[self:GetPos(player.seat)] + -- if p.seat ~= player.seat then + -- card_info_i:SetOutCardInfo(nil, false) + -- end + -- end + -- self:_Effect(cardstype, p) + -- else + -- if cardstype == 11 and cardstype ~= 12 then + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(self._cardCheck.type, p) + print("lingmeng end _Effect", self._cardCheck.type) + self:PlaySound(p.self_user.sex, + self:GetSoundFileName(self._cardCheck.type, num, self._room.is_new_bout)) + -- self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) - -- if cardstype==10 and length>=6 then - -- -- card_info_i - -- local chuan = UIPackage.CreateObject("Extend_Poker_RunFast", "chuan1") - -- local card_info_i = self._player_card_info[self:GetPos(p.seat)] - - -- card_info_i._mask_liangpai:AddChild(chuan) - -- chuan:GetChild("n0").asMovieClip.playing = true - -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/sunzi.mp3") - -- coroutine.start(function() - -- coroutine.wait(1.5) - -- if chuan~=nil then - -- -- body - -- chuan:Dispose() - -- end - - -- end) - - -- else - -- self:_Effect(cardstype, p) - -- end - -- end - self:_Effect(cardstype, p) - else - if cardstype == 11 and cardstype ~= 12 then - self:_Effect(cardstype, p) - end - end - self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) if card_number == 1 then --self:ChangeBgmMusic(2) self:ChangeBgmMusic(1) @@ -648,13 +720,11 @@ function M:EventInit() end self._cor_sound = nil self._cor_sound = coroutine.start(function() - coroutine.wait(1) self:PlaySound(p.self_user.sex, "card_1") end) end end) - _gamectr:AddEventListener(RunFast_GameEvent.OnPassSuccCheckCard, function(...) self._popEvent = false local arg = { ... } @@ -679,6 +749,7 @@ function M:EventInit() end) _gamectr:AddEventListener(RunFast_GameEvent.OnPassSucc, function(...) + self._popEvent = false local arg = { ... } local p = arg[1] @@ -692,8 +763,14 @@ function M:EventInit() card_info:InitPoker(self.MypokerList, false) self.MypokerList = nil end + coroutine.stop(self._leftClock_continue) + card_info._ctr_time_clock.selectedIndex = 0 card_info:SetOutCardInfo(nil, true) self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + coroutine.start(function() + coroutine.wait(1) + self._popEvent = true + end) end) _gamectr:AddEventListener(RunFast_GameEvent.OnErrorTip, function(...) @@ -759,13 +836,14 @@ function M:EventInit() local card_type = arg[2] local card_number = arg[3] local card_length = arg[4] + local lastCardList = arg[6] local ctr_number = pass == nil and 2 or 1 self.caozuo = 1 --记录是否是自己出牌的阶段 self.pass = pass local m = false local next_seat = self._room.self_player.seat + 1 local card_info = self._player_card_info[1] - --card_info:SetOutCardInfo(nil, false) + card_info:SetOutCardInfo(nil, false) if self.MypokerList ~= nil then -- body card_info:Clear() @@ -779,7 +857,9 @@ function M:EventInit() m = true end local zdts = self._view:GetController("zidongtishi").selectedIndex - self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts) + -- self._player_card_info[1]._cardCheck:InitLastCard(lastCardList) + -- self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts) + card_info:ShowOutCardOption2(lastCardList, ctr_number, m) end) -- 托管 _gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...) @@ -827,10 +907,13 @@ function M:EventInit() local remaincards = arg[4] -- local energyTab = arg[5] local otherpoker_list = self._view:GetChild("otherpoker_list") - + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil if self.MypokerList ~= nil then -- body - local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] card_info:Clear() card_info:InitPoker(self.MypokerList, false) self.MypokerList = nil @@ -841,50 +924,6 @@ function M:EventInit() otherpoker_list.visible = true end - if remaincards then - -- body - local newremaincards = _gamectr:ChangeCodeByFrom(remaincards, true) - table.sort(remaincards) - for i = #newremaincards, 1, -1 do - coroutine.start(function() - coroutine.wait(0.01) - - local flow = newremaincards[i] % 10 - local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 - local card_n = flow * 100 + num - local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker6") - - --local code = self:ChangeCodeByTo(card_n) - -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card_n) - -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") - local card_code_obj = nil - if DataManager.CurrenRoom.pai == 0 then - if card_n == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n .."_1") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n) - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n) - end - else - if card_n == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - --card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n .."_2") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") - end - end - if card_code_obj ~= nil then - card_code_obj:SetScale(0.6, 0.6) - if poker_item ~= nil then - poker_item:AddChild(card_code_obj) - otherpoker_list:AddChild(poker_item) - end - end - end) - end - end if self._cor_sound ~= nil then coroutine.stop(self._cor_sound) self._cor_sound = nil @@ -896,86 +935,102 @@ function M:EventInit() self.destory_win = nil self.destory_win = coroutine.start(function() - -- print("11111111111111") - -- coroutine.wait(1) - if self._room.self_player.seat == win_seat then - local sprint_seat_list = self:GetSpringSeats(info) - if #sprint_seat_list > 0 then - local url = "ui://Extend_Poker_RunFastNew/Spring" - self.WinItem_view = UIPackage.CreateObjectFromURL(url) - self._view:AddChild(self.WinItem_view) - self.WinItem_view:Center() - self.WinItem_view:GetTransition("t0"):Play() - ViewUtil.PlaySound("RunFastNew_PK", "base/common/sound/win new.mp3") - end - -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_RunFastNew/Spring" or "ui://Extend_Poker_RunFastNew/Win_Mine" + if win_seat == self._room.self_player.seat then + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") else - local beigang = false - if #self:GetSpringSeats(info) > 0 then - for i = 1, #self:GetSpringSeats(info) do - if self:GetSpringSeats(info)[i] == self._room.self_player.seat then - local url = "ui://Extend_Poker_RunFastNew/spring2" - self.WinItem_view = UIPackage.CreateObjectFromURL(url) - self._view:AddChild(self.WinItem_view) - self.WinItem_view:Center() - self.WinItem_view:GetTransition("t0"):Play() - beigang = true - end - end - end - -- if beigang == false then - -- self:CreateRankEff() - -- end + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/lose_music.mp3") end + coroutine.stop(self._leftClock_continue) + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info._ctr_time_clock.selectedIndex = 0 + self._left_time = 0 + end + -- -- print("11111111111111") + -- coroutine.wait(1) + -- if self._room.self_player.seat == win_seat then + -- local sprint_seat_list = self:GetSpringSeats(info) + -- if #sprint_seat_list > 0 then + -- local url = "ui://Extend_Poker_RunFastNew/Spring" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + -- ViewUtil.PlaySound("RunFastNew_PK", "base/common/sound/win new.mp3") + -- end + -- -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_RunFastNew/Spring" or "ui://Extend_Poker_RunFastNew/Win_Mine" + -- else + -- local beigang = false + -- if #self:GetSpringSeats(info) > 0 then + -- for i = 1, #self:GetSpringSeats(info) do + -- if self:GetSpringSeats(info)[i] == self._room.self_player.seat then + -- local url = "ui://Extend_Poker_RunFastNew/spring2" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + -- beigang = true + -- end + -- end + -- end + -- -- if beigang == false then + -- -- self:CreateRankEff() + -- -- end + -- end + + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + 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.hp_info ~= nil and player.hp_info.cur_hp ~= nil then - p.hp_info = player.hp_info - head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) - head_info._view:GetChild('zhanji').visible = true - local num = player.hp_info.total_hp - if num > 0 then - head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) - else - head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) - end - card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) - else - local rt = 1 - if self._room.hpOnOff == 1 then - rt = self._room.score_times - end - if over == 1 and self._room.hpOnOff == 1 then - head_info:UpdateScore(player.score / 10) --不可负分 - else - head_info:UpdateScore(player.score * rt) - end - card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + + if player.seat ~= win_seat then + card_info.ctr_outpoker.selectedIndex = 0 end - - if player.seat ~= self._room.self_player.seat then - card_info:UpdateHandPoker(player.cards, false, true) - card_info:SetRemainCardNumber(false) + 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("RunFastNew_PK", "extend/poker/runfast/sound/fanCard.mp3") + printlog("lingmeng oneTime", oneTime) + coroutine.wait(oneTime) + end end end self:ChangeBgmMusic(1) -- if over == 0 then - if #self:GetSpringSeats(info) > 0 then - -- print("222222222222222222") - coroutine.wait(1) - else - -- print("333333333333333333") - -- coroutine.wait(2) - end + -- if #self:GetSpringSeats(info) > 0 then + -- -- -- print("222222222222222222") + -- coroutine.wait(1) + -- else + -- -- -- print("333333333333333333") + -- -- coroutine.wait(2) + -- end + coroutine.wait(2) - self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, + self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, win_seat, 0, remaincards) + self.result_view:SetDestroryCallback(function() + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info.ctr_outpoker.selectedIndex = 0 + if card_info._ctr_resultOut then + card_info._ctr_resultOut.selectedIndex = 0 + end + end + end) self.result_view:Show() if self.WinItem_view ~= nil then self.WinItem_view:Dispose() @@ -990,21 +1045,7 @@ function M:EventInit() local btn_confirm = self.result_view._view:GetChild("btn_confirm") btn_confirm.onClick:Call() end - - -- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow") - -- _actionView.icon = "ui://Common/btn_comfirm" - -- _actionView.onClick:Set(function () - -- --local _gamectr = ControllerManager.GetController(GameController) - -- _gamectr:ConformToNextGame() - -- _actionView:Dispose() - -- end) - -- _actionView.xy = Vector2(900, 625) - -- self._view:AddChild(_actionView) - -- else - -- coroutine.wait(4) - -- self.result_view = RunFast_ResultView.new(self._root_view,info,self._room.room_id) - -- self.result_view:Show() - -- end + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") end) if over == 1 then -- body @@ -1019,8 +1060,18 @@ function M:EventInit() local info = arg[2] local winseat = arg[3] local dissolve = arg[4] - - self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve, nil) + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil + if _room.curren_round > 0 then + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + end + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info._ctr_time_clock.selectedIndex = 0 + end + self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, winseat, dissolve, nil) self.result_view:Show() ControllerManager.ChangeController(LoddyController) self:UnmarkSelfTuoguan() @@ -1065,7 +1116,6 @@ function M:EventInit() self._ctr_action.selectedIndex = 3 self.ctr_state.selectedIndex = 1 end) - _gamectr:AddEventListener(RunFast_GameEvent.OnDaNiaoShow, function(...) local arg = { ... } local seat = arg[1] @@ -1074,6 +1124,16 @@ function M:EventInit() local head_info = self._player_info[self:GetPos(seat)] head_info:ShowPiao(isDa == 0 and 0 or piao) end) + _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:ReConnectForStart() @@ -1082,34 +1142,15 @@ function M:ReConnectForStart() self._state.selectedIndex = 1 self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) - self:UpdateRound(self._room.curren_round) for _, player in ipairs(self._room.player_list) do local player_card_info = self._player_card_info[self:GetPos(player.seat)] local head_info = self._player_info[self:GetPos(player.seat)] head_info:Ready(false) - --如果是体力值不可负分模式 则显示当前的hp值 - if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then - head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) - head_info._view:GetChild('zhanji').visible = true - local num = player.hp_info.total_hp - if num > 0 then - head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) - else - head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) - end - else - local rt = 1 - if self._room.hpOnOff == 1 then - rt = self._room.score_times - end - head_info:UpdateScore(player.total_score * rt) - end - + head_info:UpdateScore(player.total_score) head_info:UpdateLineState(player.line_state) head_info:UpdatePiao(player.piao) + head_info:MarkBank(player.seat == self._room.banker_seat) if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then -- body @@ -1123,7 +1164,7 @@ function M:ReConnectForStart() end -- body - head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "剩" .. player.hand_count .. "张" + head_info._view:GetChild("shengyu").text = player.hand_count end if player.seat == self._room.self_player.seat then if player.open ~= nil and player.open == 0 and self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then @@ -1134,18 +1175,21 @@ function M:ReConnectForStart() player_card_info:InitPoker(player.hand_list, false) end else - player_card_info:SetRemainCardNumber(player.hand_count == 1) + -- player_card_info:SetRemainCardNumber(player.hand_count == 1) if player.hand_count == 1 then - self.bgm_index = 2 + -- self.bgm_index = 2 end end - if self._room.curren_turn_seat ~= player.seat then + if self._room.curren_turn_seat == player.seat then -- head_info:MarkBank(false) - if player.out_card_list[1] == 0 then - player_card_info:SetOutCardInfo(nil, false) - else - player_card_info:SetOutCardInfo(player.out_card_list, false) - end + player_card_info._ctr_time_clock.selectedIndex = 1 + self._tex_leftTime = player_card_info._view_comp_clock + self._left_time = 15 + -- if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + -- else + -- player_card_info:SetOutCardInfo(player.out_card_list, false) + -- end else -- head_info:MarkBank(true) end @@ -1165,26 +1209,21 @@ function M:ReconnectForClearing() head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) head_info._view:GetChild('zhanji').visible = true local num = player.hp_info.total_hp - if num > 0 then - head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) - else - head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) - end - -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + + player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) else local rt = 1 if self._room.hpOnOff == 1 then rt = self._room.score_times end head_info:UpdateScore(player.total_score * rt) - -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) end head_info:UpdateLineState(player.line_state) --head_info._view:GetController("Oener").selectedIndex=0 head_info:UpdatePiao(player.piao) + head_info:MarkBank(player.seat == self._room.banker_seat) if head_info._view:GetChild("shengyu") ~= nil and head_info._view:GetController("shengyu") ~= nil then -- body @@ -1196,14 +1235,14 @@ function M:ReconnectForClearing() end -- body - head_info._view:GetChild("shengyu"):GetChild("shengyu").text = "剩" .. player.hand_count .. "张" + head_info._view:GetChild("shengyu").text = player.hand_count end if player.seat == self._room.self_player.seat then player_card_info:InitPoker(player.hand_list, false) else - player_card_info:UpdateHandPoker(player.hand_list, false, true) + -- player_card_info:UpdateHandPoker(player.hand_list, false, true) end if player.out_card_list[1] == 0 then player_card_info:SetOutCardInfo(nil, false) @@ -1220,8 +1259,17 @@ function M:ReconnectForClearing() coroutine.start(function() coroutine.wait(0.3) - self.result_view = RunFast_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, + self.result_view = RunFast_ResultView.new(self, self._room.player_list, self._room.room_id, 0, win_seat, 0, remaincards) + self.result_view:SetDestroryCallback(function() + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info.ctr_outpoker.selectedIndex = 0 + if card_info._ctr_resultOut then + card_info._ctr_resultOut.selectedIndex = 0 + end + end + end) self.result_view:Show() local card_info = self._player_card_info[1] card_info._view:GetChild("out_card_list").visible = true @@ -1257,10 +1305,10 @@ function M:ReconnectForClearing() else card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") end - -- if card_n == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if card_n == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n .. "_1") - -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. card_n .. "_1") + end card_code_obj:SetScale(0.6, 0.6) poker_item:AddChild(card_code_obj) otherpoker_list:AddChild(poker_item) @@ -1278,156 +1326,167 @@ function M:CreateRankEff() end function M:_Effect(type1, player) - -- body - - if type1 < 7 and type1 ~= 4 and type1 ~= 5 then + if type1 == 1 or type1 == 3 or type1 == 7 then + self._popEvent = true return end - local eff_code = 0 - if type1 == 10 then - eff_code = 2 - elseif type1 == 11 then - eff_code = 3 - elseif type1 == 4 then - eff_code = 4 - elseif type1 == 12 then - return - elseif type1 == 5 then - eff_code = 5 - else - eff_code = 1 - end local info = self._player_card_info[self:GetPos(player.seat)] - local pNode = info._mask_liangpai - local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_" .. eff_code) - -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff2_1") - effect.touchable = false - effect:GetTransition("t0"):Play() - -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) - if eff_code == 3 then - self._view:AddChild(effect) - else - pNode:AddChild(effect) - end - - - if eff_code == 1 then - self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_feiji") - self._view:AddChild(self.eff_feiji) - self.eff_feiji:Center() - self.eff_feiji:GetTransition("t0"):Play() - end - if eff_code == 3 then - effect:Center() - else - if self:GetPos(player.seat) == 1 then - effect.x, effect.y = 0, 24 - else - effect.x, effect.y = 24, 67 - end - end - - - -- effect:Center() - -- if eff_code ==3 then - -- coroutine.start(function() - -- coroutine.wait(1) - -- effect:Dispose() - -- end) - -- else - coroutine.start(function() - coroutine.wait(1) - if self.eff_feiji ~= nil then - self.eff_feiji:Dispose() - end - effect:Dispose() + info:PlayEffect(type1, function() + self._popEvent = true end) - -- end end -- function M:_Effect(type1, player) --- if type1 < 7 and type1 ~= 4 then return end --- local eff_code = 0 --- if type1 == 10 then --顺子 --- eff_code = 2 --- elseif type1 == 11 then --炸 --- eff_code = 3 --- elseif type1 == 4 then --连对 --- eff_code = 4 --- else --- eff_code = 6 --- end --- local info = self._player_card_info[self:GetPos(player.seat)] --- local pNode = info._mask_liangpai --- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/MovieClip" .. eff_code) +-- -- body --- effect.touchable = false - --- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) --- pNode:AddChild(effect) --- if type1 == 10 then --顺子 --- effect.x, effect.y = -400, -200 --- elseif type1 == 11 then --炸 --- effect.x, effect.y = -80, -225 --- elseif type1 == 4 then --连对 --- effect.x, effect.y = -400, -200 --- else --- effect.x, effect.y = -157, -140 --- end --- coroutine.start(function() --- if type1== 10 or type1== 11 or type1== 4 then --- -- body --- coroutine.wait(2) --- effect:Dispose() +-- if type1 < 7 and type1 ~= 4 and type1 ~= 5 then +-- return +-- end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- elseif type1 == 12 then +-- return +-- elseif type1 == 5 then +-- eff_code = 5 -- else --- coroutine.wait(1.2) --- effect:Dispose() +-- eff_code = 1 +-- end +-- local info = self._player_card_info[self:GetPos(player.seat)] +-- local pNode = info._mask_liangpai +-- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_" .. eff_code) +-- -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff2_1") +-- effect.touchable = false +-- effect:GetTransition("t0"):Play() +-- -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) +-- if eff_code == 3 then +-- self._view:AddChild(effect) +-- else +-- pNode:AddChild(effect) -- end --- end) --- if eff_code ==3 then --- coroutine.start(function() --- coroutine.wait(1) --- effect:Dispose() --- end) --- else + +-- if eff_code == 1 then +-- self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_feiji") +-- self._view:AddChild(self.eff_feiji) +-- self.eff_feiji:Center() +-- self.eff_feiji:GetTransition("t0"):Play() +-- end +-- if eff_code == 3 then +-- effect:Center() +-- else +-- if self:GetPos(player.seat) == 1 then +-- effect.x, effect.y = 0, 24 +-- else +-- effect.x, effect.y = 24, 67 +-- end +-- end + + +-- -- effect:Center() +-- -- if eff_code ==3 then +-- -- coroutine.start(function() +-- -- coroutine.wait(1) +-- -- effect:Dispose() +-- -- end) +-- -- else -- coroutine.start(function() --- coroutine.wait(2) +-- coroutine.wait(1) +-- if self.eff_feiji ~= nil then +-- self.eff_feiji:Dispose() +-- end -- effect:Dispose() -- end) --- end +-- -- end -- end +function M:OnTupGuanOpen(...) + ---- print("刷新托管数据=====") + local arg = { ... } + local p = arg[1] + local player_card_info = self._player_card_info[self:GetPos(p.seat)] + self._tex_leftTime = player_card_info._view_comp_clock + self._left_time = tonumber(arg[3]) or 0 +end function M:UpdateRound(round) local total_round = self._room.room_config.Times - self._text_round.text = string.format("%d / %d 局", round, total_round) + -- self._text_round.text = string.format("%d / %d 局", round, total_round) + if not self._text_currenRound then + self._text_currenRound = self._view:GetChild('Text_CurrenRound') + end + if not self._text_maxRound then + self._text_maxRound = self._view:GetChild('Text_MaxMaxRound') + end + self._text_currenRound.text = round + self._text_maxRound.text = string.format("/%s局", total_round) end +-- function M: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_%d", i, (self._state.selectedIndex % 2) + 1)) +-- _player_info[i] = PlayerInfoView.new(tem, self) +-- tem.visible = false +-- end +-- end + +-- function M:GetSoundFileName(type, num, isNewBout) +-- local fileName +-- if isNewBout then +-- if type > 6 or type == 4 then +-- if type == 8 or type == 9 then +-- type = 7 +-- end +-- fileName = tostring(type) +-- elseif type > 2 then +-- fileName = string.format("3_%d", num) +-- else +-- fileName = string.format("%d_%d", type, num) +-- end +-- else +-- math.randomseed(os.time()) +-- if type > 2 and type ~= 11 then +-- local r = math.random(1, 3) +-- fileName = "dani_" .. r +-- elseif type == 11 then +-- fileName = tostring(type) +-- else +-- fileName = string.format("%d_%d", type, num) +-- end +-- end +-- return fileName +-- end + function M:GetSoundFileName(type, num, isNewBout) local fileName - if isNewBout then - if type > 6 or type == 4 then - if type == 8 or type == 9 then - type = 7 - end - fileName = tostring(type) - elseif type > 2 then + if type == 1 or type == 3 or type == 7 then + local num = self._cardCheck.lastMinCard + if type == 1 then + fileName = string.format("1_%d", num) + elseif type == 3 then + fileName = string.format("2_%d", num) + elseif type == 7 then fileName = string.format("3_%d", num) - else - fileName = string.format("%d_%d", type, num) end else - math.randomseed(os.time()) - if type > 2 and type ~= 11 then + if not isNewBout and type ~= 6 then local r = math.random(1, 3) fileName = "dani_" .. r - elseif type == 11 then - fileName = tostring(type) else - fileName = string.format("%d_%d", type, num) + if type == 8 or type == 12 then + fileName = 5 + else + fileName = type + end end end + return fileName end @@ -1493,6 +1552,13 @@ function M:ResetPoker() self._player_card_info[1]:ResetPoker() end +----结算准备时清理桌面 +function M:ClearOk() + for i = 1, #self._player_card_info do + self._player_card_info[i]:Clear() + end +end + function M:PlaySound(sex, path) local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path) @@ -1509,6 +1575,7 @@ function M:ChangeBgmMusic(bgm_index) end function M:OnPlayerEnter(...) + ViewUtil.PlaySound("RunFastNew_PK", "base/main_majiang/sound/user_enter.mp3") local arg = { ... } local p = arg[1] for i = 1, #self._room.player_list do @@ -1529,7 +1596,7 @@ function M:OnPlayerEnter(...) ErrorMsgTip:Destroy() ErrorMsgTip = nil self._gamectr:LevelRoom(function(res) - ViewUtil.CloseModalWait() + ViewUtil.CloseModalWait2() NetResetConnectWindow.CloseNetReset() ControllerManager.ChangeController(LoddyController) ViewManager.ChangeView(ViewManager.View_Lobby) @@ -1560,6 +1627,9 @@ function M:Destroy() coroutine.stop(card_info_i.cor_init_poker) end end + GRoot.inst.onSizeChanged:Set(function() + + end) PKMainView.Destroy(self) UIPackage.RemovePackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") end diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua index 60755cff..4865ea8c 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua @@ -8,6 +8,8 @@ local RunFast_PlayerSelfCardInfoView = import('.RunFast_PlayerSelfPokerInfoView' local PlayerInfoView = import('.EXPlayerInfoView') local RunFast_RightPanelView = import(".RunFast_RightPanelView") local RunFast_ResultView = import(".RunFast_ResultView") +local RunFast_CardCheck = import(".CardCheck") + local M = {} local RunFast_Record_Event = { @@ -15,7 +17,8 @@ local RunFast_Record_Event = { Evt_Pass = 'pass', Evt_NewRound = 'newindex', Evt_result = 'result', - Evt_Result = 'Result' + Evt_Result = 'Result', + Evt_Opt = 'prompt' } local default_bg = 1 @@ -42,8 +45,9 @@ function M:InitView(url) end self._gamectr = ControllerManager.GetController(GameController) UIPackage.AddPackage('extend/poker/runfast/ui/Extend_Poker_RunFastNew') - PKPlayBackView.InitView(self, 'ui://Extend_Poker_RunFastNew/RunFast_Main_' .. self._room.room_config.people_num, + PKPlayBackView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_New_" .. room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') self._player_card_info = {} local _player_card_info = self._player_card_info @@ -78,13 +82,19 @@ function M:InitView(url) else self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' end + self._ctr_inClear = self._view:GetController('Inclear') + + + self._cardCheck = RunFast_CardCheck:InitFlag() + self._gamectr._cardCheck = self._cardCheck + self._eventmap = {} self._cmdmap = {} self._cmdmap[RunFast_Record_Event.Evt_OutCard] = self.CmdOutCard self._cmdmap[RunFast_Record_Event.Evt_Pass] = self.CmdPass self._cmdmap[RunFast_Record_Event.Evt_NewRound] = self.CmdNewRound self._cmdmap[RunFast_Record_Event.Evt_result] = self.Cmdresult - self._cmdmap[RunFast_Record_Event.Evt_Result] = self.CmdResult + self._cmdmap[RunFast_Record_Event.Evt_Opt] = self.CmdOpt end function M:NewPlayerPokerInfoView(view, index) @@ -95,12 +105,14 @@ function M:NewPlayerPokerInfoView(view, index) end function M:FillRoomData(data) - print("hidezhanji 1111") + -- print("hidezhanji 1111") + self._currentStep = 1 - DataManager.CurrenRoom.pai = 0 local room = DataManager.CurrenRoom + self._room = DataManager.CurrenRoom local _player_card_info = self._player_card_info local roominfo_panel = self._view:GetChild('roominfo_panel1') + self._room.pai = 0 roominfo_panel:GetChild('tex_roomid').text = data.info.roomid roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() @@ -111,13 +123,12 @@ function M:FillRoomData(data) local head_info = self._player_info[self:GetPos(p.seat)] if p.total_hp then - print("hidezhanji 2222") + -- print("hidezhanji 2222") head_info._view:GetChild('zhanji').visible = false if room.hpOnOff == 1 or room:checkHpNonnegative() then head_info._view:GetChild('zhanji').visible = true - head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) end end head_info:FillData(p) @@ -129,10 +140,36 @@ function M:FillRoomData(data) head_info:UpdatePiao(p.piao) end - self:UpdateRound() + self:UpdateRound(self._room.curren_round) self:GenerateAllStepData(data) self:ShowStep(1) + self:Play() +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild("panel_record"):GetChild("btn_play") + if self._play then + btn_play:GetController("state").selectedIndex = 1 + else + btn_play:GetController("state").selectedIndex = 0 + end + --开始时,隐藏显示结算界面 + if state then + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + if self.result_view then + self.result_view._root_view:RemoveFromParent() + self.result_view:Destroy() + self._ctr_inClear.selectedIndex = 0 + end + self.result_view = nil + end end function M:ShowStep(index) @@ -148,13 +185,19 @@ function M:ShowStep(index) p.out_card_list = step.player_card_data[i].out_card_list p.hand_left_count = #p.hand_list + if step.cmd == RunFast_Record_Event.Evt_Opt and step.seat == p.seat then + info._view:GetController('out_card_option2').selectedIndex = 1 + else + info._view:GetController('out_card_option2').selectedIndex = 0 + end + if p.seat ~= self._room.self_player.seat then info:UpdateHandPoker(p.hand_list, false, true) else info:InitPoker(p.hand_list, false) end + info:SetOutCardInfo(nil, false) end - if step.cmd == RunFast_Record_Event.Evt_OutCard then local seat = step.current_out_seat local p = self._room:GetPlayerBySeat(seat) @@ -163,6 +206,13 @@ function M:ShowStep(index) local card_list = self._gamectr:ChangeCodeByFrom(card, true) info:SetOutCardInfo(card_list, false) self:ClearNextSeatOutCard(seat) + + self._cardCheck:InitLastCard(card_list) + self:_Effect(self._cardCheck.type, p) + + self:PlaySound(p.self_user.sex, + self:GetSoundFileName(self._cardCheck.type, num, self:GetIsNewBout(seat) + )) end if step.cmd == RunFast_Record_Event.Evt_Pass then @@ -180,16 +230,91 @@ function M:ShowStep(index) end end if step.cmd == RunFast_Record_Event.Evt_result then - local result = step.result - for i = 1, #result do - local card_info = self._player_card_info[self:GetPos(result[i].seat)] + local data = step.data + local over = 0 + local info = data.win.info + local win_seat = data.win.winseat + local remaincards = {} + -- local energyTab = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible = true + end - if result[i].entrust ~= nil and result[i].entrust == true then - local head_info = self._player_info[self:GetPos(result[i].seat)] - head_info:MarkTuoguan() + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + if win_seat == self._room.self_player.seat then + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + else + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/lose_music.mp3") end - -- head_info:UpdateScore(result[i].score) - card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + coroutine.stop(self._leftClock_continue) + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info._ctr_time_clock.selectedIndex = 0 + self._left_time = 0 + end + + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + + end + + coroutine.wait(2) + + self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, win_seat, 0, + remaincards) + self.result_view:SetDestroryCallback(function() + for i = 1, #self._player_card_info do + local card_info = self._player_card_info[i] + card_info.ctr_outpoker.selectedIndex = 0 + if card_info._ctr_resultOut then + card_info._ctr_resultOut.selectedIndex = 0 + end + end + end) + self.result_view:Show() + self.result_view._root_view:RemoveFromParent() + self._view:AddChildAt(self.result_view._root_view, + self._view:GetChildIndex(self._view:GetChild('mask_tips')) - 1) + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/end_music.mp3") + end) + if over == 1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) end end if step.cmd == RunFast_Record_Event.Evt_Result then @@ -199,9 +324,9 @@ function M:ShowStep(index) local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) self._view:AddChildAt(self.result_view._view, num) else - if self.result_view then - self.result_view:Dispose() - end + -- if self.result_view then + -- self.result_view:Dispose() + -- end end end @@ -262,8 +387,7 @@ end function M:Cmdresult(cmd, index) local data = self:CopyLastStep(index) data.cmd = cmd.cmd - data.result = cmd.data.result - data.win_seat = cmd.seat + data.data = cmd.data end function M:CmdResult(cmd, index) @@ -276,6 +400,12 @@ function M:CmdResult(cmd, index) end end +function M:CmdOpt(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat +end + function M:CopyLastStep(index) local step = {} local last_step = self._step[index] @@ -303,9 +433,17 @@ function M:ClearNextSeatOutCard(currenOutCardSeat) card_info:SetOutCardInfo(nil, false) end -function M:UpdateRound() - local round = self._room.curren_round - self._tex_round.text = string.format('第 %d 局', round) +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + -- self._text_round.text = string.format("%d / %d 局", round, total_round) + if not self._text_currenRound then + self._text_currenRound = self._view:GetChild('Text_CurrenRound') + end + if not self._text_maxRound then + self._text_maxRound = self._view:GetChild('Text_MaxMaxRound') + end + self._text_currenRound.text = round + self._text_maxRound.text = string.format("/%s局", total_round) end function M:NextRecordPlay() @@ -318,10 +456,10 @@ function M:NextRecordPlay() self._speed = 1 self._playFoward = true self:ChangeTextSpeed() - if self.result_view then - self.result_view:Dispose() - self.result_view = nil - end + -- if self.result_view then + -- self.result_view:Dispose() + -- self.result_view = nil + -- end end function M:LastRecordPlay() @@ -333,81 +471,82 @@ function M:LastRecordPlay() self._speed = 1 self._playFoward = true self:ChangeTextSpeed() - if self.result_view then - self.result_view:Dispose() - self.result_view = nil - end + -- if self.result_view then + -- self.result_view:Dispose() + -- self.result_view = nil + -- end end -function M:Play() - self:ChangeAlpha() - self:ChangePlayState(not self._play) - if not self._play then +function M:_Effect(type1, player) + if type1 == 1 or type1 == 3 or type1 == 7 then + self._popEvent = true return end - if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then - self._currentStep = 0 - self._speed = 1 - self._playFoward = true - self:ChangeTextSpeed() - end + local info = self._player_card_info[self:GetPos(player.seat)] + info:PlayEffect(type1, function() + self._popEvent = true + end) end -function M:ChangePlayState(state) - self._play = state - self:ChangeTextSpeed() - local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') - if self._play then - btn_play:GetController('state').selectedIndex = 1 - else - btn_play:GetController('state').selectedIndex = 0 - end -end - -function M:ChangeTextSpeed() - local str1 = self._play and self._speed or '' - self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 - local str2 = - not self._play and (self._playFoward and '播放暂停' or '回退暂停') or - self._playFoward and (self._speed == 1 and '播放' or '快进') or - (self._speed == 1 and '回退' or '快退') - self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 - local str3 = self._play and '倍速度' or '' - self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 -end - -function M:CmdLeftArrows() - self:ChangeAlpha() - self:ChangePlayState(true) - if not self._playFoward then - if self._speed < 16 then - self._speed = self._speed * 2 - else - self._speed = 1 +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if type == 1 or type == 3 or type == 7 then + local num = self._cardCheck.lastMinCard + if type == 1 then + fileName = string.format("1_%d", num) + elseif type == 3 then + fileName = string.format("2_%d", num) + elseif type == 7 then + fileName = string.format("3_%d", num) end - self:ChangeTextSpeed() else - self._speed = 1 - self._playFoward = false - self:ChangeTextSpeed() + if not isNewBout and type ~= 6 then + local r = math.random(1, 3) + fileName = "dani_" .. r + else + if type == 8 or type == 12 then + fileName = 5 + else + fileName = type + end + end + end + + return fileName +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 + local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("RunFastNew_PK", sound_path) +end + +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false end end -function M:CmdRightArrows() - self:ChangeAlpha() - self:ChangePlayState(true) - if self._playFoward then - if self._speed < 16 then - self._speed = self._speed * 2 - else - self._speed = 1 - end - self:ChangeTextSpeed() - else - self._speed = 1 - self._playFoward = true - self:ChangeTextSpeed() +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false end function M:OnUpdate() diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua index de0a09b1..66d2b58e 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua @@ -29,7 +29,8 @@ function M:init() self.ctr_outpoker = view:GetController("output") self.outpoker_list = view:GetChild(self.out_card_data["parent"]) - self.hand_card_list = view:GetChild("hand_card_list") + -- self.hand_card_list = view:GetChild("hand_card_list") + self.hand_card_list = view:GetChild("list_backHand") self.ctr_one_card = view:GetController("one_card") self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") @@ -37,10 +38,119 @@ function M:init() self.text_bomb_score = view:GetChild("Score") self.ani_bomb_score = view:GetTransition("score") self.ani_result_score = view:GetTransition("score_1") + + ------------------------------lingmeng------------------------ + + self._view_Out = self._view:GetChild('List_Out') + self._view_resultOut = self._view:GetChild('list_resultOut') + self._ctr_resultOut = self._view:GetController('resultOut') + self._ctr_time_clock = self._view:GetController('time_clock') + self._view_comp_clock = self._view:GetChild('Comp_Clock') + -------------------------------------------------------------- end +-- function M:SetOutCardInfo(cardlist, isPass, isAnim) +-- self.outpoker_list:RemoveChildren(0, -1, true) +-- if cardlist == nil then +-- if isPass == true then +-- self.ctr_outpoker.selectedIndex = 2 +-- else +-- self.ctr_outpoker.selectedIndex = 0 +-- end +-- else +-- if isAnim then +-- if self.move_cor then +-- coroutine.stop(self.move_cor) +-- self.move_cor = nil +-- end +-- local time = 0.1 +-- for i = 1, #cardlist do +-- local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") +-- local code = self:ChangeCodeByTo(cardlist[i]) +-- -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) +-- -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") +-- local card_code_obj +-- -- if DataManager.CurrenRoom.pai==0 then +-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) +-- -- else +-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") +-- -- end +-- -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then +-- -- -- body +-- -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code.."_1") +-- -- end +-- if DataManager.CurrenRoom.pai == 0 then +-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then +-- -- body +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") +-- else +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) +-- end +-- else +-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then +-- -- body +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") +-- else +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") +-- end +-- end +-- if card_code_obj == nil then +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") +-- end +-- poker_item:AddChild(card_code_obj) +-- --local poker = self:CreatPoker(cardlist[i],0.7) +-- self.outpoker_list:AddChild(poker_item) +-- poker_item.xy = Vector2.New(self.out_card_data["start_x"], self.out_card_data["start_y"]) +-- poker_item:TweenMove( +-- self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item, self.out_card_data +-- ["maxcount_x"], 1.5), time) +-- --card_code_obj +-- -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) +-- -- card_code_obj:SetScale(x,x) +-- -- end) +-- card_code_obj:SetScale(1.5, 1.5) +-- end +-- self.move_cor = coroutine.start(function() +-- coroutine.wait(0.1) +-- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/chupai.mp3") +-- end) +-- else +-- for i = 1, #cardlist do +-- local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") +-- local code = self:ChangeCodeByTo(cardlist[i]) +-- local card_code_obj +-- if DataManager.CurrenRoom.pai == 0 then +-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then +-- -- body +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") +-- else +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) +-- end +-- else +-- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then +-- -- body +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") +-- else +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") +-- end +-- end +-- if card_code_obj == nil then +-- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") +-- end +-- card_code_obj:SetScale(1.5, 1.5) +-- poker_item:AddChild(card_code_obj) +-- --local poker = self:CreatPoker(cardlist[i],0.7) +-- self.outpoker_list:AddChild(poker_item) +-- poker_item.xy = self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item, +-- self.out_card_data["maxcount_x"], 1.5) +-- end +-- end +-- --self.ctr_outpoker.selectedIndex = 1 +-- end +-- end + function M:SetOutCardInfo(cardlist, isPass, isAnim) - self.outpoker_list:RemoveChildren(0, -1, true) + self._view_Out:RemoveChildren(0, -1, true) if cardlist == nil then if isPass == true then self.ctr_outpoker.selectedIndex = 2 @@ -48,60 +158,17 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim) self.ctr_outpoker.selectedIndex = 0 end else + self.ctr_outpoker.selectedIndex = 1 if isAnim then if self.move_cor then coroutine.stop(self.move_cor) self.move_cor = nil end - local time = 0.1 for i = 1, #cardlist do - local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") + local poker_item = self._view_Out:AddItemFromPool() local code = self:ChangeCodeByTo(cardlist[i]) - -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) - -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - local card_code_obj - -- if DataManager.CurrenRoom.pai==0 then - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) - -- else - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - -- end - -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code.."_1") - -- end - if DataManager.CurrenRoom.pai == 0 then - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - end - else - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - end - end - if card_code_obj == nil then - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") - end - --card_code_obj:SetScale(1,1) - poker_item:AddChild(card_code_obj) - --local poker = self:CreatPoker(cardlist[i],0.7) - self.outpoker_list:AddChild(poker_item) - poker_item.xy = Vector2.New(self.out_card_data["start_x"], self.out_card_data["start_y"]) - poker_item:TweenMove( - self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item, self.out_card_data - ["maxcount_x"], 1), time) - --card_code_obj - -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) - -- card_code_obj:SetScale(x,x) - -- end) - card_code_obj:SetScale(0.7, 0.7) + + self:FillPoker(poker_item, "", cardlist[i]) end self.move_cor = coroutine.start(function() coroutine.wait(0.1) @@ -109,38 +176,13 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim) end) else for i = 1, #cardlist do - local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") + local poker_item = self._view_Out:AddItemFromPool() + local code = self:ChangeCodeByTo(cardlist[i]) - local card_code_obj - if DataManager.CurrenRoom.pai == 0 then - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - end - else - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then - -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - else - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") - end - end - if card_code_obj == nil then - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") - end - card_code_obj:SetScale(0.7, 0.7) - poker_item:AddChild(card_code_obj) - --local poker = self:CreatPoker(cardlist[i],0.7) - self.outpoker_list:AddChild(poker_item) - poker_item.xy = self:GetOutCardEndPokerPos(i, #cardlist, self.outpoker_list, poker_item, - self.out_card_data["maxcount_x"], 1) + + self:FillPoker(poker_item, "", cardlist[i]) end end - --self.ctr_outpoker.selectedIndex = 1 end end @@ -155,7 +197,7 @@ function M:GetOffSet(cardLength) -- 15 -70 if cardLength > 8 then return 52 --40 else - return -cardLength * 5 + 80 + return -cardLength * -10 + 60 end end @@ -178,7 +220,7 @@ function M:GetOutCardEndFirstPokerPos(count, parent_com, poker_obj, max_count, s end function M:GetOutCardEndPokerPos(index, count, parent_com, poker_obj, max_count, scale) - local offset_x, offset_y = self:GetOffSet(count), -50 + local offset_x, offset_y = self:GetOffSet(count), -100 local start_pos = self:GetOutCardEndFirstPokerPos(count, parent_com, poker_obj, max_count, scale) local poker_width, poker_height = poker_obj.width * scale, poker_obj.height * scale local parent_width, parent_height = parent_com.width, parent_com.height @@ -187,6 +229,7 @@ function M:GetOutCardEndPokerPos(index, count, parent_com, poker_obj, max_count, pos_x = (index - max_count - 1) * offset_x pos_y = pos_y + poker_height + offset_y end + return Vector2.New(pos_x, pos_y) end @@ -272,8 +315,9 @@ function M:UpdateHandPoker(cardList, isPlayAni, isMing) else for i = card_length, 1, -1 do local code = isMing == true and new_card_list[i] or 0 - local poker = self:CreatPoker1(code, 0.4) - self.hand_card_list:AddChild(poker) + local card_number_code = self:ChangeOneCodeByFrom(cardList[i]) + local btn_card = self.hand_card_list:AddItemFromPool() + self:FillPoker(btn_card, "", card_number_code) end end end @@ -291,24 +335,145 @@ function M:SetRemainCardNumber(isPlay) --end end +function M:PlayEffect(type, callback) + Timer.New(function() + local fristCard = self._view_Out:GetChildAt(0) + local lastCard = self._view_Out:GetChildAt(self._view_Out.numItems - 1) + local fristXy = self._view_Out:GlobalToLocal(fristCard:LocalToGlobal(Vector2.New( + fristCard.width * 0, + fristCard.height * 0.5))) + local lastXy = self._view_Out:GlobalToLocal(lastCard:LocalToGlobal( + Vector2.New(lastCard.width * 1, + lastCard.height * 0.5))) + local effect = "" + local y = 0 + local x = 0 + local width = 0 + if type == 10 then + effect = "te_liandui" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + elseif type == 4 then + effect = "te_sandaidui" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + elseif type == 11 then + effect = "te_sandaidan" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + elseif type == 2 then + effect = "te_shunzi" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + width = (lastXy.x - fristXy.x) / 1.5 + elseif type == 5 or type == 8 or type == 12 then + effect = "te_feiji" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + width = (lastXy.x - fristXy.x) / 1.5 + elseif type == 6 then + effect = "te_zhadan" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + elseif type == 9 then + effect = "te_sidaisab" + y = self._view_Out.y + fristXy.y + x = self._view_Out.x + (lastXy.x + fristXy.x) / 2 + end + if #effect > 0 then + local obj = UIPackage.CreateObjectFromURL(string.format("ui://Extend_Poker_RunFastNew/%s", effect)) + obj.visible = false + self._view:AddChild(obj) + obj:SetScale(1.3, 1.3) + if y ~= 0 then + obj.y = y + end + if x ~= 0 then + obj.x = x + end + if width ~= 0 then + obj.width = width + end + obj.visible = true + if type == 2 then + obj:GetTransition('t0'):Play(1, 0, function() + obj:GetChild('n11'):TweenMoveX(width * 1.03, 0.3):OnComplete(function() + obj:Dispose() + callback() + end) + obj:GetChild('n12'):TweenMoveX(width * 1.03 - 121, 0.3) + obj:GetChild('n11'):TweenFade(0, 0.3) + obj:GetChild('n12'):TweenFade(0, 0.3) + end) + elseif type == 5 or type == 8 or type == 12 then + obj:GetTransition('t0'):Play(1, 0, function() + obj:GetChild('n13'):TweenMoveX(width * 0.7, 0.4):OnComplete(function() + obj:Dispose() + callback() + end) + obj:GetChild('n14'):TweenMoveX(width * 0.7 - 120, 0.4) + obj:GetChild('n13'):TweenFade(1, 0.2):OnComplete(function() + obj:GetChild('n13'):TweenFade(0, 0.4) + obj:GetChild('n14'):TweenFade(0, 0.4) + end) + end) + elseif type == 6 then + obj:GetTransition('t0'):Play(1, 0, function() + obj:Dispose() + end) + callback() + else + obj:GetTransition('t0'):Play(1, 0, function() + obj:Dispose() + callback() + end) + end + else + callback() + end + end, Time.deltaTime, 1, false):Start() +end + +function M:ChangeOneCodeByFrom(card) + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:FillPoker(poker, prefix, num, code) + if num ~= nil then + code = self:ChangeCodeByTo(num) + end + local suffix = code == 310 and + (DataManager.CurrenRoom.pai == 0 and (DataManager.CurrenRoom.room_config.Heart10 == 2 and "_1" or "") or "_2") or + "" + code = code == 1 and "00" or code + if not poker.icon then + poker:GetChild('icon').url = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, code, suffix) + else + poker.icon = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, code, suffix) + end +end + function M:CreatPoker1(poker, scale, bank) local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker" .. scale * 10) local code = self:ChangeCodeByTo(poker) local card_code_obj if DataManager.CurrenRoom.pai == 0 then - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") else card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) end else - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - --card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") else card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") end @@ -327,20 +492,17 @@ function M:CreatPoker(poker, scale, bank) local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker" .. 12.5) local code = self:ChangeCodeByTo(poker) local card_code_obj - if DataManager.CurrenRoom.pai == 0 then - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_1") else card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) end else - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") - card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code .. "_2") else card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") end @@ -348,7 +510,6 @@ function M:CreatPoker(poker, scale, bank) if card_code_obj == nil or bank == 1 then card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") end - card_code_obj:SetScale(scale, scale) poker_item:AddChild(card_code_obj) @@ -370,6 +531,8 @@ function M:Clear() self:SetOutCardInfo(nil, false) self.hand_card_list:RemoveChildren(0, -1, true) self._mask_liangpai:RemoveChildren(0, -1, true) + self._view_Out:RemoveChildren(0, -1, true) + self._view_resultOut:RemoveChildren(0, -1, true) end function M:Destroy() diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua index 72b60b28..9b0e56c8 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua @@ -4,6 +4,7 @@ --- local RunFast_PlayerPokerInfoView = import('.RunFast_PlayerPokerInfoView') local RunFast_CardType = import('.RunFast_CardType') +local RunFast_CardCheck = import(".CardCheck") local CardView = { btn_card = nil, @@ -56,7 +57,7 @@ function M:init() self.hand_card_list = self._view:GetChild('hand_card_list') self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') self._mask_liangpai = self._view:GetChild('mask_liangpai') - self.card_width = 129 + self.card_width = 171 self.cards_view = self._view:GetChild('hand_poker_c') self.card_list = {} self.out_card_list = {} @@ -77,33 +78,146 @@ function M:init() self.send_card = {} self.tips_click_count = 0 self:BtnEvent() + + ------------------------------lingmeng------------------------ + self.touchMoveEndFun = handler(self, self.TouchMoveEnd) + + self._view_handCard = self._view:GetChild('List_HandCard') + self._view_Out = self._view:GetChild('List_Out') + + self._cardCheck = RunFast_CardCheck:InitFlag() + self._ctr_time_clock = self._view:GetController('time_clock') + self._view_comp_clock = self._view:GetChild('Comp_Clock') + -------------------------------------------------------------- end -function M:InitPoker(pokerList, isPlayAni, open) - -- self.zhizhanctr_select=0 - -- self.zhizhantype=0 - -- self.zhizhannumber=0 - -- self.zhizhanlength=0 - -- self.zhizhanmustPutMaxCard=0 - -- self.zhizhanplay=0 - -- self.zhizhanzdts=0 - local cs = 1.35 - if DataManager.CurrenRoom.cardsize == 0 then - cs = 1.45 - elseif DataManager.CurrenRoom.cardsize == 1 then - cs = 1.35 - elseif DataManager.CurrenRoom.cardsize == 2 then - cs = 1.25 - end +-- function M:InitPoker(pokerList, isPlayAni, open) +-- -- self.zhizhanctr_select=0 +-- -- self.zhizhantype=0 +-- -- self.zhizhannumber=0 +-- -- self.zhizhanlength=0 +-- -- self.zhizhanmustPutMaxCard=0 +-- -- self.zhizhanplay=0 +-- -- self.zhizhanzdts=0 +-- local cs = 1.25 +-- -- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize) +-- if DataManager.CurrenRoom.cardsize == 0 then +-- cs = 2.5 +-- elseif DataManager.CurrenRoom.cardsize == 1 then +-- cs = 2 +-- elseif DataManager.CurrenRoom.cardsize == 2 then +-- cs = 1.75 +-- end +-- print("lingmengInitPoker", pokerList, isPlayAni, open) +-- if self.cor_init_poker ~= nil then +-- coroutine.stop(self.cor_init_poker) +-- end +-- -- -- print(vardump(self.card_list)) +-- self.cor_init_poker = nil +-- self.card_list = {} +-- self.cards_view:RemoveChildren(0, -1, true) +-- if isPlayAni == true then +-- self.cor_init_poker = +-- coroutine.start( +-- function() +-- self._mainView._popEvent = false +-- if self._mainView._rightPanelView._settingView ~= nil then +-- self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) +-- end +-- table.sort(pokerList) + +-- for i = 1, #pokerList do +-- local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) +-- local card_flower_code = pokerList[i] +-- local btn_card = self:CreatPoker(card_number_code, cs, open) +-- local x, y = self._view.width / 2 + 100, -200 +-- btn_card:SetXY(x, y) +-- btn_card.alpha = 0 +-- btn_card.touchable = false +-- -- coroutine.wait(0.05) +-- self.cards_view:AddChild(btn_card) +-- local card_view = NewCardView(btn_card, card_number_code, card_flower_code) +-- self.card_list[#self.card_list + 1] = card_view + +-- table.sort(self.card_list, tableSortNumber) + +-- if i == #pokerList then +-- for j = 1, #self.card_list do +-- local card = self.card_list[j] +-- card.btn_card.touchable = true +-- if open ~= 1 then +-- -- body +-- self:AddCardMoveEvent(card) +-- end +-- end +-- end +-- end +-- for j = #self.card_list, 1, -1 do +-- -- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3') +-- local card_view = self.card_list[j] +-- card_view.index = j +-- self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + +-- card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) +-- DSTween.To( +-- 0.7, +-- 1, +-- 0.1, +-- function(value) +-- card_view.btn_card:SetScale(value, value) +-- end +-- ) +-- DSTween.To( +-- 0.7, +-- 1, +-- 0.1, +-- function(value) +-- card_view.btn_card.alpha = value +-- end +-- ) +-- card_view.btn_card.alpha = 1 +-- end + +-- self._mainView._popEvent = true +-- if self._mainView._rightPanelView._settingView ~= nil then +-- self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) +-- end +-- end +-- ) +-- else +-- for i = 1, #pokerList do +-- local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) +-- local card_flower_code = pokerList[i] +-- local btn_card = self:CreatPoker(card_number_code, cs, open) +-- self.cards_view:AddChild(btn_card) +-- local card_view = NewCardView(btn_card, card_number_code, card_flower_code) +-- self.card_list[#self.card_list + 1] = card_view +-- end +-- table.sort(self.card_list, tableSortNumber) +-- for i = 1, #self.card_list do +-- local card = self.card_list[i] +-- card.index = i +-- self.cards_view:SetChildIndex(card.btn_card, card.index - 1) +-- card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) +-- if open ~= 1 then +-- -- body +-- self:AddCardMoveEvent(card) +-- end +-- end +-- end +-- end + +function M:InitPoker(pokerList, isPlayAni, open) if self.cor_init_poker ~= nil then coroutine.stop(self.cor_init_poker) end - -- print(vardump(self.card_list)) + -- -- print(vardump(self.card_list)) self.cor_init_poker = nil self.card_list = {} - - self.cards_view:RemoveChildren(0, -1, true) + self._ctr_canSendCard.selectedIndex = 0 + self._flag_ruleCard = false + self._view_handCard:RemoveChildren(0, -1, true) if isPlayAni == true then self.cor_init_poker = coroutine.start( @@ -113,21 +227,22 @@ function M:InitPoker(pokerList, isPlayAni, open) self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) end table.sort(pokerList) - - for i = 1, #pokerList do + table.sort(self.card_list, tableSortNumber) + for i = #pokerList, 1, -1 do + if pokerList[i] == 403 then + self._flag_ruleCard = true + end local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) local card_flower_code = pokerList[i] - local btn_card = self:CreatPoker(card_number_code, cs, open) - local x, y = self._view.width / 2 + 100, -200 - btn_card:SetXY(x, y) + -- local btn_card = self:CreatPoker(card_number_code, cs, open) + local btn_card = self._view_handCard:AddItemFromPool() + self:FillPoker(btn_card, "", card_number_code) btn_card.alpha = 0 btn_card.touchable = false - -- coroutine.wait(0.05) - self.cards_view:AddChild(btn_card) local card_view = NewCardView(btn_card, card_number_code, card_flower_code) self.card_list[#self.card_list + 1] = card_view - - table.sort(self.card_list, tableSortNumber) + btn_card.data = card_view + self:AddTouchMoveEvent(self._view_handCard) if i == #pokerList then for j = 1, #self.card_list do @@ -135,16 +250,14 @@ function M:InitPoker(pokerList, isPlayAni, open) card.btn_card.touchable = true if open ~= 1 then -- body - self:AddCardMoveEvent(card) + self:AddCardTouchEvent(card) end end end end for j = #self.card_list, 1, -1 do - -- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3') local card_view = self.card_list[j] card_view.index = j - self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) DSTween.To( @@ -173,23 +286,27 @@ function M:InitPoker(pokerList, isPlayAni, open) end ) else - for i = 1, #pokerList do + for i = #pokerList, 1, -1 do + if pokerList[i] == 403 then + self._flag_ruleCard = true + end local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) local card_flower_code = pokerList[i] - local btn_card = self:CreatPoker(card_number_code, cs, open) - self.cards_view:AddChild(btn_card) + local btn_card = self._view_handCard:AddItemFromPool() + self:FillPoker(btn_card, "", card_number_code) + -- self.cards_view:AddChild(btn_card) 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 = (GRoot.inst.width * 0.95 - self._view_handCard.columnGap * 15) / 16 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] - card.index = i - self.cards_view:SetChildIndex(card.btn_card, card.index - 1) - card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) if open ~= 1 then -- body - self:AddCardMoveEvent(card) + self:AddCardTouchEvent(card) end end end @@ -203,138 +320,35 @@ function M:updatePoker() self:InitPoker(templist, false, 0) end -function M:AddCardMoveEvent(card) +function M:AddTouchMoveEvent(list) local send_card = {} - card.btn_card.onTouchBegin:Set( + list.onTouchBegin:Set( function(context) self.send_card = {} + if list.touchable == false then + return + end + local fristCard = self._view_handCard:GetChildAt(0) + local CardWidth = fristCard.width + local columnGap = self._view_handCard.columnGap + local oneCardWidth = CardWidth - columnGap + local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + -- 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 + +function M:AddCardTouchEvent(card) + card.btn_card.onTouchBegin:Set( + function(context) if card.btn_card.touchable == false then return end - local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) - if xy.y > -21 and xy.y < 221 then - self.touchBegin = xy - Stage.inst.onTouchMove:Add(self.touchMoveFun) - --Stage.inst.onClick:Add(self.touchMoveFun) - card.btn_card.onTouchEnd:Set( - function(context) - local xy = - self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) - Stage.inst.onTouchMove:Remove(self.touchMoveFun) - --Stage.inst.onClick:onTouchMove(self.touchMoveFun) - if xy.y > -21 and xy.y < 221 then - if xy.x - self.touchBegin.x > 0 then - local max_x = xy.x - local min_x = self.touchBegin.x - for k = 1, #self.card_list do - local card = self.card_list[k] - - -- for i = 1, #self.card_list do - -- local card = self.card_list[i] - -- if card.btn_card.selected then - -- send_card[#send_card + 1] = card.card_code_flower - -- self.send_card[#self.send_card + 1] = card - -- end - -- end - if card.btn_card.touchable == true then - send_card[#send_card + 1] = card - - self:SetBtnCardColor(card, 1) - if k == #self.card_list then - if - card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and - card.card_isTouchable == 0 - then - self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - end - else - if - card.btn_card.x + - (self.card_width + self:GetHandCardOffset(#self.card_list)) > - min_x and - card.btn_card.x < max_x and - card.card_isTouchable == 0 - then - self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - end - end - end - end - else - local max_x = self.touchBegin.x - local min_x = xy.x - -- self.send_card = {} - for k = 1, #self.card_list do - local card = self.card_list[k] - - -- for i = 1, #self.card_list do - -- local card = self.card_list[i] - -- if card.btn_card.selected then - -- send_card[#send_card + 1] = card.card_code_flower - -- self.send_card[#self.send_card + 1] = card - -- end - -- end - if card.btn_card.touchable == true then - send_card[#send_card + 1] = card - self:SetBtnCardColor(card, 1) - --print(vardump(card)) - if k == #self.card_list then - if - card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and - card.card_isTouchable == 0 - then - self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - end - else - if - card.btn_card.x + - (self.card_width + self:GetHandCardOffset(#self.card_list)) > - min_x and - card.btn_card.x < max_x and - card.card_isTouchable == 0 - then - self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - end - end - end - end - end - - ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') - else - self.touchBegin = Vector2.New(0, 0) - for k = 1, #self.card_list do - local card = self.card_list[k] - if card.btn_card.touchable == true then - self:SetBtnCardColor(card, 1) - end - end - end - - Stage.inst:ResetInputState() - card.btn_card.onTouchEnd:Set(nil) - - self:zhizhanxuanpai() - end - ) - else - local button = card.btn_card - button.onChanged:Add( - function() - -- body - if card.btn_card.selected == true then - self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - else - self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) - end - end - ) - end + self:SetBtnCardColor(card, 1) end ) end @@ -350,143 +364,162 @@ function M:zhizhanxuanpai() --智障选牌 end local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + local list_ones = self:CheckOnes(card_map) - list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) - - list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) - list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) - - local list_type, touch_type = self:CheckOnes(card_map, 0, 11) - for i = 5, 11 do - local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) - if list_temp[1] ~= nil then - -- body - list_type = list_temp - end - end - local temp_list = list_type[1] - local temp_list1 = list_type1[1] - local temp_list2 = list_type2[1] - local temp_bomb = list_bomb[1] - if self.xunpai == nil then - -- body - self.xunpai = {} - end - - if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then - for i = 1, #self.send_card do - self:UpdateCardMove(self.send_card[i].btn_card, false, false) + if list_ones ~= nil and #list_ones > 0 then + for i = 1, #self.card_list do + self:UpdateCardMove(self.card_list[i].btn_card, false, false) end for i = 1, #self.send_card do - for j = 1, #temp_list do - if self.send_card[i] == temp_list[j] then + for j = 1, #list_ones do + if self.send_card[i] == list_ones[j][1] then -- body self:UpdateCardMove(self.send_card[i].btn_card, true, false) end end end - self.xunpai = temp_list + return list_ones else - self.xunpai = {} + return {} end end function M:TouchMoving(context) - if self.cards_view == nil then + if self._view_handCard == nil then return end local send_card1 = {} - local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + local fristCard = self._view_handCard:GetChildAt(0) + local CardWidth = fristCard.width + 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 -- 往右边滑 - --printlog("cccccccccccccc1111111111111111111111111") - local max_x = xy.x - local min_x = self.touchBegin.x - for i = 1, #self.card_list do - local card = self.card_list[i] - if card.btn_card.touchable == false or card.card_isTouchable == 1 then - else - if - card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and - card.btn_card.x < max_x - then - printlog("cccccccccccccc22222222222222") - self:SetBtnCardColor(card, 0.8) - if #send_card1 == 0 then - -- body - send_card1[1] = card - end - for i = 1, #send_card1 do - if send_card1[i] ~= card then - -- body - send_card1[#send_card1 + 1] = card - end - end - else - -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - -- card.card_isTouchable = 1 - -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - self:SetBtnCardColor(card, 1) + 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 + then + self:SetBtnCardColor(card, 1) + if #send_card1 == 0 then + send_card1[1] = card end - end - end - elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 - local max_x = self.touchBegin.x - local min_x = xy.x - for i = 1, #self.card_list do - local card = self.card_list[i] - if card.btn_card.touchable == false or card.card_isTouchable == 1 then - else - if - card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and - card.btn_card.x < max_x - then - -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) - -- card.card_isTouchable = 1 - -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") - self:SetBtnCardColor(card, 0.8) - if #send_card1 == 0 then - -- body - send_card1[1] = card - end - for i = 1, #send_card1 do - if send_card1[i] ~= card then - -- body - send_card1[#send_card1 + 1] = card - end - end - else - self:SetBtnCardColor(card, 1) + if send_card1[#send_card1] ~= card then + send_card1[#send_card1 + 1] = card end + else + self:SetBtnCardColor(card, 0) end end end - --print(vardump(send_card1)) - -- local send_card = {} - -- self.send_card = {} - -- for i = 1, #self.card_list do - -- local card = self.card_list[i] - -- if card.btn_card.selected then - -- send_card[#send_card + 1] = card.card_code_flower - -- self.send_card[#self.send_card + 1] = card - -- end - -- end self.send_card = send_card1 end -function M:SetBtnCardColor(card, num) - if - card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and - card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil - then - -- body - card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) +function M:TouchMoveEnd(context) + local send_card = {} + local currentCard = {} + local xuan_card = {} + + local fristCard = self._view_handCard:GetChildAt(0) + local CardWidth = fristCard.width + local columnGap = self._view_handCard.columnGap + local oneCardWidth = CardWidth + columnGap + local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + local downCards = #self.card_list + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + 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 - --if card.card_code_flower < 500 then - -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) - -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) - --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 + +-- function M:SetBtnCardColor(card, num) +-- if +-- card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and +-- card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil +-- then +-- -- body +-- card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) +-- end + +-- --if card.card_code_flower < 500 then +-- -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) +-- -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) +-- --end +-- end +function M:SetBtnCardColor(card, num) + card.btn_card:GetController('choose').selectedIndex = num end function M:ShowPiao(piao) @@ -497,6 +530,27 @@ function M:HidePiao() self.ctr_piao.selectedIndex = 0 end +function M:ShowOutCardOption2(lastCardList, ctr_select, mustPutMaxCard) + self._cardCheck:InitLastCard(lastCardList, mustPutMaxCard) + self._cardCheck:CheckOutCard(self.card_list) + self.tips_card_list = self._cardCheck:GetTipsList() + self.touchCardSet = self._cardCheck:GetTouchSet() + self.touchCardMap = self._cardCheck:GetTouchCardMap() + self.tips_click_count = 0 + + print("lingmengShowOutCardOption2", #self.touchCardSet) + pt(self.touchCardSet) + pt(self.touchCardMap) + -- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环) + self:UpdateHandCardsColor() + + if #self.tips_card_list == 1 then + self:ShowTipsCard(1) + end + + self.ctr_put_card_option.selectedIndex = ctr_select +end + function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) --for i = 1, #self.out_card_list do -- local card = self.out_card_list[i] @@ -514,9 +568,10 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p self.tips_click_count = 0 self.send_card = {} self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + self._ctr_canSendCard.selectedIndex = 0 if #self.tips_card_list >= 1 then - -- body + -- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环) self:UpdateHandCardsColor() end -- @@ -545,27 +600,40 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p end function M:SetOutCardInfo(cardlist, isPass, isAnim) - self.ctr_put_card_option.selectedIndex = 0 - for i = 1, #self.out_card_list do - local card = self.out_card_list[i] - self.cards_view:RemoveChild(card, true) - end - self.out_card_list = {} - if cardlist ~= nil then - -- todo - self:SetOutCardList(cardlist, isAnim) - else + self._view_Out:RemoveChildren(0, -1, true) + if cardlist == nil then if isPass == true then self.ctr_outpoker.selectedIndex = 2 - for i = 1, #self.card_list do - local card_view = self.card_list[i] - card_view.btn_card.touchable = true - self:UpdateCardMove(card_view.btn_card, false, false) - self:SetBtnCardColor(card_view, 1) - end else self.ctr_outpoker.selectedIndex = 0 end + else + self.ctr_outpoker.selectedIndex = 1 + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + + for i = 1, #cardlist do + local poker_item = self._view_Out:AddItemFromPool() + local code = self:ChangeCodeByTo(cardlist[i]) + + self:FillPoker(poker_item, "", cardlist[i]) + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = self._view_Out:AddItemFromPool() + + local code = self:ChangeCodeByTo(cardlist[i]) + + self:FillPoker(poker_item, "", cardlist[i]) + end + end end end @@ -579,7 +647,7 @@ function M:SetOutCardBlack() end function M:SetOutCardList(cardlist, isAnim) - local pos_y = -200 + local pos_y = -320 if isAnim then -- self.zhizhanctr_select=0 -- self.zhizhantype=0 @@ -609,13 +677,13 @@ function M:SetOutCardList(cardlist, isAnim) self.cards_view, card.btn_card, self.out_card_data['maxcount_x'], - 0.7 + 1.5 ) card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) -- card.btn_card:GetChildAt(0):SetScale(x, x) -- end) - card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + card.btn_card:GetChildAt(0):SetScale(1.5, 1.5) break end end @@ -643,23 +711,21 @@ function M:SetOutCardList(cardlist, isAnim) -- else -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") -- end - -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- -- body -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. code .. "_1") -- end if DataManager.CurrenRoom.pai == 0 then - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - -- card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_1') - card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code) + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_1') else card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code) end else - if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 2 then -- body - --card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_2') - card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_2') else card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') end @@ -667,7 +733,7 @@ function M:SetOutCardList(cardlist, isAnim) if card_code_obj == nil then card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') end - card_code_obj:SetScale(0.7, 0.7) + card_code_obj:SetScale(1.5, 1.5) poker_item:AddChild(card_code_obj) --local poker = self:CreatPoker(cardlist[i],0.7) self.cards_view:AddChild(poker_item) @@ -678,7 +744,7 @@ function M:SetOutCardList(cardlist, isAnim) self.cards_view, poker_item, self.out_card_data['maxcount_x'], - 1 + 1.5 ) poker_item.xy = Vector2.New(pos.x, pos_y) self.out_card_list[#self.out_card_list + 1] = poker_item @@ -686,16 +752,31 @@ function M:SetOutCardList(cardlist, isAnim) end end +-- function M:DeleteHandCards(cardlist) +-- for i = 1, #cardlist do +-- local card_code_number = cardlist[i] +-- for j = 1, #self.card_list do +-- local card = self.card_list[j] +-- if card_code_number == card.card_code_number then +-- --self.out_card_list[#self.out_card_list + 1] = card +-- list_remove(self.card_list, card) +-- -- todo 出牌动画 +-- self.cards_view:RemoveChild(card.btn_card, true) +-- break +-- end +-- end +-- end +-- self:UpdateHandCardsPos() +-- end function M:DeleteHandCards(cardlist) + self.ctr_put_card_option.selectedIndex = 0 for i = 1, #cardlist do local card_code_number = cardlist[i] for j = 1, #self.card_list do local card = self.card_list[j] if card_code_number == card.card_code_number then - --self.out_card_list[#self.out_card_list + 1] = card list_remove(self.card_list, card) - -- todo 出牌动画 - self.cards_view:RemoveChild(card.btn_card, true) + self._view_handCard:RemoveChild(card.btn_card, true) break end end @@ -708,11 +789,8 @@ function M:UpdateHandCardsPos() local card_view = self.card_list[i] card_view.index = i card_view.btn_card.touchable = true - self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) - --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) - card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) self:UpdateCardMove(card_view.btn_card, false, false) - self:SetBtnCardColor(card_view, 1) + self:SetBtnCardColor(card_view, 0) end end @@ -728,35 +806,75 @@ end function M:UpdateCardMove(btn_card, isSelected, isPlay) btn_card.selected = isSelected - local card_Move = btn_card:GetChildAt(0) - local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) - if isPlay then - -- body - card_Move:TweenMove(xy, 0) - else - card_Move:TweenMove(xy, 0) - end + -- local card_Move = btn_card + -- local xy = isSelected == true and Vector2.New(0, -65) or Vector2.New(0, 0) + -- if isPlay then + -- -- body + -- card_Move:TweenMove(xy, 0) + -- else + -- card_Move:TweenMove(xy, 0) + -- end end -- +-- function M:UpdateHandCardsColor() +-- local send_card = {} +-- for i = 1, #self.card_list do +-- local card_view = self.card_list[i] +-- local num = card_view.btn_card.touchable == true and 0 or 1 +-- self:SetBtnCardColor(card_view, num) +-- if card_view.btn_card.selected and card_view.btn_card.touchable then +-- table.insert(send_card, card_view) +-- end +-- end +-- if #send_card > 0 then +-- table.sort(send_card, tableSortNumber) +-- self._cardCheck:initCards(send_card, false, #send_card == self._view_handCard.numItems) +-- self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 +-- else +-- self._ctr_canSendCard.selectedIndex = 0 +-- end +-- end + function M:UpdateHandCardsColor() + local send_card = {} for i = 1, #self.card_list do local card_view = self.card_list[i] - local num = card_view.btn_card.touchable == true and 1 or 0.6 - self:SetBtnCardColor(card_view, num) + if self.touchCardMap[math.floor(card_view.card_code_number / 10)] or #self.touchCardSet == 0 then + card_view.btn_card.touchable = true + self:SetBtnCardColor(card_view, 0) + else + card_view.btn_card.touchable = false + card_view.btn_card.selected = false + self:SetBtnCardColor(card_view, 1) + end + if card_view.btn_card.selected and card_view.btn_card.touchable then + table.insert(send_card, card_view) + end + end + if #send_card > 0 then + table.sort(send_card, tableSortNumber) + 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 + else + self._ctr_canSendCard.selectedIndex = 0 end end function M:BtnEvent() self.btn_not_put = self._view:GetChild('btn_not_put') - self.btn_tips = self._view:GetChild('btn_tips') - self.btn_put = self._view:GetChild('btn_put') + self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖 + self.btn_sendCards = self._view:GetChild('Btn_SendCard') + self._ctr_canSendCard = self._view:GetController('canSendCard') - self.btn_put.onClick:Set( + self.btn_sendCards.onClick:Set( function() if self.Reset then return end + if self._ctr_canSendCard.selectedIndex == 0 then + return + end local send_card = {} self.send_card = {} local currentCard = {} @@ -770,7 +888,7 @@ function M:BtnEvent() end if #send_card == 0 then - self:ErrorTip('请选择要出的牌 ') + self:ErrorTip('请选择要出的牌') else self.gameCtr:SendCard(send_card, currentCard) end @@ -819,6 +937,7 @@ function M:BtnEvent() end function M:ShowTipsCard(index) + print("lingmengShowTipsCard") local item = self.tips_card_list[index] for i = 1, #self.card_list do local card = self.card_list[i] @@ -833,28 +952,25 @@ function M:ShowTipsCard(index) self:UpdateCardMove(card.btn_card, false, false) end end + pt(item) + self._cardCheck:initCards(item) + self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 end function M:GetHandCardOffset(count) - local start = -50 ---54 + local start = -90 ---54 + local offset = 0 if count > 10 then - offset = start - count + 18 + offset = start - count + 26 else - offset = -50 + offset = -30 end - return offset + return 20 end function M:GetHandCardPos(index, card_count) - local x, y = 0, -18 - if DataManager.CurrenRoom.cardsize == 0 then - y = -70 - elseif DataManager.CurrenRoom.cardsize == 1 then - y = -50 - elseif DataManager.CurrenRoom.cardsize == 2 then - y = -30 - end + local x, y = 0, -20 local offset = self:GetHandCardOffset(card_count) local middle_x = self.cards_view.width / 2 local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) @@ -871,15 +987,6 @@ function M:GetHandCardPos1(index, card_count) return x, y end -function M:ChangeOneCodeByFrom(card) - local flower = math.floor(card / 100) - local number = card % 100 - if number == 2 then - number = 15 - end - return number * 10 + flower -end - function M:ErrorTip(error_text) if self.cor_init_poker ~= nil then coroutine.stop(self.cor_init_poker) @@ -1275,50 +1382,77 @@ function M:GetCardMapAndMaxKey(pokerList) return map, max_key end -function M:CheckOnes(pokerMap, num, length) +-- function M:CheckOnes(pokerMap, num, length) +-- local one_card_list = {} +-- local touch_key_list = {} +-- local text = {} +-- local text2 = {} +-- local x = 0 +-- if #self.card_list < length then +-- return one_card_list, touch_key_list +-- end +-- for k, v in pairs(pokerMap) do +-- text = {} +-- text2 = {} +-- if k > num then +-- for l, p in pairs(pokerMap) do +-- for i = 0, length - 1 do +-- if l == k + i and l ~= 15 and l ~= 16 then +-- -- body +-- text[#text + 1] = { p[1] } +-- text2[#text2 + 1] = l +-- if #text >= length then +-- -- body +-- local x = #one_card_list +-- local y = #touch_key_list +-- for i = 1, #text - 1 do +-- one_card_list[x + 1] = text[1] +-- touch_key_list[y + 1] = text2[2] +-- -- for i, v in pairs(text2[i + 1]) do +-- -- if v ~= nil then +-- -- table.insert(touch_key_list[x + 1], v) +-- -- end +-- -- end +-- for i, v in pairs(text[i + 1]) do +-- if v ~= nil then +-- table.insert(one_card_list[x + 1], v) +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- end +-- return one_card_list, touch_key_list, length +-- end + +function M:CheckOnes(pokerMap) local one_card_list = {} - local touch_key_list = {} - local text = {} - local text2 = {} - local x = 0 - if #self.card_list < length then - return one_card_list, touch_key_list - end + local old_k = 0 for k, v in pairs(pokerMap) do - text = {} - text2 = {} - if k > num then - for l, p in pairs(pokerMap) do - for i = 0, length - 1 do - if l == k + i and l ~= 15 and l ~= 16 then - -- body - text[#text + 1] = { p[1] } - text2[#text2 + 1] = l - if #text >= length then - -- body - local x = #one_card_list - local y = #touch_key_list - for i = 1, #text - 1 do - one_card_list[x + 1] = text[1] - touch_key_list[y + 1] = text2[2] - -- for i, v in pairs(text2[i + 1]) do - -- if v ~= nil then - -- table.insert(touch_key_list[x + 1], v) - -- end - -- end - for i, v in pairs(text[i + 1]) do - if v ~= nil then - table.insert(one_card_list[x + 1], v) - end - end - end - end - end - end + if #one_card_list == 0 then + table.insert(one_card_list, v) + old_k = k + else + if k == 15 then + break end + if k ~= old_k + 1 and #one_card_list >= 5 then + break + end + if k ~= old_k + 1 then + one_card_list = {} + end + table.insert(one_card_list, v) + old_k = k end end - return one_card_list, touch_key_list, length + if #one_card_list < 5 then + one_card_list = {} + end + return one_card_list end function M:Clear() @@ -1326,18 +1460,20 @@ function M:Clear() self:SetOutCardInfo(nil, false) self.card_list = {} self.out_card_list = {} - self.cards_view:RemoveChildren(0, -1, true) + self._view_handCard:RemoveChildren(0, -1, true) + self._flag_ruleCard = false -- self.mask_liangpai:RemoveChildren(0,-1,true) end function M:ClearCheck() self.card_list = {} self.out_card_list = {} - self.cards_view:RemoveChildren(0, -1, true) + self._view_handCard:RemoveChildren(0, -1, true) end function M:Destroy() Stage.inst.onTouchMove:Remove(self.touchMoveFun) + Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun) end return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua index d89dd9ea..ba04a89a 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua @@ -26,6 +26,7 @@ local RunFast_Protocol = { RunFast_Put_Error = "2111", RunFast_Bomb_Score = "2118", + RunFast_Bomb_Score_New = "2110", RunFast_Result = "2007", RunFast_Piao_Tip = "2031", @@ -38,7 +39,6 @@ local RunFast_Protocol = { GAME_EVENT_XIPAI = "20837", GAME_EVENT_NOTIFY_XIPAI = "20838", GAME_EVT_CARDINHAND = "202022", - --打鸟 GAME_EVT_DANIAO_TIP = "832", GAME_DANIAO = "831", diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua index 9f7bca0b..d9a569e4 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua @@ -8,546 +8,180 @@ local RunFast_ResultView = {} local M = RunFast_ResultView -function RunFast_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) +function RunFast_ResultView.new(root, data, roomid, over, win_seat, dissolve, remaincards) setmetatable(M, { __index = ResultView }) local self = setmetatable({}, { __index = M }) self.class = "RunFast_ResultView" self._currenIndex = 0 self._close_zone = false - --self._blur_view = blur_view + self._root_runFast = root self._gamectr = ControllerManager.GetController(GameController) - self:init("ui://Extend_Poker_RunFastNew/clearing", data, roomid, over, win_seat, dissolve, remaincards) - + self:init("ui://Extend_Poker_RunFastNew/clearing_new", data, roomid, over, win_seat, dissolve, remaincards) + print("=======================lingmengresult", data, roomid, over, win_seat, dissolve, remaincards) return self end function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) ResultView.init(self, url, true) - self.xiPaiCtr = self._view:GetController("xipai") - - local round = DataManager.CurrenRoom.room_config.config.times or 1 - local xpconfig = DataManager.CurrenRoom.room_config.config.xi_pai - if xpconfig and round > 1 then - self.xiPaiCtr.selectedIndex = 1 - else - self.xiPaiCtr.selectedIndex = 0 - end - - - --self:InitData(data,roomid) - --self:InitData(data,roomid) - printlog("aaaaaaaaaaaaaaaa1111111111111111111111111222222222222222 ", dissolve) - pt(data) - if dissolve == 1 then - -- body - self.xiPaiCtr.selectedIndex = 0 - self:InitData(data, win_seat, roomid) - else - local xipai = self._view:GetChild("btn_xipai") - xipai.touchable = true - xipai.onClick:Add(function() - local xiPaiCallBack = function() - xipai.touchable = false - self.xiPaiCtr.selectedIndex = 0 - local _gamectr = ControllerManager.GetController(GameController) - _gamectr:PlayerReady() - self:Close() - - --ViewUtil.ErrorTip(1000000, "申请洗牌成功") - end - local _gamectr = ControllerManager.GetController(GameController) - _gamectr:SendXiPaiAction(xiPaiCallBack) - end) - if DataManager.CurrenRoom.xipaiScore then - --xipai.text="洗牌 积分x"..DataManager.CurrenRoom.xipaiScore - else - --xipai.text="洗牌 积分x0" - end - - self:InitData_One(data, win_seat, over, roomid, remaincards) - end -end - -function M:ChangeCodeByTo(card) - local flower = card % 10 - local number = math.floor(card / 10) - if number == 15 then - number = 2 - end - return flower * 100 + number -end - --- 小结算 -function M:InitData_One(data, winseat, over, roomid, remaincards) local room = DataManager.CurrenRoom - self._view:GetController("sdk").selectedIndex = 1 - local _gamectr = ControllerManager.GetController(GameController) - local list_view = self._view:GetChild("player_list_1") - list_view:RemoveChildrenToPool() + self._view:GetController('over').selectedIndex = 0 - local leftCardAll = self._view:GetChild("leftCardHand") - leftCardAll:RemoveChildrenToPool() + if over == 2 and room.curren_round <= 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ------------------ - if remaincards and #remaincards > 0 then - table.sort(remaincards, function(a, b) - return a % 100 < b % 100 - end) - for i = 1, #remaincards do - local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. remaincards[i]) - leftCardAll:AddChild(card_code_obj) - end + --只有一人直接退,有两人才进正常结算 + if not over and #data == 1 then + ViewManager.ChangeView(ViewManager.View_Lobby) end - - for i = 1, #data do - local player = data[i] - local item = list_view:AddItemFromPool("ui://Extend_Poker_RunFastNew/clearing_item_1") - - local leftCard = item:GetChild("leftCard") - leftCard:RemoveChildrenToPool() - -- table.sort(data[i].handCards,function (a,b) - - -- return a % 100 < b % 100 - -- end) - - for j = 1, #data[i].handCards do - local code = data[i].handCards[j] - local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - leftCard:AddChild(card_code_obj) - end - - -- table.sort(data[i].outCards,function (a,b) - -- return a % 100 < b % 100 - -- end) - - - - for k = 1, #data[i].outCards do - local code = data[i].outCards[k] - local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code) - leftCard:AddChild(card_code_obj) - card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) - end - - - - local boom = item:GetChild("boom") - boom.text = player.thisboomnum - - local piao = item:GetChild("piao") - if player.piao <= 0 then - piao.text = "0" + self._view:GetChild('btn_over1Close').onClick:Set(function() + if over == 0 then + self:Close() else - piao.text = "" .. player.piao + self._view:GetController('over').selectedIndex = 1 end + end) - local nichen = item:GetChild("nichen") - - if player.nick ~= nil then - -- body - nichen.text = tostring(player.nick) - else - nichen.text = tostring(player.self_user.nick_name) - end - - - local shengpai = item:GetChild("shengpai") - if player.cards ~= nil then - -- body - shengpai.text = tostring(#player.cards) - else - shengpai.text = tostring(#player.hand_list) - end - - local rt = 1 - if room.hpOnOff == 1 then - rt = room.score_times - end - - local hp_nonnegative = room:checkHpNonnegative() - local roundScore = player.winCardScore - roundScore = roundScore or 0 - if hp_nonnegative then - local jifen = "" - if roundScore > 0 then - jifen = "+" .. roundScore - else - jifen = "" .. roundScore - end - - local tili = "" - local limit = "" - if player.hp_info.round_actual_hp > 0 then - -- tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" - tili = "(+" .. roundScore .. ")" - if player.hp_info.upper_limit then - limit = "达到上限" - end - else - -- tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" - tili = "(" .. roundScore .. ")" - - if player.hp_info.upper_limit then - limit = "达到下限" - end - end - - item:GetChild("score").text = jifen .. tili .. limit - else - local jifen = "" - if roundScore >= 0 then - jifen = "+" .. roundScore - else - jifen = "" .. roundScore - end - jifen = jifen .. " " - - local tili = "" - if room.hpOnOff > 0 then - local need = roundScore * rt - tili = "(" - if roundScore > 0 then - tili = tili .. "+" .. tostring(need) - else - tili = tili .. tostring(need) - end - - tili = tili .. ")" - end - - - item:GetChild("score").text = jifen .. tili - end - - if roundScore >= 0 then - if room.self_player.seat == player.seat then - -- body - self._view:GetController("result").selectedIndex = 1 - item:GetController('win').selectedIndex = 1 - else - item:GetController('win').selectedIndex = 0 - end - else - if room.self_player.seat == player.seat then - self._view:GetController("result").selectedIndex = 0 - item:GetController('win').selectedIndex = 0 - else - item:GetController('win').selectedIndex = 1 - end - end - end - - - if over == 0 then - -- body - local btn_confirm = self._view:GetChild("btn_confirm") - btn_confirm.onClick:Set(function() - self:Destroy() + self._view:GetChild('btn_nextRound').onClick:Set(function() + if over == 0 then local _gamectr = ControllerManager.GetController(GameController) _gamectr:ConformToNextGame() + self._root_runFast._ctr_inClear.selectedIndex = 0 + self:Destroy() + else + self._view:GetController('over').selectedIndex = 1 + end + end) + + self.ClearReady = function() + if over == 0 then + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + self._root_runFast:ClearOk() + self:Destroy() + else + self._view:GetController('over').selectedIndex = 1 + end + end + + self._view:GetChild('btn_closeRound').onClick:Set(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat and 1 or 0 + + local over0List = self._view:GetChild('list_over0') + over0List:SetVirtual() + over0List.itemRenderer = function(index, obj) + local info = data[index + 1] + local playerInfo = room:GetPlayerBySeat(info.seat) + obj:GetChild('name').text = playerInfo.self_user.nick_name + obj:GetChild('residue').text = #info.handCards + obj:GetChild('bomb').text = info.thisboomnum + obj:GetChild('score').text = info.winscore > 0 and string.format("+%d", info.winscore) or info.winscore + obj:GetController('chuntian').selectedIndex = info.chuntian and 1 or 0 + end + over0List.numItems = #data + self._root_runFast._ctr_inClear.selectedIndex = 1 + + if over == 1 or (over == 2 and room.curren_round > 0) then + local bigSeat = 0 + local bigScore = 0 + for i = 1, #data do + if data[i].total_score > bigScore then + bigSeat = i + bigScore = data[i].total_score + end + end + self._view:GetChild('text_roomID').text = room.room_id + self._view:GetChild('text_time').text = os.date('%m-%d %H:%M', os.time()) + self._view:GetChild('text_groupID').text = room.group_id or 0 + self._view:GetController('num').selectedIndex = #data == 2 and 0 or 1 + self._view:GetController('isgroup').selectedIndex = room.group_id ~= 0 and 1 or 0 + for i = 1, #data do + local info = data[i] + local playerInfo = room:GetPlayerBySeat(info.seat) + printlog("lingmeng clear", playerInfo.nick_name, info.total_score, i == bigSeat) + self:FillPlayerInfoEnd(self._view:GetChild(string.format("comp_playerInfo%d_over1", i)), info, playerInfo, + i == bigSeat) + end + coroutine.start(function() + coroutine.wait(2) + self._view:GetController('over').selectedIndex = 1 end) - else - self.xiPaiCtr.selectedIndex = 0 - local btn_confirm = self._view:GetChild("btn_confirm") - btn_confirm.onClick:Set(function() - --self:Destroy() - self:InitData(data, winseat, roomid) - -- ViewManager.ChangeView(ViewManager.View_Lobby) + end + + + local Btn_Share = self._view:GetChild('btn_shareRecord') + if Btn_Share then + Btn_Share.onClick:Set(function() + self:SaveRenderTextureToPNG() + end) + end + + local Btn_Copy = self._view:GetChild('btn_copyRecord') + if Btn_Copy then + Btn_Copy.onClick:Set(function() + local resultStr = "" + if room.group_id ~= 0 then + local group = DataManager.groups:get(room.group_id) + resultStr = string.format("【%s】俱乐部,", group.name) + end + resultStr = string.format("%s%s\n", resultStr, room.game_info.name) + for i = 1, #data do + local info = data[i] + local playerInfo = room:GetPlayerBySeat(info.seat) + resultStr = string.format("%s%s\nID:%s【%s】\n", resultStr, playerInfo.self_user.nick_name, + playerInfo.self_user.account_id, + info.total_score) + end + resultStr = string.format("%s房号:%s 局数:%s/%s局\n结束时间:%s", resultStr, room.room_id, room.curren_round, + room.room_config.Times, os.date("%Y-%m-%d %H:%M:%S", os.time())) + ViewUtil.__openWx() + GameApplication.Instance:CopyToClipboard(resultStr) end) end end --- 大结算 -function M:InitData(data, winseat, roomid) - self.xiPaiCtr.selectedIndex = 0 - self._view:GetController("sdk").selectedIndex = 0 - +function M:FillPlayerInfoEnd(view, info, playerInfo, bigWin) local room = DataManager.CurrenRoom - local rt = 1 - if room.hpOnOff == 1 and room.score_times ~= 1 then - rt = room.score_times - end + self:FillPlayerHead(view:GetChild('comp_playerInfo'), playerInfo, bigWin) - -- 赋值result_info,聊天室分享需要 - local player_list = {} - for i = 1, #data do - player_list[i] = {} + local detailList = view:GetChild('list_detail') - local user = room:GetPlayerBySeat(data[i].seat).self_user - - player_list[i].id = user.account_id - - player_list[i].score = data[i].score - player_list[i].hp_info = data[i].hp_info - player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 - player_list[i].nick = user.nick_name - player_list[i].seat = data[i].seat - player_list[i].head_url = data[i].self_user.head_url - player_list[i].daniao = data[i].daniao - - if data[i].entrust ~= nil then - player_list[i].entrust = data[i].entrust > 0 - else - player_list[i].entrust = false - end - - player_list[i].param = {} - - player_list[i].param[1] = {} - player_list[i].param[1].key = "赢局数:" - player_list[i].param[1].value = tostring(data[i].settle_log.winnum) - - player_list[i].param[2] = {} - player_list[i].param[2].key = "打出炸弹数:" - player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) - - player_list[i].param[3] = {} - player_list[i].param[3].key = "春天次数:" - player_list[i].param[3].value = tostring(data[i].settle_log.springnum) - - player_list[i].param[4] = {} - player_list[i].param[4].key = "当局最高分:" - player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) - - if data[i].daniao > 0 then - player_list[i].flag = { "打鸟" } - end - end - - self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, - player_list) - self:InitBigResult(room) - local big_result = self._view:GetChild("big_result") - local lst_p = big_result:GetChild("player_list") - -- local list_param = com_p:GetChild("list_param") - for i = 1, lst_p.numChildren do - local com_p = lst_p:GetChildAt(i - 1) - local list_param = com_p:GetChild("list_param") - for j = 1, list_param.numChildren do - local tem = list_param:GetChildAt(j - 1) - tem:GetChild("txt_value").textFormat.size = 30 - end - end + self:FillDetailChild(detailList:AddItemFromPool(), 0, info.settle_log.maxscore) + self:FillDetailChild(detailList:AddItemFromPool(), 1, info.settle_log.boomnum) + self:FillDetailChild(detailList:AddItemFromPool(), 2, + string.format("%d赢%d输", info.settle_log.winnum, room.room_config.Times - info.settle_log.winnum)) + self:FillDetailChild(detailList:AddItemFromPool(), 3, info.total_score) end -function M:InitBigResult(room, fontsize) - local big_result = self._view:GetChild('big_result') - if big_result ~= nil then - local player_list = big_result:GetChild('player_list') - player_list:RemoveChildrenToPool() +function M:FillPlayerHead(view, playerInfo, bigWin) + ImageLoad.Load(playerInfo.self_user.head_url, view:GetChild('btn_head')._iconObject) + view:GetChild('text_name').text = ViewUtil.stringEllipsis(playerInfo.self_user.nick_name) + view:GetChild('text|_ID').text = playerInfo.self_user.account_id + view:GetController('bigWin').selectedIndex = bigWin and 1 or 0 +end - big_result:GetChild('txt_room_id').text = '房号:' .. self._resultInfo.room_id - big_result:GetChild('txt_game_name').text = self._resultInfo.game_name - big_result:GetChild('txt_game_data').text = os.date('%Y-%m-%d %H:%M', os.time()) +function M:FillDetailChild(view, index, value) + view:GetController('ShowTitle').selectedIndex = index + view:GetChild('text_value').text = value +end - local str_roominfo = string.gsub(room.room_config:GetDes(), '\r', '') - big_result:GetChild('txt_play').text = str_roominfo +function M:SetDestroryCallback(fct) + self._destoryCallback = fct +end - if room.hpOnOff == 1 and room.score_times ~= 1 then - big_result:GetChild('txt_time').text = '倍数:' .. tostring(room.score_times) - big_result:GetController('time').selectedIndex = 1 - end - - local maxScore = 0 - local isWin = false - local flag_new = big_result:GetChild('flag_tempNew') - for i = 1, #self._resultInfo.player_list do - local player_info = self._resultInfo.player_list[i] - - local total_score = room:GetTotalScore(player_info.score) - local hp_nonnegative = room:checkHpNonnegative() - player_info.total_score = 0 - if hp_nonnegative then - local hp_info = player_info.hp_info - player_info.total_score = d2ad(hp_info.total_hp) - else - player_info.total_score = total_score - end - - if player_info.score > maxScore then - maxScore = player_info.score - end - - if player_info.id == room.self_player.self_user.account_id then - if player_info.total_score >= 0 then - isWin = true - end - end - end - - if isWin then - big_result:GetController('result').selectedIndex = 1 - else - big_result:GetController('result').selectedIndex = 0 - end - - for i = 1, #self._resultInfo.player_list do - local player_info = self._resultInfo.player_list[i] - - local item2 - if player_info.id == room.self_player.self_user.account_id then - if isWin then - item2 = big_result:GetChild('play_win') - else - item2 = big_result:GetChild('play_lose') - end - else - if not isWin then - item2 = big_result:GetChild('play_win') - else - item2 = big_result:GetChild('play_lose') - end - end - local item = player_list:AddItemFromPool() - item:GetChild('txt_name').text = player_info.nick - item2:GetChild('txt_name').text = player_info.nick - item2:GetChild('txt_id').text = player_info.id - - local head = item:GetChild('head'):GetChild('n4') - ImageLoad.Load(player_info.head_url, head) - local head = item2:GetChild('head'):GetChild('n4') - ImageLoad.Load(player_info.head_url, head) - - if player_info.entrust ~= nil and player_info.entrust == true then - item:GetController('entrust').selectedIndex = 1 - else - item:GetController('entrust').selectedIndex = 0 - end - - if player_info.hp_info ~= nil and player_info.hp_info.cur_hp ~= nil then - item:GetChild('txt_reserve_hp').text = '积分:' .. tostring(d2ad(player_info.hp_info.cur_hp)) - end - - if player_info.total_score ~= nil then - if tostring(player_info.score) == tostring(maxScore) and player_info.score > 0 then - item:GetController('big_win').selectedIndex = 1 - else - item:GetController('big_win').selectedIndex = 0 - end - - if player_info.total_score >= 0 then - item:GetController('pn').selectedIndex = 1 - item:GetChild('txt_positive').text = '+' .. tostring(player_info.total_score) - item2:GetChild('txt_navigate').text = string.format("总战绩:+%s", player_info.total_score) - item2:GetChild('txt_daniao').text = string.format("打鸟 %s", player_info.daniao) - item2:GetChild('text_zongjifen').text = player_info.total_score < player_info.daniao and 0 or - player_info.total_score - player_info.daniao - else - item:GetController('pn').selectedIndex = 0 - item:GetChild('txt_navigate').text = tostring(player_info.total_score) - item2:GetChild('txt_navigate').text = string.format("总战绩:%s", player_info.total_score) - item2:GetChild('txt_daniao').text = string.format("打鸟 %s", player_info.daniao) - item2:GetChild('text_zongjifen').text = player_info.total_score > player_info.daniao and 0 or - player_info.total_score - player_info.daniao - end - end - - player_info.score = room:GetTotalScore(player_info.score) - - local list_param = item:GetChild('list_param') - list_param:RemoveChildrenToPool() - if self._gameStatisticsLineSpacing ~= nil then - list_param.lineGap = self._gameStatisticsLineSpacing - end - - if player_info.param ~= nil then - local big = false - if #player_info.param <= 4 then - big = true - end - - for i = 1, #player_info.param do - local pitem = list_param:AddItemFromPool() - - pitem:GetChild('txt_key').text = player_info.param[i].key - pitem:GetChild('txt_value').text = player_info.param[i].value - - if fontsize ~= nil and fontsize > 0 then - pitem:GetChild('txt_key').textFormat.size = fontsize - pitem:GetChild('txt_value').textFormat.size = fontsize - else - if big then - pitem:GetChild('txt_key').textFormat.size = 30 - pitem:GetChild('txt_value').textFormat.size = 30 - else - pitem:GetChild('txt_key').textFormat.size = 24 - pitem:GetChild('txt_value').textFormat.size = 24 - end - end - end - end - - local list_param = item2:GetChild('list_param') - list_param:RemoveChildrenToPool() - if self._gameStatisticsLineSpacing ~= nil then - list_param.lineGap = self._gameStatisticsLineSpacing - end - - if player_info.param ~= nil then - local big = false - if #player_info.param <= 4 then - big = true - end - - for i = 1, #player_info.param do - local pitem = list_param:AddItemFromPool() - - pitem:GetChild('txt_key').text = player_info.param[i].key - pitem:GetChild('txt_value').text = player_info.param[i].value - - if fontsize ~= nil and fontsize > 0 then - pitem:GetChild('txt_key').textFormat.size = fontsize - pitem:GetChild('txt_value').textFormat.size = fontsize - else - if big then - pitem:GetChild('txt_key').textFormat.size = 30 - pitem:GetChild('txt_value').textFormat.size = 30 - else - pitem:GetChild('txt_key').textFormat.size = 24 - pitem:GetChild('txt_value').textFormat.size = 24 - end - end - end - end - - local flag = item:GetChild('flag') - flag:RemoveChildrenToPool() - if player_info.flag ~= nil and #player_info.flag > 0 then - for i = 1, #player_info.flag do - local pitem = flag:AddItemFromPool() - - pitem:GetChild('txt_name').text = player_info.flag[i] - end - item:GetController('have_flag').selectedIndex = 1 - else - item:GetController('have_flag').selectedIndex = 0 - end - - if player_info.id == room.self_player.self_user.account_id then - item:GetController('self').selectedIndex = 1 - else - item:GetController('self').selectedIndex = 0 - end - end - - local btn_continue_game = big_result:GetChild('btn_continue_game') - if btn_continue_game then - local gid = room.group_id - if gid ~= 0 then - btn_continue_game.visible = true - local pid = room.room_config.pid - local game_id = room.game_id - btn_continue_game.onClick:Set( - function() - self:ContinueGame(gid, pid, game_id) - end - ) - end - end +function M:Destroy() + if self._destoryCallback then + self._destoryCallback() end + getmetatable(M).__index.Destroy(self) end return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua index 6a842d42..7798f79d 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua @@ -1,88 +1,93 @@ local MainRightPanelView = require("Game.View.MainRightPanelView") local RunFast_RightPanelView = {} local M = RunFast_RightPanelView -local function __init(self,mainView,view) - local right_panel = view +local function __init(self, mainView, view) + local right_panel = view - local btn_setting = right_panel:GetChild("btn_setting") - btn_setting.onClick:Set(function() - local _settingView = mainView:NewSettingView() - _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 - _settingView.cd_time = mainView.dismiss_room_cd_time - _settingView:Show() + local btn_setting = mainView._view:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView:Show() + end) + -- btn_setting.onClick:Set(function() + -- local _settingView = mainView:NewSettingView() + -- _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + -- _settingView.cd_time = mainView.dismiss_room_cd_time + -- _settingView:Show() - local room = DataManager.CurrenRoom - _settingView.onCallback:Add(function(context) - local _gamectr = ControllerManager.GetController(GameController) - if (room.CurnrenState == StateType.Ready) then - _gamectr:LevelRoom(function(response) - if (response.ReturnCode == 0) then - ViewManager.ChangeView(ViewManager.View_Lobby) - GameApplication.Instance:ShowTips("房间已解散!") - end - end) - else - print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) - if mainView.dismiss_room_cd_time > 0 then - GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") - else - _gamectr:AskDismissRoom() - end - end - end) - end) + -- local room = DataManager.CurrenRoom + -- _settingView.onCallback:Add(function(context) + -- local _gamectr = ControllerManager.GetController(GameController) + -- if (room.CurnrenState == StateType.Ready) then + -- _gamectr:LevelRoom(function(response) + -- if (response.ReturnCode == 0) then + -- ViewManager.ChangeView(ViewManager.View_Lobby) + -- GameApplication.Instance:ShowTips("房间已解散!") + -- end + -- end) + -- else + -- -- print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + -- if mainView.dismiss_room_cd_time > 0 then + -- GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + -- else + -- _gamectr:AskDismissRoom() + -- end + -- end + -- end) + -- end) - self._tex_data = right_panel:GetChild("tex_data") - self._tex_time = right_panel:GetChild("tex_time") - self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") - self._xinhao = right_panel:GetController("xinhao") - self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") - self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") - self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + -- self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = mainView._view:GetChild("Text_Time") + self._pb_batteryLevel = mainView._view:GetChild("PB_Battery") + -- self._xinhao = right_panel:GetController("xinhao") + -- self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + -- self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + -- self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") - self.ctr_log = right_panel:GetController("log") - local btn_log = right_panel:GetChild("btn_log") - btn_log.onClick:Set(function() - if self.onLogCallback then - self.onLogCallback() - end - end) + -- self.ctr_log = right_panel:GetController("log") + -- local btn_log = right_panel:GetChild("btn_log") + -- btn_log.onClick:Set(function() + -- if self.onLogCallback then + -- self.onLogCallback() + -- end + -- end) - self._total_time = 0 - self:__UpdateTime() - - -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) - -- self._timer:Start() + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() end -function RunFast_RightPanelView.new(mainView,view) - setmetatable(M, {__index = MainRightPanelView}) - local self = setmetatable({}, {__index = M}) +function RunFast_RightPanelView.new(mainView, view) + setmetatable(M, { __index = MainRightPanelView }) + local self = setmetatable({}, { __index = M }) self.class = "RunFast_RightPanelView" - __init(self,mainView,view) - return self + __init(self, mainView, view) + return self end + function M:__UpdateTime() - self._tex_data.text = os.date("%Y-%m-%d") - self._tex_time.text = os.date("%H:%M") - if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then - self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() - end + -- self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end - local NetworkReachability = UnityEngine.NetworkReachability - local _client = ControllerManager.GameNetClinet - if not _client then return end - local ping = _client:getAveragePingTime() - if not ping then return end - ping = math.floor(ping / 2) - if ping > 300 then ping =300 end - if ping <= 100 then - self.ctr_xh.selectedIndex = 0 - elseif ping <= 300 then - self.ctr_xh.selectedIndex = 1 - else - self.ctr_xh.selectedIndex = 2 - end - self._tex_ping.text = ping .. "ms" + -- local NetworkReachability = UnityEngine.NetworkReachability + -- local _client = ControllerManager.GameNetClinet + -- if not _client then return end + -- local ping = _client:getAveragePingTime() + -- if not ping then return end + -- ping = math.floor(ping / 2) + -- if ping > 300 then ping = 300 end + -- if ping <= 100 then + -- self.ctr_xh.selectedIndex = 0 + -- elseif ping <= 300 then + -- self.ctr_xh.selectedIndex = 1 + -- else + -- self.ctr_xh.selectedIndex = 2 + -- end + -- self._tex_ping.text = ping .. "ms" end -return M \ No newline at end of file +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua index 9d7c2dfb..12e96ae7 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua @@ -7,11 +7,11 @@ local M = {} --- Create a new RoomConfig function M.new(config) - setmetatable(M,{__index = RoomConfig}) - local self = setmetatable({}, {__index = M}) - RoomConfig.init(self,config) + setmetatable(M, { __index = RoomConfig }) + local self = setmetatable({}, { __index = M }) + RoomConfig.init(self, config) self.class = "RunFast_RoomConfig" - self.config=config + self.config = config self.Leaf = config.leaf self.Rule = config.rule self.Times = config.times @@ -21,16 +21,16 @@ function M.new(config) self.AA = config.aa self.PlayerNum = config.maxPlayers self.showlength = config.showlength - self.fourBeltThree=config.fourBeltThree - self.demolition=config.demolition - self.fangzuobi=config.fangzuobi - self.planelack=config.planelack - self.threelack=config.threelack - self.threeA=config.threeA - self.tuoguan_active_time=config.tuoguan_active_time - self.tuoguan=config.tuoguan - self.tuoguan_result_type=config.tuoguan_result_type - self.isNonnegative=config.isNonnegative + self.fourBeltThree = config.fourBeltThree + self.demolition = config.demolition + self.fangzuobi = config.fangzuobi + self.planelack = config.planelack + self.threelack = config.threelack + self.threeA = config.threeA + self.tuoguan_active_time = config.tuoguan_active_time + self.tuoguan = config.tuoguan + self.tuoguan_result_type = config.tuoguan_result_type + self.isNonnegative = config.isNonnegative self.sandaidan = config.sandaidan self.isHidden = config.isHidden self.ba = config.ba @@ -47,21 +47,21 @@ function M.new(config) else self.daniao = 0 end - + if self.isNonnegative == nil then self.isNonnegative = 0 end - self.energyTab=config.energyTab - - if self.energyTab==nil then - self.energyTab=0 + self.energyTab = config.energyTab + + if self.energyTab == nil then + self.energyTab = 0 end - + return self end --[[function M:GetDes(sp) - sp = sp or " " + sp = sp or " " local str = "" -- str = str.. self.Times.."局"..sp str = str .. RoomConfig.GetDes(self, sp).." " @@ -93,7 +93,7 @@ end str = str .. sp1..sp end end - + if self.Rule == 1 then str = str.. "第一局黑桃3先出,随后赢家先出".."\n" else @@ -215,7 +215,7 @@ end str = str .. sp1..sp end end - + if self.sandaidan == 1 then str = str.. "\n三张飞机带单或者对子\n" end @@ -293,9 +293,9 @@ end str = str .. sp1..sp end end - + if self.piao == 0 then - + elseif self.piao == 1 then str = str.. "飘123" count=count+1 @@ -322,7 +322,7 @@ end end str = str .. sp1..sp end - elseif self.piao == 3 then + elseif self.piao == 3 then str = str.. "飘258" count=count+1 if count%2==0 then @@ -388,97 +388,95 @@ function M:GetDes(sp) -- str = str.. self.Times.."局"..sp str = str .. RoomConfig.GetDes(self, sp) if self.Leaf == 1 then - str = str.. "15张玩法"..sp + str = str .. "15张玩法" .. sp else - str = str.. "16张玩法"..sp + str = str .. "16张玩法" .. sp end - + if self.Rule == 1 then - str = str.. "第一局黑桃3先出,随后赢家先出"..sp + str = str .. "第一局黑桃3先出,随后赢家先出" .. sp else - str = str.. "第一局系统随机选一张先出,随后赢家先出"..sp + str = str .. "第一局系统随机选一张先出,随后赢家先出" .. sp end if self.WillBeOut == 1 then - str = str.. "能出必出"..sp + str = str .. "能出必出" .. sp else - str = str.. "可不必出"..sp + str = str .. "可不必出" .. sp end if self.showlength == 1 then - str = str.. "显示剩余牌"..sp + str = str .. "显示剩余牌" .. sp end if self.fourBeltThree == 3 then - str = str.. "四带三"..sp + str = str .. "四带三" .. sp elseif self.fourBeltThree == 2 then - str = str.. "四带二"..sp + str = str .. "四带二" .. sp end if self.Heart10 == 1 then - str = str.. "红桃10分数翻倍"..sp + str = str .. "红桃10分数翻倍" .. sp end if self.BombSpring == 1 then - str = str.. "4个3 或者3个A 1个2 春天"..sp + str = str .. "4个3 或者3个A 1个2 春天" .. sp end if self.demolition == 1 then - str = str.. "炸弹不能拆"..sp + str = str .. "炸弹不能拆" .. sp end - if self.fangzuobi == 1 and self.PlayerNum==3 then - str = str.. "防作弊"..sp + if self.fangzuobi == 1 and self.PlayerNum == 3 then + str = str .. "防作弊" .. sp end - + if self.sandaidan == 1 then - str = str.. "三张飞机带单或者对子"..sp + str = str .. "三张飞机带单或者对子" .. sp end if self.ba == 1 then - str = str.. "炸弹分数算赢家"..sp + str = str .. "炸弹分数算赢家" .. sp end if self.fs == 1 then - str = str.. "反春天"..sp + str = str .. "反春天" .. sp end if self.planelack == 1 then - str = str.. "飞机少带可接完"..sp + str = str .. "飞机少带可接完" .. sp end if self.threelack == 1 then - str = str.. "三张少带可接完"..sp + str = str .. "三张少带可接完" .. sp end - if self.threeA ==1 then - str = str.. "三张A算炸弹"..sp + if self.threeA == 1 then + str = str .. "三张A算炸弹" .. sp end - + if self.piao == 0 then - + elseif self.piao == 1 then - str = str.. "飘123"..sp + str = str .. "飘123" .. sp elseif self.piao == 2 then - str = str.. "飘235"..sp - elseif self.piao == 3 then - str = str.. "飘258"..sp + str = str .. "飘235" .. sp + elseif self.piao == 3 then + str = str .. "飘258" .. sp end if self.daniao == 1 then - str = str.. "打鸟+10"..sp + str = str .. "打鸟+10" .. sp elseif self.daniao == 2 then - str = str.. "打鸟+20"..sp + str = str .. "打鸟+20" .. sp elseif self.daniao == 3 then - str = str.. "打鸟+50"..sp + str = str .. "打鸟+50" .. sp end return str end - function M:GetGameJS() - local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/gamerule") - return gamerulepanel + local gamerulepanel = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/gamerule") + return gamerulepanel end - function M:GetGameSMSize() - return 467,500 + return 467, 500 end function M:GetGameName() @@ -489,4 +487,4 @@ end -- return self.ShowNumber == 1 --end -return M \ No newline at end of file +return M diff --git a/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png b/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png index 85f03107..e078dbbb 100644 Binary files a/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png and b/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png differ diff --git a/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes b/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes index 8d46756e..f8239774 100644 Binary files a/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes and b/qyq_new_unity/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0.png b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0.png index 7a8cce42..83b76b2d 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0.png and b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0_1.png b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0_1.png index e921c960..15f2dbf8 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0_1.png and b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas0_1.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9t.png b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9t.png index 4416f295..bc07b6f1 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9t.png and b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9t.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9u.png b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9u.png index cef6e1ef..0fd687a2 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9u.png and b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_atlas_rbpg9u.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_fui.bytes b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_fui.bytes index bd66e581..2721be6a 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_fui.bytes and b/qyq_new_unity/Assets/ART/base/ui/Extend_Poker_FanPaoFa_fui.bytes differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0.png index 743eac91..264250a7 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_1.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_1.png index c1042649..97e3cd5a 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_1.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_1.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_2.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_2.png index 96794687..998d2e45 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_2.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_2.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_3.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_3.png index 17776330..24dfac85 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_3.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_3.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_4.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_4.png index 4077b487..c1441f57 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_4.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_4.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_5.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_5.png index 21dde2c5..64132595 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_5.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_5.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_6.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_6.png index 8df0760c..cab171e9 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_6.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_6.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_7.png b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_7.png index 70b3e020..7e76fd6b 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_7.png and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_atlas0_7.png differ diff --git a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_fui.bytes b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_fui.bytes index 4e9249b3..0b6704df 100644 Binary files a/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_fui.bytes and b/qyq_new_unity/Assets/ART/base/ui/Main_RunBeard_bak_fui.bytes differ diff --git a/wb_new_ui/.objs/fonts.json b/wb_new_ui/.objs/fonts.json index 5445bed3..4560ef85 100644 --- a/wb_new_ui/.objs/fonts.json +++ b/wb_new_ui/.objs/fonts.json @@ -1,5 +1,8 @@ ui://27vd145btjnvcfo ui://27vd145btjnvcfn +ui://27vd145bik9v7imk +ui://27vd145bik9v7imf +ui://27vd145bik9v7img ui://27vd145bilon7ia1 ui://27vd145bou9f6r ui://27vd145bg2mo7ij0 @@ -7,6 +10,9 @@ ui://27vd145b9q7vhyt ui://27vd145boviihyz ui://27vd145bqz637ij2 ui://27vd145bz5om44 +ui://27vd145bik9v7ing +ui://27vd145bcv577ioj +ui://27vd145bik9v7imb ui://3qr8nmi47q1m2h ui://fnuxqeflkllg1u ui://fnuxqeflkllg1v @@ -16,6 +22,16 @@ ui://1utjt0r2ufu98l ui://1utjt0r2ufu98k ui://ppu1wv7699we4s ui://ppu1wv7699we2l +ui://8wph7p8nyffn2m +ui://8wph7p8nyffnhf +ui://8wph7p8nyffnhe +ui://8wph7p8nyffnn9 +ui://8wph7p8nyffnjx +ui://8wph7p8nyffn8z +ui://8wph7p8nyffng +ui://8wph7p8nyffn1e +ui://8wph7p8nyffn7w +ui://8wph7p8nyffn89 ui://9n9stu2enaueci9 ui://9n9stu2enauecht ui://eyxz924gffp34g diff --git a/wb_new_ui/.objs/metas/0khx14ar/e0py2.info b/wb_new_ui/.objs/metas/0khx14ar/e0py2.info index 15a59a1f..e5ec0083 100644 --- a/wb_new_ui/.objs/metas/0khx14ar/e0py2.info +++ b/wb_new_ui/.objs/metas/0khx14ar/e0py2.info @@ -1,21 +1,4 @@ { - "objectStatus": { - "n2": { - "hidden": true - }, - "n28_thxk": { - "hidden": true - }, - "n24_xn94": { - "hidden": true - }, - "n18_nld2": { - "hidden": true - }, - "n20_nld2": { - "hidden": true - } - }, "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info b/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info index de50202c..cf631de7 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/fn7fao.info @@ -1,58 +1,10 @@ { "objectStatus": { - "n54_lwcl": { - "hidden": true - }, - "n125_g8kk": { - "hidden": true, + "n111_ker3": { "collapsed": true }, - "n122_g8kk": { - "hidden": true - }, - "n120_g8kk": { - "hidden": true - }, - "n89_goju": { - "hidden": true - }, - "n130_naup": { - "collapsed": true, - "locked": true, - "hidden": true - }, - "n140_csp4": { - "hidden": true - }, - "n108_ker3": { - "hidden": true - }, - "n50_lwcl": { - "hidden": true - }, - "n145_h5le": { - "locked": true - }, "n100_lumr": { "hidden": true - }, - "n138_csp4": { - "hidden": true - }, - "n49_lwcl": { - "hidden": true - }, - "n110_ker3": { - "hidden": true - }, - "n119_g8kk": { - "hidden": true - }, - "n113_ker3": { - "hidden": true - }, - "n51_lwcl": { - "hidden": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info b/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info index 0e4619a4..e5ec0083 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/lumrgj.info @@ -1,27 +1,4 @@ { - "objectStatus": { - "n117_xbqu": { - "hidden": true - }, - "n112_ker3": { - "hidden": true - }, - "n138_m16m": { - "hidden": true - }, - "n137_csp4": { - "hidden": true - }, - "n135_csp4": { - "hidden": true - }, - "n120_t3ax": { - "hidden": true - }, - "n103_lumr": { - "hidden": true - } - }, "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info b/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info index e733cca6..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info +++ b/wb_new_ui/.objs/metas/2d9xdj6z/nlwcgk.info @@ -1,28 +1 @@ -{ - "objectStatus": { - "n8_nlwc": { - "hidden": true - }, - "n14_mkh9": { - "hidden": true - }, - "n26_ht5v": { - "hidden": true - }, - "n24_cvc8": { - "hidden": true - }, - "n18_ovii": { - "hidden": true - }, - "n6_nlwc": { - "hidden": true - }, - "n13_mkh9": { - "hidden": true - }, - "n9_bqt1": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/2zlli80m/r6cyce9.info b/wb_new_ui/.objs/metas/2zlli80m/r6cyce9.info index 824469bb..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/2zlli80m/r6cyce9.info +++ b/wb_new_ui/.objs/metas/2zlli80m/r6cyce9.info @@ -1,13 +1 @@ -{ - "objectStatus": { - "n23_ab5p": { - "hidden": true - }, - "n46_rtih": { - "hidden": true - }, - "n22_ab5p": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/2zlli80m/w9te0.info b/wb_new_ui/.objs/metas/2zlli80m/w9te0.info index f99376a4..1a0a3e8b 100644 --- a/wb_new_ui/.objs/metas/2zlli80m/w9te0.info +++ b/wb_new_ui/.objs/metas/2zlli80m/w9te0.info @@ -1,14 +1,5 @@ { "objectStatus": { - "n26": { - "collapsed": true - }, - "n72_ab5p": { - "hidden": true - }, - "n74_xn94": { - "hidden": true - }, "n73_ab5p": { "collapsed": true } diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffn7j.info b/wb_new_ui/.objs/metas/8wph7p8n/yffn7j.info new file mode 100644 index 00000000..deb80b60 --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffn7j.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n3_e54q": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffn8s.info b/wb_new_ui/.objs/metas/8wph7p8n/yffn8s.info new file mode 100644 index 00000000..3587a727 --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffn8s.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n77_n9qr": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffn9p.info b/wb_new_ui/.objs/metas/8wph7p8n/yffn9p.info new file mode 100644 index 00000000..b3dfde68 --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffn9p.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n64_n9qr": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffncb.info b/wb_new_ui/.objs/metas/8wph7p8n/yffncb.info new file mode 100644 index 00000000..a8d6d570 --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffncb.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n47_kx91": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffnj9.info b/wb_new_ui/.objs/metas/8wph7p8n/yffnj9.info new file mode 100644 index 00000000..d16afb9e --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffnj9.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n7_f2pr": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffnk6.info b/wb_new_ui/.objs/metas/8wph7p8n/yffnk6.info new file mode 100644 index 00000000..6f379c06 --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffnk6.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n102_t2e2": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffnmy.info b/wb_new_ui/.objs/metas/8wph7p8n/yffnmy.info new file mode 100644 index 00000000..54a8b71c --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffnmy.info @@ -0,0 +1,36 @@ +{ + "objectStatus": { + "n185_yffn": { + "collapsed": true + }, + "n155_diqo": { + "collapsed": true + }, + "n87_q50p": { + "hidden": true + }, + "n86_q50p": { + "collapsed": true + }, + "n179_yffn": { + "collapsed": true + }, + "n131_ckvb": { + "hidden": true, + "collapsed": true + }, + "n164_ukp7": { + "locked": true, + "collapsed": true + }, + "n166_ukp7": { + "hidden": true + }, + "n163_ukp7": { + "collapsed": true + }, + "n93_eclw": { + "collapsed": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/8wph7p8n/yffnnp.info b/wb_new_ui/.objs/metas/8wph7p8n/yffnnp.info new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/wb_new_ui/.objs/metas/8wph7p8n/yffnnp.info @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info index 46e69696..44c2646b 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info +++ b/wb_new_ui/.objs/metas/m7iejg46/10snh5j.info @@ -1,50 +1,10 @@ { "objectStatus": { - "n154_cioe": { - "hidden": true - }, - "n152_cioe": { - "hidden": true - }, - "n214_ovii": { - "hidden": true - }, - "n191_xsk4": { + "n206_jvvo": { "collapsed": true }, - "n204_jvvo": { - "hidden": true - }, - "n241_n6w8": { - "hidden": true - }, - "n243_n6w8": { - "hidden": true - }, - "n236_o6b1": { - "hidden": true, + "n294_ik9v": { "collapsed": true - }, - "n228_csp4": { - "hidden": true - }, - "n153_cioe": { - "hidden": true - }, - "n233_o6b1": { - "hidden": true - }, - "n229_csp4": { - "hidden": true - }, - "n216_ovii": { - "hidden": true - }, - "n171_mpll": { - "hidden": true - }, - "n271_avqi": { - "hidden": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/m7iejg46/f6brhww.info b/wb_new_ui/.objs/metas/m7iejg46/f6brhww.info index be6da697..b1ad28a3 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/f6brhww.info +++ b/wb_new_ui/.objs/metas/m7iejg46/f6brhww.info @@ -1,10 +1,7 @@ { "objectStatus": { - "n56_j120": { - "hidden": true - }, - "n54_j120": { - "hidden": true + "n20_oj7k": { + "collapsed": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info index 4171dcf4..552d3e7a 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info +++ b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info @@ -3,6 +3,9 @@ "n87_csp4": { "hidden": true }, + "n96_hz87": { + "collapsed": true + }, "n79_ovii": { "hidden": true } diff --git a/wb_new_ui/.objs/metas/m7iejg46/hwww2f.info b/wb_new_ui/.objs/metas/m7iejg46/hwww2f.info index 5d583df9..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/hwww2f.info +++ b/wb_new_ui/.objs/metas/m7iejg46/hwww2f.info @@ -1,25 +1 @@ -{ - "objectStatus": { - "n9_m1dc": { - "hidden": true - }, - "n8_m1dc": { - "hidden": true - }, - "n12_quwh": { - "hidden": true - }, - "n7_nyna": { - "collapsed": true - }, - "n11_rfcn": { - "hidden": true - }, - "n13_ilon": { - "hidden": true - }, - "n16_kt8n": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info b/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info index a6d0f289..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info +++ b/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info @@ -1,7 +1 @@ -{ - "objectStatus": { - "n53_n96g": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/ilon7ia2.info b/wb_new_ui/.objs/metas/m7iejg46/ilon7ia2.info index aa6d1ec4..c2330ec2 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/ilon7ia2.info +++ b/wb_new_ui/.objs/metas/m7iejg46/ilon7ia2.info @@ -1,7 +1,7 @@ { "objectStatus": { - "n109_ovii": { - "hidden": true + "n221_cv57": { + "collapsed": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/ilon7ias.info b/wb_new_ui/.objs/metas/m7iejg46/ilon7ias.info index 0c6f5467..0537f658 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/ilon7ias.info +++ b/wb_new_ui/.objs/metas/m7iejg46/ilon7ias.info @@ -1,25 +1,7 @@ { "objectStatus": { - "n69_jd7v": { - "hidden": true - }, - "n145_imp5": { - "hidden": true - }, - "n132_z384": { - "hidden": true - }, - "n8_kwi0": { - "hidden": true - }, - "n35_rpaz": { - "hidden": true - }, - "n33_rpaz": { - "hidden": true - }, - "n7_kwi0": { - "hidden": true + "n150_hz87": { + "collapsed": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/ilon7ibc.info b/wb_new_ui/.objs/metas/m7iejg46/ilon7ibc.info index 5695d903..356491bf 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/ilon7ibc.info +++ b/wb_new_ui/.objs/metas/m7iejg46/ilon7ibc.info @@ -3,8 +3,8 @@ "n44_rpaz": { "collapsed": true }, - "n79_imp5": { - "hidden": true + "n47_rpaz": { + "collapsed": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info b/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info index f64d3345..686c5dea 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info +++ b/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info @@ -1,13 +1,16 @@ { "objectStatus": { - "n86_kwi0": { - "hidden": true + "n155_sbng": { + "collapsed": true }, - "n157_sbng": { - "hidden": true + "n197_imp5": { + "collapsed": true }, - "n118_l679": { - "hidden": true + "n83_kwi0": { + "collapsed": true + }, + "n134_lcv1": { + "collapsed": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info index e5ec0083..7dd9f9c4 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info +++ b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info @@ -1,4 +1,9 @@ { + "objectStatus": { + "n216_yvb2": { + "collapsed": true + } + }, "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hm5.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hm5.info index 04ec7fab..ea51502c 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hm5.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hm5.info @@ -1,14 +1,8 @@ { "objectStatus": { - "n118_fcju": { - "hidden": true - }, "n115_dfkc": { "hidden": true }, - "n120_t8gf": { - "hidden": true - }, "n108_kwi0": { "hidden": true } diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hma.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hma.info index 9cf90f1e..bd8bfd29 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hma.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hma.info @@ -19,7 +19,8 @@ "hidden": true }, "n40_gltd": { - "hidden": true + "hidden": true, + "collapsed": true }, "n74_s9vt": { "hidden": true diff --git a/wb_new_ui/.objs/metas/m7iejg46/kwi0hmd.info b/wb_new_ui/.objs/metas/m7iejg46/kwi0hmd.info index b593e373..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/kwi0hmd.info +++ b/wb_new_ui/.objs/metas/m7iejg46/kwi0hmd.info @@ -1,7 +1 @@ -{ - "objectStatus": { - "n44_ugxq": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info b/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info index 4f94dd54..e7479945 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info +++ b/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info @@ -2,9 +2,6 @@ "objectStatus": { "n98_k5m9": { "hidden": true - }, - "n100_m16m": { - "hidden": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/m7iejg46/l679hws.info b/wb_new_ui/.objs/metas/m7iejg46/l679hws.info index 5308e708..4bdca5e5 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/l679hws.info +++ b/wb_new_ui/.objs/metas/m7iejg46/l679hws.info @@ -3,7 +3,7 @@ "n123_omkm": { "hidden": true }, - "n142_m16m": { + "n86_kwi0": { "hidden": true }, "n115_l679": { @@ -11,9 +11,6 @@ }, "n122_j120": { "hidden": true - }, - "n86_kwi0": { - "hidden": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/m16m7igb.info b/wb_new_ui/.objs/metas/m7iejg46/m16m7igb.info index 9e26dfee..65778ede 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/m16m7igb.info +++ b/wb_new_ui/.objs/metas/m7iejg46/m16m7igb.info @@ -1 +1,7 @@ -{} \ No newline at end of file +{ + "objectStatus": { + "n3_imp5": { + "collapsed": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/r0qx7i6u.info b/wb_new_ui/.objs/metas/m7iejg46/r0qx7i6u.info index 667057f8..7b05fc42 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/r0qx7i6u.info +++ b/wb_new_ui/.objs/metas/m7iejg46/r0qx7i6u.info @@ -1,5 +1,11 @@ { "objectStatus": { + "n62_r0qx": { + "hidden": true + }, + "n47_sbng": { + "collapsed": true + }, "n33_p747": { "hidden": true } diff --git a/wb_new_ui/.objs/metas/m7iejg46/xed47ion.info b/wb_new_ui/.objs/metas/m7iejg46/xed47ion.info new file mode 100644 index 00000000..0201e379 --- /dev/null +++ b/wb_new_ui/.objs/metas/m7iejg46/xed47ion.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n17_jg0y": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info index def0c807..36c1a1f8 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6m.info @@ -1,6 +1,9 @@ { "objectStatus": { - "n69_jd7v": { + "n33_rpaz": { + "hidden": true + }, + "n91_task": { "hidden": true }, "n142_ufim": { @@ -15,14 +18,20 @@ "n113_csp4": { "hidden": true }, - "n33_rpaz": { - "hidden": true - }, - "n134_yscl": { + "n85_t1hq": { "hidden": true }, "n35_rpaz": { "hidden": true + }, + "n51_jd7v": { + "hidden": true + }, + "n69_jd7v": { + "hidden": true + }, + "n112_csp4": { + "hidden": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info b/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info index deb9dd67..0bcd6513 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info +++ b/wb_new_ui/.objs/metas/m7iejg46/z3847i6r.info @@ -1,24 +1,14 @@ { "objectStatus": { - "n130_yre9": { - "hidden": true - }, - "n136_iaes": { - "hidden": true - }, "n13_gls1": { - "hidden": true - }, - "n78_nk4v": { - "hidden": true + "hidden": true, + "collapsed": true }, "n73_cioe": { - "hidden": true + "hidden": true, + "collapsed": true }, - "n20_gls1": { - "hidden": true - }, - "n79_nk4v": { + "n130_yre9": { "hidden": true } } diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json index f0ec9e63..ce508a79 100644 --- a/wb_new_ui/.objs/workspace.json +++ b/wb_new_ui/.objs/workspace.json @@ -1,53 +1,39 @@ { - "libview.firstColumnWidth": 413, + "libview.firstColumnWidth": 280, "libview.iconScale": 0, "doc.openedDocs": [ - "ui://2d9xdj6zfn7fao", - "ui://27vd145bcvc87i5t", - "ui://27vd145bofsx1e", - "ui://2zlli80mw9te0", - "ui://v0j9abjygq7m8f", - "ui://v0j9abjygq7med", "ui://m7iejg4610snh5j", - "ui://m7iejg46tqi8hwa", - "ui://m7iejg46kwi0hlb", - "ui://2d9xdj6zl0lzb", - "ui://27vd145bg24i7ijv", - "ui://27vd145bg24i7iju", - "ui://m7iejg46lf2qhju", - "ui://27vd145bm16m7iji", - "ui://27vd145bh1uu3f", - "ui://27vd145bh1uu3i", - "ui://m7iejg46r0qx7i70", - "ui://m7iejg46r0qx7i6v", - "ui://2d9xdj6zomkm7cna" + "ui://m7iejg46imp57ih3", + "ui://m7iejg46ozazhxs", + "ui://m7iejg46gls1hif", + "ui://m7iejg46imp57ihy", + "ui://m7iejg46imp57igy", + "ui://m7iejg46xed47ion", + "ui://m7iejg46hsbhhjn", + "ui://m7iejg46t1hqhxw", + "ui://2d9xdj6zsvin7e2f", + "ui://m7iejg46imp57ih1", + "ui://m7iejg46ilon7ibl", + "ui://m7iejg46imp57iht" ], "test.device": "720p Phone", "canvasColor": 10066329, "auxline2": true, - "doc.activeDoc": "ui://v0j9abjygq7med", + "doc.activeDoc": "ui://m7iejg46t1hqhxw", "libview.twoColumn": false, "libview.expandedNodes": [ "27vd145b", "/", "27vd145b", - "/buttons/", - "27vd145b", - "/component/", - "27vd145b", - "/component/create_room/", - "27vd145b", - "/font/", - "27vd145b", - "/font/images/", - "27vd145b", - "/font/images/setting/", - "v0j9abjy", + "/images/", + "m7iejg46", "/", - "v0j9abjy", + "m7iejg46", "/component/", - "v0j9abjy", - "/component/clearing/" + "m7iejg46", + "/component/nav/", + "m7iejg46", + "/images/" ], "auxline1": true, "snapToGrid": true, diff --git a/wb_new_ui/assets/Common/Gcm_BaseView.xml b/wb_new_ui/assets/Common/Gcm_BaseView.xml index 9eadb8a6..5e63a242 100644 --- a/wb_new_ui/assets/Common/Gcm_BaseView.xml +++ b/wb_new_ui/assets/Common/Gcm_BaseView.xml @@ -1,10 +1,10 @@ - + - + - + diff --git a/wb_new_ui/assets/Common/Gcm_BaseViewTips.xml b/wb_new_ui/assets/Common/Gcm_BaseViewTips.xml index 9eadb8a6..5e63a242 100644 --- a/wb_new_ui/assets/Common/Gcm_BaseViewTips.xml +++ b/wb_new_ui/assets/Common/Gcm_BaseViewTips.xml @@ -1,10 +1,10 @@ - + - + - + diff --git a/wb_new_ui/assets/Common/Gcm_BaseView_Full.xml b/wb_new_ui/assets/Common/Gcm_BaseView_Full.xml index b161880f..b224bde2 100644 --- a/wb_new_ui/assets/Common/Gcm_BaseView_Full.xml +++ b/wb_new_ui/assets/Common/Gcm_BaseView_Full.xml @@ -1,10 +1,10 @@ - + - + - + diff --git a/wb_new_ui/assets/Common/Gcm_Window.xml b/wb_new_ui/assets/Common/Gcm_Window.xml index c1d7d425..9306857d 100644 --- a/wb_new_ui/assets/Common/Gcm_Window.xml +++ b/wb_new_ui/assets/Common/Gcm_Window.xml @@ -1,12 +1,12 @@ - + - + - + diff --git a/wb_new_ui/assets/Common/Gcm_Window_Full.xml b/wb_new_ui/assets/Common/Gcm_Window_Full.xml index a1028192..33be89af 100644 --- a/wb_new_ui/assets/Common/Gcm_Window_Full.xml +++ b/wb_new_ui/assets/Common/Gcm_Window_Full.xml @@ -1,12 +1,12 @@ - + - + - + diff --git a/wb_new_ui/assets/Common/MessageBox.xml b/wb_new_ui/assets/Common/MessageBox.xml index 3651d6e0..88986122 100644 --- a/wb_new_ui/assets/Common/MessageBox.xml +++ b/wb_new_ui/assets/Common/MessageBox.xml @@ -1,22 +1,18 @@ - + - -