diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua index b6a64562..b0af976e 100644 --- a/lua_probject/base_project/Game/Controller/LoginController.lua +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -14,6 +14,7 @@ end local _LocalConfigAllGame = { 10, 33, + 65, 66, 86, 87, 88, 89 } 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 77c854ec..72d35da8 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua @@ -37,10 +37,116 @@ 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') + + -------------------------------------------------------------- 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 @@ -55,50 +161,10 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim) 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 == 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) + + self:FillPoker(poker_item, "", code) end self.move_cor = coroutine.start(function() coroutine.wait(0.1) @@ -106,33 +172,10 @@ 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 == 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) + + self:FillPoker(poker_item, "", code) end end --self.ctr_outpoker.selectedIndex = 1 @@ -371,6 +414,7 @@ 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) 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 98d670d4..4fabc736 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua @@ -79,10 +79,10 @@ function M:init() 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._offset_x = 100 -------------------------------------------------------------- end @@ -222,7 +222,6 @@ function M:InitPoker(pokerList, isPlayAni, open) self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) end table.sort(pokerList) - for i = #pokerList, 1, -1 do local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) local card_flower_code = pokerList[i] @@ -239,6 +238,7 @@ function M:InitPoker(pokerList, isPlayAni, open) self.card_list[#self.card_list + 1] = card_view table.sort(self.card_list, tableSortNumber) + self:AddTouchMoveEvent(self._view_handCard) if i == #pokerList then for j = 1, #self.card_list do @@ -246,7 +246,7 @@ 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 @@ -294,6 +294,7 @@ function M:InitPoker(pokerList, isPlayAni, open) self.card_list[#self.card_list + 1] = card_view 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 @@ -301,7 +302,7 @@ function M:InitPoker(pokerList, isPlayAni, open) -- card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) if open ~= 1 then -- body - self:AddCardMoveEvent(card) + self:AddCardTouchEvent(card) end end end @@ -315,111 +316,133 @@ function M:updatePoker() self:InitPoker(templist, false, 0) end -function M:AddCardMoveEvent(card) +-- function M:AddCardMoveEvent(card) +-- local send_card = {} + +-- card.btn_card.onTouchBegin:Set( +-- function(context) +-- self.send_card = {} +-- if card.btn_card.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.onClick:Add(self.touchMoveFun) +-- card.btn_card.onTouchEnd:Set( +-- function(context) +-- local downCards = #self.card_list +-- local xy = fristCard: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 < 316 then +-- local max_x +-- local min_x +-- if xy.x - self.touchBegin.x > 0 then +-- max_x = xy.x +-- min_x = self.touchBegin.x +-- else +-- max_x = self.touchBegin.x +-- min_x = xy.x +-- end + +-- for k = 1, #self.card_list do +-- local card = self.card_list[k] +-- if not card.btn_card.selected then +-- downCards = downCards - 1 +-- end +-- -- 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, 0) +-- -- 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 +-- if +-- (card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x)) +-- and card.btn_card.x < max_x and card.card_isTouchable == 0 +-- then +-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) +-- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") +-- end +-- end +-- end + +-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') + +-- Stage.inst:ResetInputState() +-- card.btn_card.onTouchEnd:Set(nil) + +-- if downCards == 0 then +-- self:zhizhanxuanpai() +-- end +-- 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 +-- end +-- ) +-- end + +function M:AddTouchMoveEvent(list) local send_card = {} - card.btn_card.onTouchBegin:Set( + list.onTouchBegin:Set( function(context) self.send_card = {} - if card.btn_card.touchable == false then + if list.touchable == false then return end - local xy = self._view_handCard:GetChildAt(0):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)) -- if xy.y > -21 and xy.y < 316 then self.touchBegin = xy - print("============lingmeng,oveendqian", self.touchBegin.x, self.touchBegin.y) Stage.inst.onTouchMove:Add(self.touchMoveFun) + Stage.inst.onTouchEnd:Add(self.touchMoveEndFun) --Stage.inst.onClick:Add(self.touchMoveFun) - card.btn_card.onTouchEnd:Set( - function(context) - local downCards = #self.card_list - local xy = - self._view_handCard:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x, context - .inputEvent - .y)) - print("============lingmeng,oveend", xy.x, xy.y) - Stage.inst.onTouchMove:Remove(self.touchMoveFun) - --Stage.inst.onClick:onTouchMove(self.touchMoveFun) - -- if xy.y > -21 and xy.y < 316 then - local max_x - local min_x - if xy.x - self.touchBegin.x > 0 then - max_x = xy.x - min_x = self.touchBegin.x - else - max_x = self.touchBegin.x - min_x = xy.x - end - - for k = 1, #self.card_list do - local card = self.card_list[k] - print("lingmeng,oveend2", card.btn_card.x) - if not card.btn_card.selected then - downCards = downCards - 1 - end - -- 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, 0) - -- 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 - if k == #self.card_list then - if - card.btn_card.x > 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 > 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 - - ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') - - Stage.inst:ResetInputState() - card.btn_card.onTouchEnd:Set(nil) - - if downCards == 0 then - self:zhizhanxuanpai() - end - end - ) -- else -- local button = card.btn_card -- button.onChanged:Add( @@ -437,6 +460,17 @@ function M:AddCardMoveEvent(card) ) end +function M:AddCardTouchEvent(card) + card.btn_card.onTouchBegin:Set( + function(context) + if card.btn_card.touchable == false then + return + end + self:SetBtnCardColor(card, 1) + end + ) +end + -- function M:zhizhanxuanpai() --智障选牌 -- print("lingmengxuan", #self.send_card) -- -- body @@ -607,7 +641,11 @@ function M:TouchMoving(context) return end local send_card1 = {} - local xy = self._view_handCard: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 @@ -619,8 +657,8 @@ function M:TouchMoving(context) if card.btn_card.touchable == false or card.card_isTouchable == 1 then else if - card.btn_card.x + self._offset_x > min_x and - card.btn_card.x < max_x + (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 @@ -634,7 +672,8 @@ function M:TouchMoving(context) end end end - elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + -- elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + else max_x = self.touchBegin.x min_x = xy.x for i = 1, #self.card_list do @@ -642,8 +681,8 @@ function M:TouchMoving(context) if card.btn_card.touchable == false or card.card_isTouchable == 1 then else if - card.btn_card.x + self._offset_x > min_x and - card.btn_card.x < max_x + (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 @@ -661,6 +700,57 @@ function M:TouchMoving(context) self.send_card = send_card1 end +function M:TouchMoveEnd(context) + local send_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 + + for k = 1, #self.card_list do + local card = self.card_list[k] + if not card.btn_card.selected then + downCards = downCards - 1 + end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 0) + if + (card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x)) + and card.btn_card.x < max_x + and card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + + ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') + + Stage.inst:ResetInputState() + + if downCards == 0 then + self:zhizhanxuanpai() + end +end + -- function M:SetBtnCardColor(card, num) -- if -- card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and @@ -930,7 +1020,7 @@ end function M:UpdateHandCardsColor() 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 + local num = card_view.btn_card.touchable == true and 0 or 1 self:SetBtnCardColor(card_view, num) end end @@ -940,6 +1030,7 @@ function M:BtnEvent() self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖 self.btn_sendCards = self._view:GetChild('Btn_SendCard') self._ctr_canSendCard = self.btn_sendCards:GetController('can') + self._ctr_canSendCard.selectedIndex = 1 self.btn_sendCards.onClick:Set( function() @@ -1551,6 +1642,7 @@ end function M:Destroy() Stage.inst.onTouchMove:Remove(self.touchMoveFun) + Stage.inst.onTouchEnd:Remove(self.touchMoveEndFun) end return M diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36s.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36s.png.meta index 0efd7db9..bb2ebf1c 100644 --- a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36s.png.meta +++ b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36s.png.meta @@ -88,5 +88,5 @@ TextureImporter: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: - assetBundleName: + assetBundleName: extend/majiang/nancheng/704ffdeb1d214471a2c68eb82f8ff5c9 assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36t.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36t.png.meta index bcf42cfa..811dbb6f 100644 --- a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36t.png.meta +++ b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36t.png.meta @@ -88,5 +88,5 @@ TextureImporter: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: - assetBundleName: + assetBundleName: extend/majiang/nancheng/704ffdeb1d214471a2c68eb82f8ff5c9 assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36u.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36u.png.meta index 76712262..12cf5cb4 100644 --- a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36u.png.meta +++ b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36u.png.meta @@ -88,5 +88,5 @@ TextureImporter: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: - assetBundleName: + assetBundleName: extend/majiang/nancheng/704ffdeb1d214471a2c68eb82f8ff5c9 assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36v.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36v.png.meta index 73a48687..858a6489 100644 --- a/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36v.png.meta +++ b/wb_unity_pro/Assets/ART/extend/majiang/nancheng/ui/Extend_MJ_NanCheng_atlas_nee36v.png.meta @@ -88,5 +88,5 @@ TextureImporter: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: - assetBundleName: + assetBundleName: extend/majiang/nancheng/704ffdeb1d214471a2c68eb82f8ff5c9 assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png new file mode 100644 index 00000000..3a77f500 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png.meta new file mode 100644 index 00000000..b0a46a0a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 10b5d5de3630dac4190bf8b7995c87d4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png new file mode 100644 index 00000000..b21e3da1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png.meta new file mode 100644 index 00000000..30141e71 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: c0f001af1de61b9499734ce63599b319 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3 b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3 new file mode 100644 index 00000000..ecff85f1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3.meta new file mode 100644 index 00000000..50a4f417 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb2y.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b63cdd06cced404381f8febe6363f17 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3 b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3 new file mode 100644 index 00000000..398af510 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3.meta new file mode 100644 index 00000000..9af1b7f0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb31.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e12c995dfeffa8346b04591a7e6dafbe +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3 b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3 new file mode 100644 index 00000000..3a0d1c4f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3.meta new file mode 100644 index 00000000..969cf0d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_ckvb3n.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 21b6c77b9b1009040bf7abf2bde30d45 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes index 724e1235..db86dc9b 100644 Binary files a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png new file mode 100644 index 00000000..5e2f4c74 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png.meta new file mode 100644 index 00000000..dde8ca3f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 92ae0e77e5756714ab03626a8c45209c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/chuntian/b621e2490be5c65ffdd9e03a606c3c9b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes index ba94e46c..37c53644 100644 Binary files a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png index 9509953b..7542f7cd 100644 Binary files a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes index 383a3d10..46486e62 100644 Binary files a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes differ