From 67d0dfa44fdc8034608d4dff8a2a7858ddfad97e Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Thu, 25 Feb 2021 12:00:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E6=8A=BD=E5=8D=A1=E5=A5=96?= =?UTF-8?q?=E6=B1=A0=E3=80=91=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Recruit/HeroPreviewPanel.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/HeroPreviewPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/HeroPreviewPanel.lua index 5c95de60a0..e8d0e526bf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/HeroPreviewPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/HeroPreviewPanel.lua @@ -203,26 +203,43 @@ function this.SwitchView(index) this.List2[i].gameObject:SetActive(true) end end - + for i = 1, #this.List3 do + if this.List3[i] then + this.List3[i].gameObject:SetActive(false) + end + end for i = 1, #threeData do if not this.List3[i] then this.List3[i] = SubUIManager.Open(SubUIConfig.ItemView,this.threeGrid.transform) + this.List3[i].gameObject:SetActive(true) end this.List3[i]:OnOpen(false, {threeData[i].Reward[1], threeData[i].Reward[2]}, 1.1, true) this.List3[i].name:GetComponent("Text").text=""..string.format("%.2f", (threeData[i].Weight/100000)*100) .."%" this.List3[i].gameObject:SetActive(true) end + for i = 1, #this.List4 do + if this.List4[i] then + this.List4[i].gameObject:SetActive(false) + end + end for i = 1, #fourData do if not this.List4[i] then this.List4[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fourGrid.transform) + this.List4[i].gameObject:SetActive(true) end this.List4[i]:OnOpen(false, {fourData[i].Reward[1], fourData[i].Reward[2]}, 1.1, true) this.List4[i].name:GetComponent("Text").text=""..string.format("%.2f", (fourData[i].Weight/100000)*100) .."%" this.List4[i].gameObject:SetActive(true) end + for i = 1, #this.List5 do + if this.List5[i] then + this.List5[i].gameObject:SetActive(false) + end + end for i = 1, #fiveData do if not this.List5[i] then this.List5[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fiveGrid.transform) + this.List5[i].gameObject:SetActive(true) end this.List5[i]:OnOpen(false, {fiveData[i].Reward[1], fiveData[i].Reward[2]}, 1.1, true) this.List5[i].name:GetComponent("Text").text=""..string.format("%.2f", (fiveData[i].Weight/100000)*100) .."%" From 5699b89258ab20b6c48d31702ce614514015bb52 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Thu, 25 Feb 2021 12:04:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=20=E3=80=90ScrollCycleView=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActivityGift/ActivityGiftManager.lua | 2 +- .../ActivityGift/AllActivityManager.lua | 2 +- .../ActivityGift/View/SevenDayGift.lua | 4 +- .../~Lua/Modules/Bag/BagPanel.lua | 39 ++++++------ .../~Lua/Modules/Expert/Expert_UpLv.lua | 8 +-- .../~Lua/Modules/Expert/GiftBuy.lua | 8 +-- .../GoodFriend/GoodFriendMainPanel.lua | 41 +++++++------ .../Modules/GoodFriend/GoodFriendManager.lua | 6 +- .../Mission/MissionDailyPanel_Achievement.lua | 9 +-- .../Mission/MissionDailyPanel_Daily.lua | 10 +-- ...ssionDailyPanel_QingLongSecretTreasure.lua | 16 ++--- .../MissionDailyPanel_SecretTreasureTrail.lua | 22 +++---- .../~Lua/Modules/Net/NetManager.lua | 2 +- .../~Lua/Modules/Operating/GrowthGiftPage.lua | 8 +-- .../Operating/WeekMonthGiftPackPage.lua | 8 +-- ...eralPopup_HeavenUnlockExtraRewardPanel.lua | 2 +- .../~Lua/Modules/Setting/HeadChangePopup.lua | 12 ++-- .../~Lua/Modules/Shop/ShopManager.lua | 2 +- .../HeavenUnlockExtraRewardPanel.lua | 2 +- .../~Lua/View/ScrollCycleView.lua | 61 ++++++++++++++++--- .../ManagedResources/~Lua/View/ShopView.lua | 14 ++--- 21 files changed, 161 insertions(+), 117 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua index e6b9bbfaf0..cbaf0f9e42 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua @@ -526,7 +526,7 @@ function this.RefreshActivityProgressData(msg) end function this.RefreshActivityRedPoint() - Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged) + Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged,false,false) CheckRedPointStatus(RedPointType.FirstRecharge) CheckRedPointStatus(RedPointType.ContinuityRecharge) CheckRedPointStatus(RedPointType.SevenDayCarnival) diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/AllActivityManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/AllActivityManager.lua index cfec86f7b2..8bfb17e471 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/AllActivityManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/AllActivityManager.lua @@ -124,7 +124,7 @@ end function this.RefreshActivityRedPoint() - Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged) + Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged,false,false) CheckRedPointStatus(RedPointType.FirstRecharge) CheckRedPointStatus(RedPointType.ContinuityRecharge) CheckRedPointStatus(RedPointType.SevenDayCarnival) diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/View/SevenDayGift.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/View/SevenDayGift.lua index b92c6038fd..1eff8c19be 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/View/SevenDayGift.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/View/SevenDayGift.lua @@ -167,7 +167,7 @@ function SevenDayGift :OpenActivityPage() end end --展示活动数据 -function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardState, isCanReward) +function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardState, isCanReward,isTop,isAni) if (activityType == ActivityTypeDef.SevenDayRegister) then this.titleBg.sprite = Util.LoadSprite("r_huodong_qitian") elseif (activityType == ActivityTypeDef.OnlineGift) then @@ -215,7 +215,7 @@ function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardSt this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward) end --this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward) - end) + end, not isTop,not isAni) end --循环滚动活动数据 function SevenDayGift:ScrollActivityDataShow(item, index, data, activityType, getRewardState, isCanReward) diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 175f7fe058..c885e625f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -148,10 +148,10 @@ end -- end function this.BagGoldChangeCallBackOnClickTabBtn() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end -function this.OnClickTabBtn(_index, _clickBtn, isTop) +function this.OnClickTabBtn(_index, _clickBtn, isTop,isNotAni) sortIndexBtnGo = _clickBtn itemData = {} local itemNumText = this.itemNumText:GetComponent("Text") @@ -166,24 +166,24 @@ function this.OnClickTabBtn(_index, _clickBtn, isTop) end --Language[10188] itemNumText.text = "装备种类:" ..LengthOfTable(allEquipData).."/"..ConfigManager.GetConfigData(ConfigName.GameSetting,1).EquipNumlimit - this:SetItemData(itemData, isTop) + this:SetItemData(itemData, isTop,isNotAni) -- elseif _index == 0 then -- this:OnClickAllBtn() elseif (_index == ItemBaseType.SoulPrint) then itemData = BagManager.GetAllSoulPrintData() itemNumText.text = Language[10189]..#itemData.."/"..specialConfig[9].Value - this:SetItemData(itemData, isTop) + this:SetItemData(itemData, isTop,isNotAni) elseif (_index == ItemBaseType.EquipTreasure) then itemData = EquipTreasureManager.GetAllTreasures() itemNumText.text = Language[10190]..LengthOfTable(itemData).."/"..specialConfig[10].Value - this:SetItemData(itemData, isTop) + this:SetItemData(itemData, isTop,isNotAni) elseif (_index == ItemBaseType.Special) then itemData = BagManager.GetBagItemDataByItemTypeV2(ItemBaseType.Special,ItemBaseType.Materials,ItemType.HeadFrame) - this:SetItemData(itemData) + this:SetItemData(itemData, isTop,isNotAni) else itemData = BagManager.GetBagItemDataByItemType(_index) - this:SetItemData(itemData, isTop) + this:SetItemData(itemData, isTop,isNotAni) end this.noneImage:SetActive(#itemData==0) end @@ -196,8 +196,9 @@ end local orginLayer2 = 0 --设置背包列表数据 -function this:SetItemData(_itemDatas, isTop) +function this:SetItemData(_itemDatas, isTop,isNotAni) LogPink("IsTop = "..tostring(isTop)) + LogPink("isNotAni = "..tostring(isNotAni)) list={} this.ItemsSortDataV2(_itemDatas) if not this.ScrollView then @@ -212,7 +213,7 @@ function this:SetItemData(_itemDatas, isTop) if _itemDatas[index].itemConfig.ItemType == ItemType.HunYin then table.insert(list, go) end - end, not isTop) + end, not isTop,isNotAni) --特效层级重设 for i=1,#list do Util.AddParticleSortLayer(list[i], this.sortingOrder- orginLayer2) @@ -379,17 +380,17 @@ function this.SingleItemDataShow(_go, _itemData) if _itemData.itemConfig then if _itemData.itemConfig.ItemBaseType == ItemBaseType.Equip then UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup, _itemData, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end,nil,true) elseif _itemData.itemConfig.ItemType == ItemType.SelfBox then--自选宝箱 UIManager.OpenPanel(UIName.RewardBoxPanel, _itemData, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) UIManager.ClosePanel(UIName.RewardBoxPanel) end) -- body elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.HeroChip then UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) end) elseif _itemData.itemConfig.ItemType == ItemType.Blueprint then @@ -397,29 +398,29 @@ function this.SingleItemDataShow(_go, _itemData) local lanTuData = WorkShopManager.GetLanTuIsOpenLock(_itemData.itemConfig.Id) if lanTuData and lanTuData[1] == true then UIManager.OpenPanel(UIName. WorkShopArmorOnePanel, 2, 2, lanTuData[2], this, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end) elseif lanTuData and lanTuData[1] == false then UIManager.OpenPanel(UIName.WorkShopArmorOnePanel, 2, 1, lanTuData[2], this, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end) end elseif _itemData.itemConfig.ItemType == ItemType.HeroDebris then --角色碎片 if _itemData.num >= _itemData.itemConfig.UsePerCount then UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end) else UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) end) end elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.EquipTreasure then --宝器 UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup, 0, _itemData.idDyn,_itemData.id, _itemData.lv,_itemData.refineLv, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) end) elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.SoulPrint then --魂印 @@ -427,7 +428,7 @@ function this.SingleItemDataShow(_go, _itemData) elseif _itemData.itemConfig.ItemType == ItemType.Skin then --皮肤 UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id,function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) end) -- elseif _itemData.itemConfig.ItemType == ItemType.HeadFrame then @@ -438,7 +439,7 @@ function this.SingleItemDataShow(_go, _itemData) -- end) else UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function() - this.OnClickTabBtn(sortIndex, sortIndexBtnGo) + this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/Expert_UpLv.lua b/Assets/ManagedResources/~Lua/Modules/Expert/Expert_UpLv.lua index 6605b17079..e932f05a92 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/Expert_UpLv.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/Expert_UpLv.lua @@ -52,7 +52,7 @@ end function Expert_UpLv:Refresh(index) activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig) ActivityGiftManager.RefreshAcitvityData({activityId},function () - this:OnShowData(index) + this:OnShowData(index,true,true) end) end @@ -64,7 +64,7 @@ function Expert_UpLv:OnSortingOrderChange(cursortingOrder) end end -function Expert_UpLv:OnShowData() +function Expert_UpLv:OnShowData(isTop,isAni) local activityId = ActivityGiftManager.GetOpenExpertIdByActivityType(ActivityTypeDef.UpLvAct) if activityId <= 0 then return @@ -81,7 +81,7 @@ function Expert_UpLv:OnShowData() end) this.ScrollView:SetData(activeData.mission, function (index, go) this.SingleItemDataShow(go, activeData.mission[index]) - end) + end,not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(self.ScrollView) isPlayAnim = false @@ -135,7 +135,7 @@ function this.SingleItemDataShow(go,data) --Log("达人领取奖励 "..data.missionId.." "..activityId) NetManager.GetActivityRewardRequest(data.missionId, activityId, function(drop) UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function() - this:OnShowData() + this:OnShowData(false,false) end) end) end) diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/GiftBuy.lua b/Assets/ManagedResources/~Lua/Modules/Expert/GiftBuy.lua index 98ba1f0163..8cc239f2ab 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/GiftBuy.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/GiftBuy.lua @@ -46,7 +46,7 @@ end --界面打开或者重新打开后,界面刷新时调用(用于子类重写) function GiftBuy:OnShow(_sortingOrder) sortingOrder = _sortingOrder - this:OnShowData() + this:OnShowData(true,true) end function GiftBuy:OnSortingOrderChange(_cursortingOrder) cursortingOrder = _cursortingOrder @@ -56,12 +56,12 @@ function GiftBuy:OnSortingOrderChange(_cursortingOrder) end end end -function GiftBuy:OnShowData() +function GiftBuy:OnShowData(isTop,isAni) allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 20, "Type", GoodsTypeDef.DirectPurchaseGift) this.SortData(allData) this.ScrollView:SetData(allData, function (index, go) this.SingleDataShow(go, allData[index]) - end) + end,not isTop,not isAni) PatFaceManager.RemainTimeDown(this.endTimeBg,this.endTime,endTime - GetTimeStamp()) end --刷新每一条的显示数据 @@ -163,7 +163,7 @@ end function this.RechargeSuccessFunc(id) FirstRechargeManager.RefreshAccumRechargeValue(id) --OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.GiftBuy, id) - this.OnShowData() + this.OnShowData(false,false) end --购买点击事件 --function this.BuyAction(costId, costNum, shopType, itemId) diff --git a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua index 83cd112971..83d0eca1cd 100644 --- a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua @@ -197,18 +197,18 @@ end --添加事件监听(用于子类重写) function GoodFriendMainPanel:AddListener() - Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow) - Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow) - Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow) - Game.GlobalEvent:AddEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow) + Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow,self) + Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow,self) + Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow,self) + Game.GlobalEvent:AddEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow,self) end --移除事件监听(用于子类重写) function GoodFriendMainPanel:RemoveListener() - Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow) - Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow) - Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow) - Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow) + Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow,self) + Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow,self) + Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow,self) + Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow,self) end --界面打开时调用(用于子类重写) @@ -227,10 +227,10 @@ function GoodFriendMainPanel:OnShow() this.roleImage2:SetActive(false) this.roleImage3:SetActive(false) this.roleImage4:SetActive(false) - this:FriendListDataShow() - this:FriendApplicationDataShow() - this:FriendSearchDataShow() - this:BlackListDataShow() + this:FriendListDataShow(true,true) + this:FriendApplicationDataShow(true,true) + this:FriendSearchDataShow(true,true) + this:BlackListDataShow(true,true) this.isInRecommendPage = true this:OnRefreshData() this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.GoodFriend }) @@ -336,7 +336,7 @@ function GoodFriendMainPanel:OnDestroy() end --好友列表循环滚动数据 -function GoodFriendMainPanel:FriendListDataShow() +function GoodFriendMainPanel:FriendListDataShow(isTop,isAni) CheckRedPointStatus(RedPointType.Friend_GetAllReward) this:OnRefreshData() local list = {} @@ -369,7 +369,7 @@ function GoodFriendMainPanel:FriendListDataShow() -- else -- item.gameObject:SetActive(true) -- end - end) + end,not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(this.ScrollView1) isPlayAnim = false @@ -378,7 +378,7 @@ function GoodFriendMainPanel:FriendListDataShow() this.haveGetRewardNumText.text=Language[10813]..(GoodFriendManager.MaxEnergy-GoodFriendManager.MaxEnergyGet).."/"..GoodFriendManager.MaxEnergy end --好友申请循环滚动数据 -function GoodFriendMainPanel:FriendApplicationDataShow() +function GoodFriendMainPanel:FriendApplicationDataShow(isTop,isAni) -- 检测红点 CheckRedPointStatus(RedPointType.Friend_Application) this:OnRefreshData() @@ -416,7 +416,7 @@ function GoodFriendMainPanel:FriendApplicationDataShow() -- else -- item.gameObject:SetActive(true) -- end - end) + end,not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(this.ScrollView2) isPlayAnim = false @@ -424,7 +424,8 @@ function GoodFriendMainPanel:FriendApplicationDataShow() end --好友搜索循环滚动数据 -function GoodFriendMainPanel:FriendSearchDataShow() +function GoodFriendMainPanel:FriendSearchDataShow(isTop,isAni) +LogRed("isTop "..tostring(isTop).." isAni "..tostring(isAni)) this:OnRefreshData() local list = {} local j = 1 @@ -456,7 +457,7 @@ function GoodFriendMainPanel:FriendSearchDataShow() -- else -- item.gameObject:SetActive(true) -- end - end) + end,not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(this.ScrollView3) isPlayAnim = false @@ -464,7 +465,7 @@ function GoodFriendMainPanel:FriendSearchDataShow() end --黑名单滚动数据 -function GoodFriendMainPanel:BlackListDataShow() +function GoodFriendMainPanel:BlackListDataShow(isTop,isAni) this:OnRefreshData() local list = {} local j = 1 @@ -496,7 +497,7 @@ function GoodFriendMainPanel:BlackListDataShow() -- else -- item.gameObject:SetActive(true) -- end - end) + end,not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(this.ScrollView4) isPlayAnim = false diff --git a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua index 3222da5422..5e7cee88aa 100644 --- a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua @@ -171,7 +171,7 @@ function this.GetFriendInfoRequest(type, msg) -- friendData.isHaveApplication=1s this.friendSearchData[friendData.id] = friendData end - Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData) + Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData) elseif (type == 4) then this.blackFriendList = {} for i = 1, #msg.Friends do @@ -222,7 +222,7 @@ function this.InviteFriendRequest(inviteUids, func) if this.friendSearchData[inviteUids] then this.friendSearchData[inviteUids].isApplyed = 1 end - Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData) + Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData) if func then func() end @@ -313,7 +313,7 @@ function this.FriendSearchRequest(name) NetManager.RequestFriendSearch(name, function(msg) this.friendSearchData = {} this.friendSearchData[msg.Friends.id] = msg.Friends - Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData) + Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData) end) end --刷新好友在线状态 diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Achievement.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Achievement.lua index 30bc0e408b..5752f0f795 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Achievement.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Achievement.lua @@ -36,7 +36,7 @@ function this:OnShow(_parent,...) --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 local args = {...} fun = args[1] - this.OnShowPanelData(true) + this.OnShowPanelData(true,true) end function this:OnSortingOrderChange(sortingOrder) for i, v in pairs(this.NoviceItemList) do @@ -47,16 +47,17 @@ function this:OnSortingOrderChange(sortingOrder) end end end -function this.OnShowPanelData(isTop) +function this.OnShowPanelData(isTop,isAni) local curAllData = TaskManager.GetCurShowAllAchievementData(TaskTypeDef.Achievement) local AllData = {} for i, v in pairs(curAllData) do table.insert(AllData,v) end this.RewardTabsSort(AllData) + LogRed("isTop "..tostring(not isTop).." isAni "..tostring(not isAni)) this.ScrollView:SetData(AllData, function (index, go) this.SingleDataShow(go, AllData[index]) - end, not isTop) + end, not isTop,not isAni) -- if isPlayAnim then -- SecTorPlayAnimByScroll(this.ScrollView) -- isPlayAnim = false @@ -117,7 +118,7 @@ function this.SingleDataShow(go,rewardData) Util.AddOnceClick(lingquButton, function() NetManager.TakeMissionRewardRequest(TaskTypeDef.Achievement,rewardData.missionId, function(msg) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() - this.OnShowPanelData() + this.OnShowPanelData(false,false) end) end) end) diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Daily.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Daily.lua index d5a3170539..dc0eb38a93 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Daily.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_Daily.lua @@ -78,7 +78,7 @@ function this:OnShow(_parent,...) local args = {...} fun = args[1] this.rectMask.enabled=true - this.OnShowData(true) + this.OnShowData(true,true) end function this:OnSortingOrderChange(sortingOrder) for i, v in pairs(this.NoviceItemList) do @@ -93,7 +93,7 @@ function this:OnSortingOrderChange(sortingOrder) Util.AddParticleSortLayer(boxList[i], sortingOrder) end end -function this.OnShowData(isTop) +function this.OnShowData(isTop,isAni) dailyTasksConfig=ConfigManager.GetConfig(ConfigName.DailyTasksConfig) curDailyMissionData = {} curDailyMissionBoxData = {} @@ -118,7 +118,7 @@ function this.OnShowData(isTop) local AllData = TaskManager.GetTypeTaskList(TaskTypeDef.Achievement) this.ScrollView:SetData(curDailyMissionData, function (index, go) this.SingleMissionDatasDataShow(go,curDailyMissionData[index]) - end, not isTop) + end, not isTop, not isAni) this.SetDailyMissionBox(curDailyMissionBoxData) -- if isPlayAnim then -- SecTorPlayAnimByScroll(this.ScrollView) @@ -189,7 +189,7 @@ function this.SingleMissionDatasDataShow(_go,_missionData) NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,missionData.missionId,function (msg) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, missionData.missionId, SingleDailyMissionState.GetFinish) - this.OnShowData() + this.OnShowData(false,false) -- 检测红点状态 CheckRedPointStatus(RedPointType.DailyTask) CheckRedPointStatus(RedPointType.SecretTer) @@ -278,7 +278,7 @@ function this.MissionBoxClick(btn,_singleData) NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,_singleData.missionId,function (msg) TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, _singleData.missionId, SingleDailyMissionState.GetFinish) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1) - this.OnShowData() + this.OnShowData(false,false) end) this.timer:Stop() this.timer = nil diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua index b1b03ed94e..f8632b72a2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua @@ -81,7 +81,7 @@ this.Closefunction = function() end return else - this.refresh() + this.refresh(false,false) end end,1):Start() end @@ -98,7 +98,7 @@ function this:OnShow(_parent,...) this.time.text = Language[10546]..startTime.."-"..endTime this.remainTime.text = Language[12321]..TimeToDHMS(tonumber(endTimeScale) - GetTimeStamp()) this:ShowTime(endTimeScale) - this.refresh() + this.refresh(true,true) end function this:OnSortingOrderChange(sortingOrder) @@ -125,10 +125,10 @@ function this:OnDestroy() end end -this.refresh = function() +this.refresh = function(isTop,isAni) QinglongSerectTreasureManager.UpdateTreasureState2() this:topBar() - this:showTaskList() + this:showTaskList(isTop,isAni) CheckRedPointStatus(RedPointType.QinglongSerectTreasure) end @@ -192,7 +192,7 @@ function this:topBar() PopupTipPanel.ShowTip(Language[12355]) Timer.New(function() LogBlue("level:"..QinglongSerectTreasureManager.GetLevel()) - this.refresh() + this.refresh(false,false) end,1):Start() end) end,1.5):Start() @@ -200,11 +200,11 @@ function this:topBar() end --任务列表 -function this:showTaskList() +function this:showTaskList(isTop,isAni) local rewardData = QinglongSerectTreasureManager.GetAllRewardData() this.ScrollView:SetData(rewardData,function(index, rewardItem) this:SingleTask(rewardItem, rewardData[index]) - end) + end,not isTop,not isAni) local index = 0 if QinglongSerectTreasureManager.GetLevel() == 1 then index = 1 @@ -351,7 +351,7 @@ function this:OnBtnDealClicked(rewardItem,rewardSingleData) else QinglongSerectTreasureManager.SetSingleRewardState(rewardSingleData.level,-1) end - this.refresh()--刷新界面 + this.refresh(false,false)--刷新界面 end) elseif rewardSingleData.state == 1 and (not treasureState) then----任务已领取+礼包未购买(弹出购买界面) UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,2) diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua index cdd74d6055..376bc4e812 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua @@ -44,11 +44,11 @@ end function this:BindEvent() Util.AddClick(this.weekTrailBtn,function() curType = 1 - this.refresh() + this.refresh(true,true) end) Util.AddClick(this.finalTrailBtn,function() curType = 2 - this.refresh() + this.refresh(true,true) end) end @@ -81,7 +81,7 @@ end function this.RefreshTime() NetManager.RefreshTimeSLRequest(function (msg) - this.refresh() + this.refresh(false,false) end) end @@ -108,7 +108,7 @@ function this:OnShow(_parent,...) parent:ClosePanel() return end - this.refresh() + this.refresh(true,true) end --topBar按钮状态 @@ -139,7 +139,7 @@ function this:SetTopBar() NetManager.GetActivityRewardRequest(-2,id,function(msg) PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1) PopupTipPanel.ShowTip(Language[12355]) - this.refresh() + this.refresh(false,false) end) end,1.5):Start() end) @@ -163,12 +163,12 @@ function this:OnDestroy() end end -function this.refresh() +function this.refresh(isTop,isAni) QinglongSerectTreasureManager.UpdateTreasureState2() this:SetTopBar() this:SetSelect() this:ShowTime(curType) - this:showTaskList(curType) + this:showTaskList(curType,isTop,isAni) this:SetRedPoint() CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) CheckRedPointStatus(RedPointType.QinglongSerectTreasure) @@ -186,7 +186,7 @@ local state = { [2] = 2, } --任务列表 -function this:showTaskList(type) +function this:showTaskList(type,isTop,isAni) local rewardData = QinglongSerectTreasureManager.GetQinglongTaskData(type) table.sort(rewardData,function(a,b) if state[a.state] == state[b.state] then @@ -197,8 +197,8 @@ function this:showTaskList(type) end) this.ScrollView:SetData(rewardData,function(index, rewardItem) this:SingleTask(rewardItem, rewardData[index]) - end) - this.ScrollView:SetIndex(1) + end,not isTop,not isAni) + -- this.ScrollView:SetIndex(1) -- if isPlayAnim then -- SecTorPlayAnimByScroll(this.ScrollView) -- isPlayAnim = false @@ -238,7 +238,7 @@ function this:SingleTask(go, rewardSingleData) NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg) PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name) Timer.New(function() - this.refresh() + this.refresh(false,false) end,1):Start() end) elseif state == 0 then diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index bfcef2301f..5232b8923d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -1847,7 +1847,7 @@ function this.RequestFriendSearch(name, func) data.name = name local msg = data:SerializeToString() GoodFriendManager.friendSearchInfo = {} - Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchInfo) + Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchInfo) Network:SendMessageWithCallBack(MessageTypeProto_pb.FRIEND_SEARCH_REQUEST, MessageTypeProto_pb.FRIEND_SEARCH_RESPONSE, msg, function(buffer) local data = buffer:DataByte() local msg = PlayerInfoProto_pb.FriendSearchResponse() diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua index 204cc4e9ec..b6f375e736 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/GrowthGiftPage.lua @@ -56,10 +56,10 @@ end function GrowthGiftPage:RefreshData() self:SetBtnInvestState() - self:RefreshGiftData() + self:RefreshGiftData(true,true) end -function GrowthGiftPage:RefreshGiftData() +function GrowthGiftPage:RefreshGiftData(isTop,isAni) local list = {} --判断是否已经有了List @@ -92,7 +92,7 @@ function GrowthGiftPage:RefreshGiftData() local callBack = function(index, item) self:RefreshShowData(item, list[index]) end - self.scrollView:SetData(list, callBack) + self.scrollView:SetData(list, callBack, not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(self.scrollView) isPlayAnim = false @@ -192,7 +192,7 @@ function GrowthGiftPage:RefreshShowData(item, data) local info = ActivityGiftManager.GetActivityInfo(GrowthRewardId, t[i].Id) if info.state ~= 1 then -- Game.GlobalEvent:DispatchEvent(GameEvent.GrowGift.GetAllGift) - self:RefreshGiftData() + self:RefreshGiftData(false,false) return end end diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/WeekMonthGiftPackPage.lua b/Assets/ManagedResources/~Lua/Modules/Operating/WeekMonthGiftPackPage.lua index 49c071a298..92dc6e00ec 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/WeekMonthGiftPackPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/WeekMonthGiftPackPage.lua @@ -52,12 +52,12 @@ end function WeekMonthGiftPackPage:RefreshData() -- 刷新商品数据 - self:RefreshGiftData(true) + self:RefreshGiftData(true,true) -- 刷新剩余时间 self:GetRemainTime() end -function WeekMonthGiftPackPage:RefreshGiftData(isTop) +function WeekMonthGiftPackPage:RefreshGiftData(isTop,isAni) local shopData = {} self.titleBg.sprite = Util.LoadSprite(data[extra].picture) if extra <= 2 then @@ -88,7 +88,7 @@ function WeekMonthGiftPackPage:RefreshGiftData(isTop) local callBack = function(index, item) self:RefreshShowData(item, shopData[index].data) end - self.scrollView:SetData(shopData, callBack, not isTop) + self.scrollView:SetData(shopData, callBack, not isTop,not isAni) if isPlayAnim then SecTorPlayAnimByScroll(self.scrollView) isPlayAnim = false @@ -182,7 +182,7 @@ function WeekMonthGiftPackPage:RefreshShowData(item, data) --直购商品 PayManager.Pay(data.goodsId, function(id) FirstRechargeManager.RefreshAccumRechargeValue(data.goodsId) - self:RefreshGiftData(false) + self:RefreshGiftData(false,false) CheckRedPointStatus(RedPointType.DailyGift) CheckRedPointStatus(RedPointType.WeekGiftPage) CheckRedPointStatus(RedPointType.MonthGiftPage) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua index 143d3596aa..8666f973a7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua @@ -70,7 +70,7 @@ function this:RechargeSuccessFunc() TreasureOfHeavenManger.SetTreasureState() Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess) elseif curType == 2 then - Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess) + Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess,false,false) end parent:ClosePanel() end diff --git a/Assets/ManagedResources/~Lua/Modules/Setting/HeadChangePopup.lua b/Assets/ManagedResources/~Lua/Modules/Setting/HeadChangePopup.lua index 1c54d8f209..8d42221fdb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Setting/HeadChangePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Setting/HeadChangePopup.lua @@ -100,7 +100,7 @@ function HeadChangePopup:BindEvent() PopupTipPanel.ShowTip(Language[11891]) HeadManager.SetCurFrameId(frameId) Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadFrameChange) - this.RefreshCurShow() + this.RefreshCurShow(false,false) end) elseif this.CurSelectType == SELECT_TYPE.HEAD then local headId = _HeadList[this.CurSelectIndex].Id @@ -113,7 +113,7 @@ function HeadChangePopup:BindEvent() PopupTipPanel.ShowTip(Language[11891]) PlayerManager.head = headId Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadChange) - this.RefreshCurShow() + this.RefreshCurShow(false,false) end) end end) @@ -207,12 +207,12 @@ function this.OnTabChange(index, lastIndex) this.CurSelectIndex = 1 this.ScrollView:SetData(datalist, function(index, go) this.HeadFrameItemAdapter(go, datalist[index], index) - end) - this.ScrollView:SetIndex(1) + end,not true,not true) + -- this.ScrollView:SetIndex(1) end -- -function this.RefreshCurShow() +function this.RefreshCurShow(isTop,isAni) local datalist = {} if this.CurSelectType == SELECT_TYPE.FRAME then datalist = _HeadFrameList @@ -221,7 +221,7 @@ function this.RefreshCurShow() end this.ScrollView:SetData(datalist, function(index, go) this.HeadFrameItemAdapter(go, datalist[index], index) - end) + end,not isTop,not isAni) end -- diff --git a/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua b/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua index c14e7b8248..b81b81665e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua @@ -198,7 +198,7 @@ function this.RequestBuyShopItem(shopType, shopItemId, num, func,isShowReward) this.SortItemList(shopType) -- 更新事件 - Game.GlobalEvent:DispatchEvent(GameEvent.Shop.OnShopInfoChange) + Game.GlobalEvent:DispatchEvent(GameEvent.Shop.OnShopInfoChange,false,false,false) Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnRefreshNextDayData) end) diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/HeavenUnlockExtraRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/HeavenUnlockExtraRewardPanel.lua index 43450f0109..98e6f8271d 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/HeavenUnlockExtraRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/HeavenUnlockExtraRewardPanel.lua @@ -67,7 +67,7 @@ function HeavenUnlockExtraRewardPanel:RechargeSuccessFunc() TreasureOfHeavenManger.SetTreasureState() Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess) elseif curType == 2 then - Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess) + Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess,false,false) end this:ClosePanel() diff --git a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua index 26c22359c1..17da9c6a6d 100644 --- a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua +++ b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua @@ -376,10 +376,55 @@ function this:SetShow(showIndex) if self.co then coroutine.stop(self.co) end - self.co = coroutine.start(function() - -- 分帧加载期间不可拖动 - self.isCanDrag = false - + if self.isPlayAnim then + self.co = coroutine.start(function() + -- 分帧加载期间不可拖动 + self.isCanDrag = false + + for i=1, self.itemCount do + -- local isNew = false + for j=1, self.fixedCount do + item = self.cellItemList[j][i] + index = j+(i-1)*self.fixedCount + dataIndex = j+(i-1 + self.dataLine)*self.fixedCount + + if not item.go then + local go = newObject(self.item) + go.transform:SetParent(self.dragGO.transform) + go.transform.localScale = Vector3.one + go.transform.localPosition = Vector3.zero + go:SetActive(false) + + local tran = go:GetComponent("RectTransform") + tran.anchorMin = Vector2.New(0, 1) + tran.anchorMax = Vector2.New(0, 1) + + item.go = go + item.tran = tran + + -- coroutine.wait(0.01) + -- isNew = true + end + + if item.go then + item.go.name = "item"..index + if self.dragType == 1 then + item.tran.anchoredPosition = Vector2.New(self.itemWidth * (j-1), (0.5-i - self.dataLine) * self.itemHeight) + else + item.tran.anchoredPosition = Vector2.New((i-0.5 + self.dataLine) * self.itemWidth, self.itemHeight * (1-j)) + end + self.goItemList[index] = item.go + end + SetUpdate(self, dataIndex, item) + end + -- if not isNew then + coroutine.wait(0.01) + -- end + end + -- 加载完成可以拖动了 + self.isCanDrag = true + end) + else for i=1, self.itemCount do -- local isNew = false for j=1, self.fixedCount do @@ -416,13 +461,9 @@ function this:SetShow(showIndex) end SetUpdate(self, dataIndex, item) end - -- if not isNew then - coroutine.wait(0.01) - -- end end - -- 加载完成可以拖动了 - self.isCanDrag = true - end) + end + end diff --git a/Assets/ManagedResources/~Lua/View/ShopView.lua b/Assets/ManagedResources/~Lua/View/ShopView.lua index 4ca0c44608..86195c2993 100644 --- a/Assets/ManagedResources/~Lua/View/ShopView.lua +++ b/Assets/ManagedResources/~Lua/View/ShopView.lua @@ -176,7 +176,7 @@ end ---===================================内部函数======================================== -- 刷新商店内容显示 -function this:RefreshShopInfo(isRefresh, isTop) +function this:RefreshShopInfo(isRefresh, isTop,isAni) if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then self.RechargeShopData = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DemonCrystal) else @@ -185,7 +185,7 @@ function this:RefreshShopInfo(isRefresh, isTop) self:RefreshLive() self:RefreshBase() - self:RefreshItemList(isTop) + self:RefreshItemList(isRefresh,isTop,isAni) -- 刷新商店的查看时间 ShopManager.RefreshShopCheckTime(self.ShopType) @@ -379,7 +379,7 @@ function this:RefreshBase() end -- 刷新物品列表 -function this:RefreshItemList(isTop) +function this:RefreshItemList(isRefresh,isTop,isAni) if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then self.ScrollView.gameObject:SetActive(false) self.RechargeScrollView.gameObject:SetActive(true) @@ -390,7 +390,7 @@ function this:RefreshItemList(isTop) -- if isPlayShow then -- shopItem.gameObject:SetActive(false) -- end - end, not isTop) + end, not isTop,not isAni) -- if isPlayShow then -- SecTorPlayAnimByScroll(self.RechargeScrollView,0.03) -- isPlayShow = false @@ -406,7 +406,7 @@ function this:RefreshItemList(isTop) if isPlayShow then shopItem.gameObject:SetActive(true) end - end, not isTop) + end, not isTop,not isAni) -- if isPlayShow then -- -- SecTorPlayAnimByScroll(self.ScrollView, 0.03) -- isPlayShow = false @@ -557,7 +557,7 @@ end function this:RechargeSuccessFunc(id) FirstRechargeManager.RefreshAccumRechargeValue(id) OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id) - self:RefreshShopInfo(false, false) + self:RefreshShopInfo(false, false,true) --PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!") PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0) CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测 @@ -588,7 +588,7 @@ function this:ShowShop(shopType,_sortingOrder) self.ShopConfig = _ShopTypeConfig[self.ShopId] -- 显示帮助按钮 self.helpBtn:SetActive(self.ShopConfig.HelpId ~= 0) - self:RefreshShopInfo(false, true) + self:RefreshShopInfo(false, true,true) -- 设置tip显隐 local isSSSHop = self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP self.scrollBg1:SetActive(not isSSSHop)