Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

gaoxin 2020-09-12 19:24:53 +08:00
commit 62635bf604
4 changed files with 1207 additions and 6452 deletions

View File

@ -8,7 +8,7 @@ local refreshIsMaterial = true
local isRefreshAddNum = false
local orginLayer = 0
local isFirstOpen
local isPlayAnim = true
local starImage={[1]="x_xunbao_xingxingkong",[2]="ui_1xing"}--星星资源名
--初始化组件(用于子类重写)
function FindTreasureMainPanel:InitComponent()
@ -21,14 +21,14 @@ function FindTreasureMainPanel:InitComponent()
self.allGetBtn = Util.GetGameObject(self.gameObject, "allGetBtn")
self.findTreasureGridGo = Util.GetGameObject(self.gameObject, "rect/rect (1)/grid")
self.rewardPre = Util.GetGameObject(self.gameObject, "rewardPre")
for i = 1, 2 do
findTreasureGrid[i] = Util.GetGameObject(self.gameObject, "rect/rect (1)/grid/rewardPre ("..i..")")
local curexpertRewardItemsGri = {}
for j = 1, 4 do
curexpertRewardItemsGri[j] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(findTreasureGrid[i], "content").transform)
end
findTreasureItemsGrid[i] = curexpertRewardItemsGri
end
-- for i = 1, 2 do
-- findTreasureGrid[i] = Util.GetGameObject(self.gameObject, "rect/rect (1)/grid/rewardPre ("..i..")")
-- local curexpertRewardItemsGri = {}
-- for j = 1, 4 do
-- curexpertRewardItemsGri[j] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(findTreasureGrid[i], "content").transform)
-- end
-- findTreasureItemsGrid[i] = curexpertRewardItemsGri
-- end
self.FindTreasureVipIcon = Util.GetGameObject(self.gameObject, "FindTreasureVipBtn/icon"):GetComponent("Image")
self.FindTreasureVipTextIcon = Util.GetGameObject(self.gameObject, "FindTreasureVipBtn/icon/icon (1)"):GetComponent("Image")
self.FindTreasureVipText = Util.GetGameObject(self.gameObject, "FindTreasureVipBtn/Text"):GetComponent("Text")
@ -89,6 +89,7 @@ function FindTreasureMainPanel:BindEvent()
if isRefreshAddNum then
PlayerManager.missingRefreshCount = PlayerManager.missingRefreshCount + 1
end
isPlayAnim = true
self:OnShowPanelData(true)
end)
end, nil, nil, nil)
@ -98,6 +99,7 @@ function FindTreasureMainPanel:BindEvent()
if isRefreshAddNum then
PlayerManager.missingRefreshCount = PlayerManager.missingRefreshCount + 1
end
isPlayAnim = true
self:OnShowPanelData(true)
end)
end
@ -149,7 +151,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function FindTreasureMainPanel:OnShow()
isPlayAnim = true
self:OnShowPanelData(true)
end
function FindTreasureMainPanel:OnSortingOrderChange()
@ -172,9 +174,10 @@ function FindTreasureMainPanel:OnShowPanelData(isSort)
if isSort then
self:MissionInfoSort(missionInfo)
end
for i = 1, math.max(#missionInfo, #findTreasureGrid) do
local go = findTreasureGrid[i]
if not go then
if not findTreasureGrid[i] then
go = newObject(self.rewardPre)
go.transform:SetParent(self.findTreasureGridGo.transform)
go.transform.localScale = Vector3.one
@ -185,8 +188,17 @@ function FindTreasureMainPanel:OnShowPanelData(isSort)
end
go.gameObject:SetActive(false)
end
local tempList = {}
for i = 1, #missionInfo do
self:ActivityRewardSingleShow(i,missionInfo[i])
table.insert(tempList,findTreasureGrid[i])
if isPlayAnim then
findTreasureGrid[i].gameObject:SetActive(false)
end
end
if isPlayAnim then
SecTorPlayAnim(tempList)
isPlayAnim = false
end
if isFirstOpen then
isFirstOpen = false
@ -212,7 +224,7 @@ function FindTreasureMainPanel:OnShowPanelData(isSort)
self.FindTreasureVipIcon.sprite = Util.LoadSprite(FindTreasureVipTypeSprite[curVipState])
self.FindTreasureVipTextIcon.sprite = Util.LoadSprite(FindTreasureVipTextTypeSprite[curVipState])
--刷新道具
local mazeTreasureSetting = ConfigManager.GetConfigData(ConfigName.MazeTreasureSetting,1)--得判断是否 特权
local mazeTreasureSetting = ConfigManager.GetConfigData(ConfigName.MazeTreasureSetting,1)--得判断是否特权
local itemNum = BagManager.GetItemCountById(FindTreasureManager.refreshTicketItemId)
local RefreshItemNum = BagManager.GetItemCountById(mazeTreasureSetting.RefreshItem[1])
--Log("83 itemNum "..itemNum)

View File

@ -11,6 +11,7 @@ local sorting = 0
local curBuyIndex = 0
local oldSelceParent
this.playerScrollHead={}--滚动条头像
local isplayAnim = true
--初始化组件(用于子类重写)
function GuildTranscriptMainPopup:InitComponent()
--btn
@ -214,6 +215,12 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function GuildTranscriptMainPopup:OnShow()
isplayAnim = true
if isplayAnim then
this.SingleRankingInfoShow:ForeachItemGO(function (index, go)
go.gameObject:SetActive(false)
end)
end
this.ShowBossInfo()
this.ShowEndNumInfo()
end
@ -251,7 +258,11 @@ function this.ShowRankingListInfo()
end
this.rankScrollView :SetData(rankingInfo, function (index, go)
this.SingleRankingInfoShow(go, rankingInfo[index])
end)
end)
if isplayAnim then
SecTorPlayAnimByScroll(this.rankScrollView)
isplayAnim = false
end
this.rankScrollView:SetIndex(1)
end
function this.SingleChapterDataShow(go,data)
@ -289,6 +300,11 @@ function this.SingleChapterDataShow(go,data)
end
function this.SingleRankingInfoShow(root,rankData)
if isplayAnim then
root.gameObject:SetActive(false)
else
root.gameObject:SetActive(true)
end
--排名
local rank = rankData.rankInfo.rank
local sortNumTabs={}
@ -324,6 +340,7 @@ function this.SingleRankingInfoShow(root,rankData)
Util.AddOnceClick(clickBtn,function()
UIManager.OpenPanel(UIName.PlayerInfoPopup, rankData.uid)
end)
end
function this.ShowPanelInfo(chapterId)