diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua index 767291aa..1d6c0ff4 100644 --- a/lua_probject/base_project/Game/Controller/GameController.lua +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -62,7 +62,7 @@ function M:init(name) self._eventmap[Protocol.GAME_EVT_DISMISS_ROOM_FAIL] = self.OnEventDismissRoomFail self._eventmap[Protocol.GAME_EVT_INTERACTION] = self.OnEventInteraction - -- self._eventmap[Protocol.GAME_EVT_UPDATE_GPS] = self.OnEventUpdateGPS + -- self._eventmap[Protocol.GAME_EVT_UPDATE_GPS] = self.OnEventUpdateGPS self._eventmap[Protocol.GAME_EVT_KICKED] = self.OnEventKicked self._eventmap[Protocol.GAME_EVT_UPDATE_PLAYERINFO] = self.OnEvtUpdateInfo @@ -198,6 +198,9 @@ end function M:OnEventExitRoomDismiss(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end ControllerManager.ChangeController(LoddyController) DispatchEvent(self._dispatcher, GameEvent.DeskBreak, 1) end @@ -208,6 +211,9 @@ end function M:OnEventDismissRoom(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local room = DataManager.CurrenRoom local req_aid = evt_data['req_aid'] evt_data.req_p = room:GetPlayerById(req_aid) @@ -251,6 +257,9 @@ end function M:OnEventDismissRoomFail(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, GameEvent.DeskBreak, 3) end ) @@ -263,6 +272,9 @@ function M:OnEventPlayerEnter(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end printlog("PlayerEnter:2222") local p = self._room:NewPlayer() local _user @@ -296,6 +308,9 @@ end function M:OnEventPlayerLeave(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local playerid = evt_data['aid'] local p = DataManager.CurrenRoom:GetPlayerById(playerid) self._room:RemovePlayer(p) @@ -308,6 +323,9 @@ end function M:OnEventOnlineState(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local playerid = evt_data['aid'] local online = evt_data['online'] local player = DataManager.CurrenRoom:GetPlayerById(playerid) @@ -323,6 +341,9 @@ end function M:OnEventPlayerReady(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local pid = evt_data['aid'] local p = self._room:GetPlayerById(pid) p.ready = true @@ -344,6 +365,9 @@ end function M:OnEventPlayerXiPaiReady(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local pid = evt_data['aid'] local p = self._room:GetPlayerById(pid) p.ready = true @@ -367,6 +391,9 @@ function M:OnEventInteraction(evt_data) if self._room.ban_chat1 == false or self._room.ban_chat2 == false then self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local playerid = evt_data['playerid'] local p = self._room:GetPlayerById(playerid) local type1 = evt_data['type'] @@ -403,6 +430,9 @@ function M:OnEventKicked() end self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DataManager.CurrenRoom = nil ControllerManager.SetGameNetClient(nil, true) ControllerManager.ChangeController(LoddyController) @@ -443,6 +473,9 @@ end function M:OnEvtUpdateInfo(evt_data) self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local pid = evt_data['aid'] local p = self._room:GetPlayerById(pid) local t = evt_data['type'] @@ -615,3 +648,7 @@ function M:OnEvtOpenGameHuTuoGtips(isAuto) data.autoCard = isAuto _client:send(Protocol.GAME_AUTO_CARD, data) end + +function M:SetPopCallback(callback) + self._callback_popEvent = callback +end diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua index 029a6adc..e7d01880 100644 --- a/lua_probject/base_project/Game/View/MainView.lua +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -31,6 +31,10 @@ function M:init() UIPackage.AddPackage('base/chat/ui/Chat') self.Fix_Msg_Chat = ViewUtil.Fix_Msg_Chat -- 自动回复消息列表 self.Fix_Msg_Chat2 = nil -- 自动回复列表2 + self._gamectr:SetPopCallback(function(falg) + print("lingmeng self._popEvent", falg) + self._popEvent = falg + end) self:InitView() self:SetTuoGuanState() end @@ -571,7 +575,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.PlayerState, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local p = arg[1] local info = _player_info[self:GetPos(p.seat)] @@ -588,7 +592,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.DeskBreak, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local code = arg[1] if code == 0 then @@ -618,7 +622,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.Interaction, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local p = arg[1] if not p or not p.seat or p.seat == 0 then @@ -664,7 +668,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.OnKicked, function() - self._popEvent = true + -- self._popEvent = true printlog("GameEvent.OnKicked====》》》》》") self:UnmarkSelfTuoguan() local _curren_msg = MsgWindow.new(self._root_view, '由于长时间未准备,你已被踢出房间!', MsgWindow.MsgMode.OnlyOk) @@ -680,7 +684,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.TupGuanOpen, function(...) - self._popEvent = true + -- self._popEvent = true --print("刷新托管数据=====") local arg = { ... } local p = arg[1] @@ -779,7 +783,7 @@ function M:GetReadyNum() end function M:OnPlayerEnter(...) - self._popEvent = true + -- self._popEvent = true printlog("进入房间222222222222222222++++++++++++++++++++++++++++") local arg = { ... } local p = arg[1] @@ -810,7 +814,7 @@ function M:OnPlayerEnter(...) end function M:OnPlayerReady(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local p = arg[1] @@ -846,7 +850,7 @@ function M:OnPlayerReady(...) end function M:OnUpdateInfo(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local p = arg[1] local t = arg[2] @@ -933,7 +937,7 @@ function M:UnmarkSelfTuoguan() end function M:OnPlayerLeave(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local p = arg[1] local info = self._player_info[self:GetPos(p.seat)] @@ -1010,6 +1014,7 @@ function M:OnUpdate() self._gamectr:ResetConnect() end end + print("lingmeng self._popEvent3", self._popEvent) --func() 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 521775ff..cc62862c 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua @@ -17,7 +17,7 @@ end function M:Init() self._viewList_partner = self._view:GetChild('lst_partner') self._data_choosePlayer = { uid = DataManager.SelfUser.account_id, nick = DataManager.SelfUser.nick_name } - --将外面设置为最外圈页面 + --将外面设置为最外圈页面 self.ctr_index.selectedIndex = #self.page_config end @@ -26,13 +26,16 @@ function M:InitInfo() self._viewList_partner:RemoveChildren() local obj = self._viewList_partner:AddItemFromPool() + self._ctr_tongji.selectedIndex = 1 self:PartnerRender( { uid = DataManager.SelfUser.account_id, nick = DataManager.SelfUser.nick_name }, obj) -- obj:GetController('show').selectedIndex = 1 obj.data.selected = true self:RecursionGetNumber1(0, DataManager.SelfUser.account_id, {}) - --将外面设置为最外圈页面 + --将外面设置为最外圈页面 self.ctr_index.selectedIndex = #self.page_config + obj:GetController('arrow').selectedIndex = 1 + self._data_selectedData = obj end function M:SetRecursionGetNumber1Info(id, tempTable) @@ -57,7 +60,10 @@ function M:PartnerRender(data, obj) obj.data.info = data self._map_members[data.uid] = obj obj:GetChild('area').onClick:Set(function() - self.lastY = self._viewList_partner.scrollPane.posY + self.lastY = self._viewList_partner.scrollPane.posY + self._data_selectedData:GetController('arrow').selectedIndex = 0 + obj:GetController('arrow').selectedIndex = 1 + self._data_selectedData = obj if obj.data.info.parentId then self:SetListShow(self._map_members[obj.data.info.parentId].data.listInfo, 0, data.uid) end @@ -81,6 +87,7 @@ function M:PartnerRender(data, obj) else self.ctr_index.selectedIndex = #self.page_config end + self._ctr_tongji.selectedIndex = 1 end) end diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua index 8091112a..6b106f6e 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua @@ -63,6 +63,7 @@ function M:init(btn_type) end self.ctr_index = self._view:GetController("index") + self._ctr_tongji = self._view:GetController('tongji') self.page_config = MngPageConfig.Config[btn_type][lev] local gmsv @@ -152,6 +153,7 @@ function M:init(btn_type) -- 切换界面 self.ctr_index.onChanged:Set(function(pas) + self._ctr_tongji.selectedIndex = 0 local anchor = self._view:GetChild("anchor") anchor:RemoveChildren() diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua index 29a0c7a0..df5c4d56 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua @@ -164,7 +164,7 @@ function M:InitView() self.btn_total:GetController("type").selectedIndex = 0 self.btn_reward:GetController("type").selectedIndex = 0 local type = self.btn_totalWin:GetController("type") - type.selectedIndex = (type.selectedIndex + 1) % 3 + type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) @@ -174,10 +174,6 @@ function M:InitView() table.sort(self.record_data, function(a, b) return a.total_win < b.total_win end) - else - table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round - end) end self.lst_record:RefreshVirtualList() end @@ -190,8 +186,7 @@ function M:InitView() self.btn_total:GetController("type").selectedIndex = 0 self.btn_reward:GetController("type").selectedIndex = 0 local type = self.btn_totalRound:GetController("type") - type.selectedIndex = (type.selectedIndex + 1) % 3 - + type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) return a.total_round > b.total_round @@ -200,10 +195,6 @@ function M:InitView() table.sort(self.record_data, function(a, b) return a.total_round < b.total_round end) - else - table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round - end) end self.lst_record:RefreshVirtualList() end @@ -216,7 +207,7 @@ function M:InitView() self.btn_totalRound:GetController("type").selectedIndex = 0 self.btn_reward:GetController("type").selectedIndex = 0 local type = self.btn_total:GetController("type") - type.selectedIndex = (type.selectedIndex + 1) % 3 + type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) @@ -226,10 +217,6 @@ function M:InitView() table.sort(self.record_data, function(a, b) return a.win_round < b.win_round end) - else - table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round - end) end self.lst_record:RefreshVirtualList() end @@ -242,7 +229,7 @@ function M:InitView() self.btn_totalRound:GetController("type").selectedIndex = 0 self.btn_total:GetController("type").selectedIndex = 0 local type = self.btn_reward:GetController("type") - type.selectedIndex = (type.selectedIndex + 1) % 3 + type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) @@ -252,10 +239,6 @@ function M:InitView() table.sort(self.record_data, function(a, b) return a.reward_hp < b.reward_hp end) - else - table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round - end) end self.lst_record:RefreshVirtualList() end @@ -286,6 +269,12 @@ end function M:RecursionGetRecoedData(index) ViewUtil.ShowModalWait("正在获取数据中") local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMemberStat(self.group_id, 0, + self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid, + index * 67, 67, 0, self.begin_time, self.end_time, + function(res) + + end) fgCtr:FG_GetPartnerStatMember(self.group_id, self._data_choosePlayyer.uid, self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid, index * 67, 67, 0, self.begin_time, self.end_time, function(res) @@ -298,6 +287,10 @@ function M:RecursionGetRecoedData(index) self:RecursionGetRecoedData(index + 1) else ViewUtil.CloseModalWait() + self.btn_totalRound:GetController("type").selectedIndex = 1 + self.btn_totalWin:GetController("type").selectedIndex = 0 + self.btn_total:GetController("type").selectedIndex = 0 + self.btn_reward:GetController("type").selectedIndex = 0 table.sort(self.record_data, function(a, b) return a.total_round > b.total_round end) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua index df687a09..4cda2de6 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua @@ -339,7 +339,7 @@ function M:FillRecordItem(data, obj) obj:GetChild("tex_round_total").text = data.total_round obj:GetChild("tex_total").text = d2ad(data.total_win) obj:GetChild("tex_round_youxiao").text = data.valid_round / 100 - + obj:GetChild('tex_reward').text = d2ad(data.reward_hp) local btn_check_members = obj:GetChild("btn_check_members") btn_check_members.onClick:Set(function() @@ -444,6 +444,7 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id) obj:GetChild("tex_round_total").text = mainRecord.total_round obj:GetChild("tex_total").text = d2ad(mainRecord.total_win) obj:GetChild("tex_round_youxiao").text = mainRecord.valid_round / 100 + obj:GetChild('tex_reward').text = d2ad(mainRecord.reward_hp) obj:GetChild("btn_more").visible = not mainRecord.partnerLev or mainRecord.partnerLev > 0 obj:GetController("more").onChanged:Set(function() end) obj:GetController("more").selectedIndex = 0 diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua index 046029ef..e211507b 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua @@ -56,11 +56,13 @@ function M:OnEventDaNiaoTip(evt_data) return end - local niao = evt_data["niao"] - local reload = evt_data["reload"] - self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end + local niao = evt_data["niao"] + local reload = evt_data["reload"] DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnDaNiaoTips, niao, reload) ControllerManager.IsSendCard = true end @@ -76,16 +78,19 @@ function M:SendNiao(niao, callBack) end function M:OnEventDaNiao(evt_data) - local seat = evt_data["seat"] - local niao = evt_data["niao"] - if seat == DataManager.CurrenRoom.self_player.seat then - if self.NiaoTipsCallBack then - self.NiaoTipsCallBack() - self.NiaoTipsCallBack = nil - end - end self._cacheEvent:Enqueue( function() + if self._callback_popEvent then + self._callback_popEvent(true) + end + local seat = evt_data["seat"] + local niao = evt_data["niao"] + if seat == DataManager.CurrenRoom.self_player.seat then + if self.NiaoTipsCallBack then + self.NiaoTipsCallBack() + self.NiaoTipsCallBack = nil + end + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnEventDaNiao, seat, niao) end ) @@ -102,21 +107,20 @@ function M:OnEventXiPai(evt_data) end function M:OnEventXiPaiAnim(evt_data) - local playeridList = evt_data["list"] - local isXiPai = false - local otherisXiPai = false - if playeridList and #playeridList > 0 then - for i = 1, #playeridList do - local p = self._room:GetPlayerById(playeridList[i]) - if p == self._room.self_player then - isXiPai = true - else - otherisXiPai = true + self._cacheEvent:Enqueue(function() + local playeridList = evt_data["list"] + local isXiPai = false + local otherisXiPai = false + if playeridList and #playeridList > 0 then + for i = 1, #playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p == self._room.self_player then + isXiPai = true + else + otherisXiPai = true + end end end - end - - self._cacheEvent:Enqueue(function() DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.EventXiPai, isXiPai, otherisXiPai) end) end @@ -196,34 +200,38 @@ function M:OnEventSendCards(evt_data) return end - local _room = self._room - _room.curren_round = _room.curren_round + 1 - if _room.curren_round > 0 then _room.playing = true end - local handcards = {} - if evt_data.card_list and #evt_data.card_list > 0 then - handcards = evt_data["card_list"] - else - ViewUtil.ErrorTip(100000, "发牌数据异常") - end - - local p = _room.self_player - local seat = nil - if evt_data.bank_seat then - seat = evt_data["bank_seat"] - else - ViewUtil.ErrorTip(100001, "发牌座位异常") - end - _room.banker_seat = seat - for i = 1, #_room.player_list do - _room.self_player.handcard_list = {} - _room.self_player.card_list = {} - _room.player_list[i].hand_left_count = 20 - _room.player_list[i].fz_list = {} - _room.player_list[i].card_list = {} - _room.player_list[i].outcard_list = {} - _room.player_list[i].hu_xi = 0 - end self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end + + local _room = self._room + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + local handcards = {} + if evt_data.card_list and #evt_data.card_list > 0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000, "发牌数据异常") + end + + local p = _room.self_player + local seat = nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001, "发牌座位异常") + end + _room.banker_seat = seat + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end _room.self_player.handcard_list = handcards self._room.self_player.hand_left_count = #handcards DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.SendCards, p) @@ -239,6 +247,9 @@ function M:OnEventOutCard(evt_data) local p = self._room:GetPlayerBySeat(seat) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local _room = self._room if (seat == _room.self_player.seat) then list_remove(_room.self_player.handcard_list, card) @@ -254,6 +265,9 @@ function M:OnEventQIPAI(evt_data) local card = evt_data["card"] local p = self._room:GetPlayerBySeat(seat) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local _room = self._room if (not p.outcard_list) then p.outcard_list = {} end p.outcard_list[#p.outcard_list + 1] = card @@ -268,6 +282,9 @@ function M:OnEventTakeCard(evt_data) local left_count = evt_data["left_count"] local p = _room:GetPlayerBySeat(seat) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end if card ~= 0 then p.DiceCard = card end @@ -293,6 +310,9 @@ end function M:OnEventOutHint(evt_data) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OutHint) end) end @@ -300,12 +320,18 @@ end function M:OnEventTurn(evt_data) local seat = evt_data["seat"] self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.EventTurn, seat) end) end function M:OnEventFzTips(evt_data) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end local tiplist = FZTipList.new() local list = evt_data["tip_list"] local uid = evt_data["uid"] @@ -338,6 +364,9 @@ function M:OnEventFangWei(evt_data) local seat = evt_data["seat"] local card = evt_data["card"] self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangWei, seat, card) end) end @@ -347,6 +376,9 @@ function M:OnEventFangPaoOk(evt_data) local seat = evt_data["seat"] local card = evt_data["card"] self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangPaoOk, seat, card) end) end @@ -446,13 +478,14 @@ function M:OnEventFzAction(evt_data) if p.fz_list[i].card == card then p.fz_list[i].type = RB_FZType.Pao isAddTi = true - flag_pengPao = true remove_num = 0 end end if isAddTi == false then p.fz_list[#p.fz_list + 1] = fz end + else + flag_pengPao = true end else local num = 0 @@ -523,14 +556,14 @@ function M:OnEventFzAction(evt_data) p.hand_left_count = p.hand_left_count - remove_num - if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then - coroutine.start(function() - coroutine.wait(0.5) - DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangziAction, fz, p, isNeedDelHandCard, flag_pengPao) - end) - else - DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangziAction, fz, p, isNeedDelHandCard, flag_pengPao) - end + -- if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + -- coroutine.start(function() + -- -- coroutine.wait(0.88) + -- DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangziAction, fz, p, isNeedDelHandCard, flag_pengPao) + -- end) + -- else + DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.FangziAction, fz, p, isNeedDelHandCard, flag_pengPao) + -- end end) end @@ -541,6 +574,9 @@ function M:OnEventHu(evt_data) -- print(win_p.hand_left_count) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end win_p.card_list = cards table.sort(win_p.card_list, ViewUtil.HandCardSort) DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards) @@ -561,6 +597,9 @@ function M:OneventResult1(evt_data) end self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.ZPResult1, result); end) elseif 1 == over or 2 == over then @@ -570,6 +609,9 @@ function M:OneventResult1(evt_data) local result = evt_data.result self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.ZPResult2, result, total_result, over); end) end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua index 1353ba5d..5d410d6d 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua @@ -169,7 +169,7 @@ function M:EventInit() local _player_info = self._player_info local _gamectr = self._gamectr _gamectr:AddEventListener(GameEvent.EventXiPai, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local currentPlayer1 = arg[1] local currentPlayer2 = arg[2] @@ -185,11 +185,17 @@ function M:EventInit() end self:PlayXiPai1(xipaiCB2) end + coroutine.start( + function() + coroutine.wait(3.68) + self._popEvent = true + end + ) end) _gamectr:AddEventListener(GameEvent.OnDaNiaoTips, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local niao = arg[1] local reload = arg[2] @@ -224,7 +230,7 @@ function M:EventInit() _gamectr:AddEventListener(GameEvent.OnEventDaNiao, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local seat = arg[1] local niao = arg[2] @@ -240,7 +246,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.SendCards, function(...) - self._popEvent = true + -- self._popEvent = true self._leftcard = 1 self._leftcard = 1 local rightpanel = self._view:GetChild('right_panel') @@ -308,8 +314,7 @@ function M:EventInit() coroutine.start( function() coroutine.wait(0.5) - print("lingmeng GetCard2-1", os.time()) - self._popEvent = true + -- self._popEvent = true end ) else @@ -318,8 +323,8 @@ function M:EventInit() function() coroutine.wait(0.5) print("lingmeng GetCard3-1", os.time()) - self._popEvent = true - info:ClearOutCard() + -- self._popEvent = true + -- info:ClearOutCard() end ) end @@ -328,6 +333,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.AddCard, function(...) + print("lingmeng AddCard", self._popEvent) local arg = { ... } local seat = arg[1] local card = arg[2] @@ -335,19 +341,18 @@ function M:EventInit() local info = self._player_card_info[self:GetPos(seat)] coroutine.start( function() - coroutine.wait(0.2) + coroutine.wait(0.6) if info._area_outcard_list.numChildren > 0 then local outCard = info._area_outcard_list:GetChildAt(0) - outCard:TweenMove(outCard:GlobalToLocal(info:GetFzMove()), 0.35) - outCard:TweenScale(Vector2.New(0, 0), 0.35) + outCard:TweenMove(outCard:GlobalToLocal(info:GetFzMove()), 0.25) + outCard:TweenScale(Vector2.New(0, 0), 0.25) end end ) - coroutine.start( function() - coroutine.wait(0.5) + coroutine.wait(0.7) if seat == self._room.self_player.seat then info:InitHandCard(false) end @@ -361,7 +366,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.EventTurn, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local seat = arg[1] local list = _room.player_list @@ -379,7 +384,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.OutHint, function(...) - self._popEvent = true + -- self._popEvent = true _room.curren_outcard_seat = _room.self_player.seat --printlog("jefe OutHint view>>>>",card) @@ -396,7 +401,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.FangWei, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local seat = arg[1] local card = arg[2] @@ -442,7 +447,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.OutCard, function(...) - self._popEvent = true + -- self._popEvent = true self:__CloseTip() self._left_time = 0 local arg = { ... } @@ -496,8 +501,8 @@ function M:EventInit() coroutine.start( function() coroutine.wait(0.2) - self._popEvent = true - info:ClearOutCard() + -- self._popEvent = true + -- info:ClearOutCard() p.DiceCard = 0 info:UpdateQiPai(p.outcard_list, false, seat) end @@ -507,7 +512,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.FZTips, function(...) - self._popEvent = true + -- self._popEvent = true local arg = { ... } local _tip = arg[1] local _uid = arg[2] @@ -522,7 +527,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.ZPHuCard, function(...) - self._popEvent = true + -- self._popEvent = true self._left_time = 0 self:__CloseTip() @@ -559,7 +564,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.ZPResult1, function(...) - self._popEvent = true + -- self._popEvent = true --printlog("ZPResult111ssssssttteessssssttt") self._left_time = 0 @@ -638,7 +643,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.ZPResult2, function(...) - self._popEvent = true + -- self._popEvent = true self._left_time = 0 local arg = { ... } local total_result = arg[2] @@ -667,7 +672,7 @@ function M:EventInit() _gamectr:AddEventListener( GameEvent.FangPaoOk, function(...) - self._popEvent = true + -- self._popEvent = true self._left_time = 0 local arg = { ... } local seat = arg[1] @@ -1109,18 +1114,18 @@ function M:OnFangziAction(...) -- info:PlayingOutCardAnima() self:PlaySound(player.self_user.sex, 'F_GuoSao') effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wei') - effect.touchable = false - effect.x, effect.y = -250, -200 - effect:GetTransition('t0'):Play() - pNode:AddChild(effect) - -- end) + -- effect.touchable = false + -- effect.x, effect.y = -250, -200 + -- effect:GetTransition('t0'):Play() + -- pNode:AddChild(effect) + -- -- end) - coroutine.start( - function() - coroutine.wait(0.7) - effect:Dispose() - end - ) + -- coroutine.start( + -- function() + -- coroutine.wait(0.7) + -- effect:Dispose() + -- end + -- ) elseif fz.type == RB_FZType.ChouWei then -- self:PlaySound(player.self_user.sex, 'F_' .. fz.card) -- info:UpdateOutCardList(fz.card, true, true, fz.from_seat) @@ -1131,18 +1136,18 @@ function M:OnFangziAction(...) -- info:PlayingOutCardAnima() self:PlaySound(player.self_user.sex, 'F_GuoSao') effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wei') - effect.touchable = false - effect.x, effect.y = -250, -200 - effect:GetTransition('t0'):Play() - pNode:AddChild(effect) - -- end) + -- effect.touchable = false + -- effect.x, effect.y = -250, -200 + -- effect:GetTransition('t0'):Play() + -- pNode:AddChild(effect) + -- -- end) - coroutine.start( - function() - coroutine.wait(0.7) - effect:Dispose() - end - ) + -- coroutine.start( + -- function() + -- coroutine.wait(0.7) + -- effect:Dispose() + -- end + -- ) elseif fz.type == RB_FZType.Pao then -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") self:PlaySound(player.self_user.sex, 'F_KaiDuo') @@ -1151,39 +1156,39 @@ function M:OnFangziAction(...) -- self:PlaySound(player.self_user.sex, 'F_' .. fz.card) -- info:UpdateOutCardList(fz.card, true, true, fz.from_seat) effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') - effect.touchable = false - effect.x, effect.y = -250, -200 - effect:GetTransition('t0'):Play() - pNode:AddChild(effect) + -- effect.touchable = false + -- effect.x, effect.y = -250, -200 + -- effect:GetTransition('t0'):Play() + -- pNode:AddChild(effect) + -- -- coroutine.start( + -- -- function() + -- -- coroutine.wait(1.2) + -- print("lingmeng tiqi") + -- self:PlaySound(player.self_user.sex, 'F_SaoChuan') + -- -- info:PlayingOutCardAnima() + -- -- end) + -- coroutine.start( -- function() - -- coroutine.wait(1.2) - print("lingmeng tiqi") - self:PlaySound(player.self_user.sex, 'F_SaoChuan') - -- info:PlayingOutCardAnima() - -- end) - - coroutine.start( - function() - coroutine.wait(2) - effect:Dispose() - end - ) + -- coroutine.wait(2) + -- effect:Dispose() + -- end + -- ) -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") end - if fz.type ~= RB_FZType.Wei and fz.type ~= RB_FZType.ChouWei then - effect.touchable = false - effect.x, effect.y = -250, -200 - effect:GetTransition('t0'):Play() - pNode:AddChild(effect) - coroutine.start( - function() - coroutine.wait(0.4) - effect:Dispose() - end - ) - end + -- if fz.type ~= RB_FZType.Wei and fz.type ~= RB_FZType.ChouWei then + effect.touchable = false + effect.x, effect.y = -250, -200 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(0.5) + effect:Dispose() + end + ) + -- end end if (player == self._room.self_player) then coroutine.start( @@ -1197,8 +1202,8 @@ function M:OnFangziAction(...) if fz.type ~= RB_FZType.Kan then local time = 0.01 - if fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then - time = 0.3 + if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + time = 0.5 end local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] coroutine.start( @@ -1216,7 +1221,7 @@ function M:OnFangziAction(...) else outCard = removeOutcard._area_outcard_list:GetChildAt(0) end - if (player ~= self._room.self_player) then + if player ~= self._room.self_player then if flag_pengPao then outCard:TweenMove(outCard:GlobalToLocal(info:GetFzMove()) - Vector2.New(outCard.width, 0), 0.25) @@ -1226,6 +1231,8 @@ function M:OnFangziAction(...) 0.25) outCard:TweenScale(Vector2.New(0, 0), 0.25) end + else + removeOutcard:ClearOutCard() end p.DiceCard = nil @@ -1236,7 +1243,7 @@ function M:OnFangziAction(...) coroutine.start( function() coroutine.wait(0.2 + time) - removeOutcard:ClearOutCard() + -- removeOutcard:ClearOutCard() info:UpdateFzList(player.fz_list, true, player.seat, flag_pengPao) --更新放子数组 end ) @@ -1251,9 +1258,8 @@ function M:OnFangziAction(...) local time = 0.01 if fz.type ~= RB_FZType.Kan then - time = flag_pengPao and 0.3 or 0.7 - if fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then - time = time + 0.3 + if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + time = time + 0.5 end end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua index ea01cc5d..5ad67010 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua @@ -104,17 +104,17 @@ function M:playAnim(fzitem, fzcards, size, i, ispaly, seat, flag_pengPao) end local isaddLast = false - if (ispaly and i == size and not flag_pengPao) then --匹配最后一个牌 - local faArray = fzitem:GetChild("chiwei") + -- if (ispaly and i == size and not flag_pengPao) then --匹配最后一个牌 + -- local faArray = fzitem:GetChild("chiwei") - if (faArray ~= nil) then - faArray:AddChild(fzcards) - else - fzitem:AddChild(fzcards) - end - else - fzitem:AddChild(fzcards) - end + -- if (faArray ~= nil) then + -- faArray:AddChild(fzcards) + -- else + -- fzitem:AddChild(fzcards) + -- end + -- else + fzitem:AddChild(fzcards) + -- end if (seat ~= nil) then isaddLast = self:isAddFirst(seat) end 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/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_atlas0.png b/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_atlas0.png index 78256ea4..ab4b6654 100644 Binary files a/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_atlas0.png and b/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_atlas0.png differ diff --git a/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_fui.bytes b/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_fui.bytes index b821e7f0..56e7d1a4 100644 Binary files a/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_fui.bytes and b/qyq_new_unity/Assets/ART/extend/zipai/weimaque/ui/Extend_Poker_WeiMaQue_fui.bytes differ diff --git a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info index f8e00ff4..4171dcf4 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info +++ b/wb_new_ui/.objs/metas/m7iejg46/hsbhhjn.info @@ -5,9 +5,6 @@ }, "n79_ovii": { "hidden": true - }, - "n113_yvb2": { - "collapsed": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info b/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info index e56b7506..8556f7f5 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info +++ b/wb_new_ui/.objs/metas/m7iejg46/imp57ihp.info @@ -3,6 +3,12 @@ "n86_kwi0": { "hidden": true }, + "n197_imp5": { + "collapsed": true + }, + "n83_kwi0": { + "collapsed": true + }, "n157_sbng": { "hidden": true } diff --git a/wb_new_ui/assets/Main_RunBeard/component/cards/Component1.xml b/wb_new_ui/assets/Main_RunBeard/component/cards/Component1.xml index 283b16d5..6fa58647 100644 --- a/wb_new_ui/assets/Main_RunBeard/component/cards/Component1.xml +++ b/wb_new_ui/assets/Main_RunBeard/component/cards/Component1.xml @@ -9,7 +9,6 @@ - - + \ No newline at end of file diff --git a/wb_new_ui/assets/NewGroup/Win_ManagerView.xml b/wb_new_ui/assets/NewGroup/Win_ManagerView.xml index b22f66e6..ed60aa6a 100644 --- a/wb_new_ui/assets/NewGroup/Win_ManagerView.xml +++ b/wb_new_ui/assets/NewGroup/Win_ManagerView.xml @@ -1,6 +1,6 @@ - + @@ -29,17 +29,10 @@ - + + - - - - - - - - \ No newline at end of file diff --git a/wb_new_ui/assets/NewGroup/component/nav/Btn_menu_h.xml b/wb_new_ui/assets/NewGroup/component/nav/Btn_menu_h.xml index d03d789e..e7780be3 100644 --- a/wb_new_ui/assets/NewGroup/component/nav/Btn_menu_h.xml +++ b/wb_new_ui/assets/NewGroup/component/nav/Btn_menu_h.xml @@ -3,7 +3,8 @@ - + + @@ -11,14 +12,17 @@ - + - + + + +