require("Base/BasePanel") GuildTranscriptMainPopup = Inherit(BasePanel) local this = GuildTranscriptMainPopup local guildCheckpointConfig = ConfigManager.GetConfig(ConfigName.GuildCheckpointConfig) local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) local cutOpenIndex = 0 local cutOpenIndexConFig local cutOpenIndexMonsterConFig local itemList = {}--优化itemView使用 local sorting = 0 local curBuyIndex = 0 local oldSelceParent this.playerScrollHead={}--滚动条头像 local isplayAnim = true --初始化组件(用于子类重写) function GuildTranscriptMainPopup:InitComponent() this.m_go = Util.GetGameObject(self.gameObject, "Panel") --btn this.backBtn = Util.GetGameObject(this.m_go, "btnBack") this.helpBtn = Util.GetGameObject(this.m_go,"HelpBtn") this.helpPos = this.helpBtn:GetComponent("RectTransform").localPosition this.quickWarbtn = Util.GetGameObject(this.m_go,"quickWarbtn") this.warbtn = Util.GetGameObject(this.m_go,"warbtn") this.rankBun = Util.GetGameObject(this.m_go,"middleGo/rankBun") this.sendBtn = Util.GetGameObject(this.m_go,"middleGo/sendBtn") this.endNumBtn = Util.GetGameObject(this.m_go,"middleGo/endNumBtn") --text this.name = Util.GetGameObject(self.gameObject,"name"):GetComponent("Text")--军团副本 this.name.text = Language[11065] this.rewardGoText1 = Util.GetGameObject(self.gameObject,"middleGo/rewardGo/tip/Text1"):GetComponent("Text")--单次奖励 this.rewardGoText2 = Util.GetGameObject(self.gameObject,"middleGo/rewardGo/tip/Text2"):GetComponent("Text")--击杀奖励 this.attackInfoBtn = Util.GetGameObject(this.m_go,"middleGo/attackInfo") this.attackInfoText = Util.GetGameObject(this.m_go,"middleGo/attackInfo/attackInfoText"):GetComponent("Text")--全军团成员攻击力+16% this.attackInfoTime = Util.GetGameObject(this.m_go,"middleGo/attackInfo/attackInfoTime"):GetComponent("Text")--(08:52:24后失效) this.attackInfoTextGo = Util.GetGameObject(this.m_go,"middleGo/attackInfo/attackInfoText") this.attackInfoTimeGO = Util.GetGameObject(this.m_go,"middleGo/attackInfo/attackInfoTime") this.endNumText = Util.GetGameObject(this.m_go,"middleGo/endNumBtn/endNumBuyText"):GetComponent("Text")--剩余购买次数:3 this.endNumBuyText = Util.GetGameObject(this.m_go,"middleGo/endNumBtn/endNumText"):GetComponent("Text")--剩余次数:22 --boss this.boss = Util.GetGameObject(this.m_go,"middleGo/boss") this.bossHerobg=Util.GetGameObject(this.boss,"Bg1"):GetComponent("Image") this.bossHerolive = Util.GetGameObject(this.boss, "Mask/icon"):GetComponent("RawImage") this.bossHerohpPass = Util.GetGameObject(this.boss,"hpPass"):GetComponent("Image") this.bossHerohpPassText = Util.GetGameObject(this.boss,"hpText"):GetComponent("Text") --titlechapter this.SelectImage = Util.GetGameObject(this.m_go, "upChapterGo/SelectImage") local v2 = Util.GetGameObject(this.m_go, "upChapterGo/upChapter"):GetComponent("RectTransform").rect this.titleScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(this.m_go, "upChapterGo/upChapter").transform, Util.GetGameObject(this.m_go, "upChapterGo/singleChapterPre"), nil, Vector2.New(-v2.x*2, -v2.y*2), 2, 1, Vector2.New(10,10)) this.titleScrollView.moveTween.MomentumAmount = 1 this.titleScrollView.moveTween.Strength = 1 this.reward1 = Util.GetGameObject(self.gameObject, "middleGo/rewardGo/reward1") this.reward2 = Util.GetGameObject(self.gameObject, "middleGo/rewardGo/reward2") this.Empty = Util.GetGameObject(self.gameObject, "endGo/Empty") Util.GetGameObject(self.gameObject, "endGo/Empty/Bg/Text"):GetComponent("Text").text = Language[11066] --rank local v2New = Util.GetGameObject(this.m_go, "endGo/rankList"):GetComponent("RectTransform").rect this.rankScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(this.m_go, "endGo/rankList").transform, Util.GetGameObject(this.m_go, "endGo/ItemPre"), nil, Vector2.New(906.8, 545.4), 1, 1, Vector2.New(0,0)) this.rankScrollView.moveTween.MomentumAmount = 1 this.rankScrollView.moveTween.Strength = 1 Util.GetGameObject(self.gameObject,"middleGo/rankBun"):GetComponent("Image").sprite=Util.LoadSprite("g_gonghui_paihangjianglianniu_zh") Util.GetGameObject(self.gameObject,"middleGo/sendBtn"):GetComponent("Image").sprite=Util.LoadSprite("r_gonghui_jijiehaojiaoanniu_zh") end --绑定事件(用于子类重写) function GuildTranscriptMainPopup:BindEvent() Util.AddClick(this.helpBtn,function() UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.GuildTranscripe,this.helpPos.x,this.helpPos.y) end) Util.AddClick(this.backBtn,function() PlaySoundWithoutClick(SoundConfig.Sound_UICancel) self:ClosePanel() end) Util.AddClick(this.warbtn,function() if GuildTranscriptManager.GetCanBattleCount() <=0 then --今日已无剩余次数! if GuildTranscriptManager.GetCanBuyBattleCount() <= 0 then PopupTipPanel.ShowTip(Language[11067]) else--是否花费XX妖晶购买1次挑战次数并发起挑战? local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1) local itemName = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name) if finalNum > BagManager.GetItemCountById(costId) then PopupTipPanel.ShowTip(string.format(Language[11068],itemName) ) return end MsgPanel.ShowTwo(string.format( Language[11069],finalNum,itemName), nil, function() --买东西 ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function() PopupTipPanel.ShowTip(Language[10517]) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_TRANSCRIPT) PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, 1)--更新特权 this.ShowEndNumInfo() end) end) end else UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_TRANSCRIPT) end end) Util.AddClick(this.quickWarbtn,function() if GuildTranscriptManager.GetCanBattleCount() <=0 then --今日已无剩余次数! if GuildTranscriptManager.GetCanBuyBattleCount() <= 0 then PopupTipPanel.ShowTip(Language[11067]) else--是否花费XX妖晶购买1次挑战次数并发起挑战? local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1) local itemName = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name) if finalNum > BagManager.GetItemCountById(costId) then PopupTipPanel.ShowTip(string.format(Language[11068],itemName) ) return end --是否花费XX妖晶购买1次扫荡次数,本次扫荡伤害为XXXXXX MsgPanel.ShowTwo(string.format( Language[11070],finalNum,itemName,GuildTranscriptManager.damage), nil, function() --买东西 ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function() PopupTipPanel.ShowTip(Language[11071]) PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, 1)--更新特权 this.QuickWar() this.ShowEndNumInfo() end) end) end else MsgPanel.ShowTwo(string.format( Language[11072],GuildTranscriptManager.damage), nil, function() this.QuickWar() end) end end) Util.AddClick(this.endNumBtn,function() local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1) local itemName =GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name) if finalNum > BagManager.GetItemCountById(costId) then PopupTipPanel.ShowTip(string.format(Language[11068],itemName) ) return end if GuildTranscriptManager.GetCanBuyBattleCount() <= 0 then PopupTipPanel.ShowTip(Language[11073]) return end MsgPanel.ShowTwo(string.format( Language[10516],finalNum,itemName), nil, function() --买东西 ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function() PopupTipPanel.ShowTip(Language[10517]) PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, 1)--更新特权 this.ShowEndNumInfo() end) end) end) -- GuildTranscriptRewardSortPanel Util.AddClick(this.rankBun,function() UIManager.OpenPanel(UIName.GuildTranscriptRewardSortPanel,cutOpenIndex) end) Util.AddClick(this.sendBtn,function() local pos = MyGuildManager.GetMyPositionInGuild() LogGreen("pos "..pos) if pos == GUILD_GRANT.MEMBER then PopupTipPanel.ShowTip(Language[11074]) return end if cutOpenIndex ~= GuildTranscriptManager.GetCurBoss() then PopupTipPanel.ShowTip(Language[11075]) return end NetManager.GuildChallengeMessageResponse(function (msg) LogGreen("msg.nextTime "..msg.nextTime.." PlayerManager.serverTime "..PlayerManager.serverTime) local second = msg.nextTime - PlayerManager.serverTime if second <= 0 then ChatManager.RequestSendGuildTranscript(function() end) PopupTipPanel.ShowTip(Language[11076]) else PopupTipPanel.ShowTip(string.format(Language[11077],TimeToMS(second))) end end) end) Util.AddClick(this.attackInfoBtn,function() local curguildCheckpointConfig = guildCheckpointConfig[GuildTranscriptManager.GetCurBoss()] local nextBuyIndex = curBuyIndex + 1 local itemId = curguildCheckpointConfig.AttributePromotePrice[1][1] local buyNum = curguildCheckpointConfig.AttributePromotePrice[2][nextBuyIndex] local itemName = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId).Name) if not buyNum then PopupTipPanel.ShowTip(Language[11078]) return end if buyNum > BagManager.GetItemCountById(itemId) then PopupTipPanel.ShowTip(string.format(Language[11068],itemName) ) return end if curguildCheckpointConfig.AttributePromotePrice[2][nextBuyIndex] then local addNum = ConfigManager.GetConfigData(ConfigName.FoodsConfig,curguildCheckpointConfig.AttributePromote[nextBuyIndex]).EffectPara MsgPanel.ShowTwo(string.format(Language[11079],buyNum,itemName,math.floor(addNum[1][2]/100) ).."%", nil, function() --买东西 NetManager.GuildChallengeBuyBuffRequest() end) else PopupTipPanel.ShowTip(Language[11080]) end end) end function GuildTranscriptMainPopup:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Guild.RefreshGuildTranscript, this.ShowPanelData) Game.GlobalEvent:AddEvent(GameEvent.Guild.RefreshGuildTranscriptBuff, this.ShowBuffData) Game.GlobalEvent:AddEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn, this.ShowQuickBtnData) end --移除事件监听(用于子类重写) function GuildTranscriptMainPopup:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Guild.RefreshGuildTranscript, this.ShowPanelData) Game.GlobalEvent:RemoveEvent(GameEvent.Guild.RefreshGuildTranscriptBuff, this.ShowBuffData) Game.GlobalEvent:RemoveEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn, this.ShowQuickBtnData) end --界面打开时调用(用于子类重写) function GuildTranscriptMainPopup:OnOpen(_curIndex) end --界面打开或者重新打开后,界面刷新时调用(用于子类重写) function GuildTranscriptMainPopup:OnShow() isplayAnim = true if isplayAnim then this.rankScrollView:ForeachItemGO(function (index, go) go.gameObject:SetActive(false) end) end this.ShowBossInfo() this.ShowEndNumInfo() GuildTranscriptManager.GetGuildChallengeInfoRequest() end function this.ShowPanelData() cutOpenIndex = GuildTranscriptManager.GetCurBoss() this.ShowTitleChapterInfo() this.ShowPanelInfo(cutOpenIndex) end function GuildTranscriptMainPopup:OnSortingOrderChange() for i, v in pairs(itemList) do for j = 1, #v do v[j]:SetEffectLayer(self.sortingOrder) end end sorting = self.sortingOrder end function this.ShowTitleChapterInfo() local allConFigData = GuildTranscriptManager.GetAllConFigData() this.SelectImage:SetActive(false) this.titleScrollView:SetData(allConFigData, function (index, go) this.SingleChapterDataShow(go, allConFigData[index]) end,true,true) this.titleScrollView:SetIndex(cutOpenIndex) end local rankingInfo,myRankingInfo local firstDamage = 0 function this.ShowRankingListInfo() rankingInfo,myRankingInfo = RankingManager.GetRankingInfo() LogGreen("#rankingInfo "..#rankingInfo) this.Empty:SetActive(#rankingInfo == 0) Util.GetGameObject(this.gameObject, "endGo/rankList"):SetActive(#rankingInfo ~= 0) if #rankingInfo > 0 then firstDamage = rankingInfo[1].rankInfo.param1 end this.rankScrollView :SetData(rankingInfo, function (index, go) this.SingleRankingInfoShow(go, rankingInfo[index]) end,false,true) -- this.rankScrollView:SetIndex(1) end function this.SingleChapterDataShow(go,data) Util.GetGameObject(go,"title/Text"):GetComponent("Text").text = GetLanguageStrById(data.Remarks) local lock = Util.GetGameObject(go,"lock") local mask = Util.GetGameObject(go,"mask") local monsterData = this.GetMonsterConfigDataById(data.MonsterId) if not monsterData then return end Util.GetGameObject(go,"icon"):GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(heroConfig[monsterData.MonsterId].Icon)) if GuildTranscriptManager.GetCurBoss() > data.Id then--已打过 Util.SetGray(go, true) lock:SetActive(false) mask:SetActive(false) elseif GuildTranscriptManager.GetCurBoss() == data.Id then--已开启 Util.SetGray(go, false) lock:SetActive(false) mask:SetActive(false) else--未开启 Util.SetGray(go, false) lock:SetActive(true) mask:SetActive(true) end if cutOpenIndex == data.Id then this.SetSelectImagePos(go) elseif oldSelceParent == go then this.SelectImage:SetActive(false) end Util.AddOnceClick(Util.GetGameObject(go,"click"),function() if data.Id > GuildTranscriptManager.GetCurBoss() then return PopupTipPanel.ShowTip(Language[11081]) end this.ShowPanelInfo(data.Id) this.SetSelectImagePos(go) end) 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={} for i = 1, 4 do sortNumTabs[i]=Util.GetGameObject(root,"SortNum/SortNum ("..i..")") sortNumTabs[i]:SetActive(false) end if rank < 4 then sortNumTabs[rank]:SetActive(true) else sortNumTabs[4]:SetActive(true) if rank > 100 then rank="100+" end Util.GetGameObject(sortNumTabs[4], "TitleText"):GetComponent("Text").text = rank end --头像 local headObj=Util.GetGameObject(root,"Head") if not this.playerScrollHead[root] then this.playerScrollHead[root]=CommonPool.CreateNode(POOL_ITEM_TYPE.PLAYER_HEAD,headObj) end this.playerScrollHead[root]:Reset() this.playerScrollHead[root]:SetHead(rankData.head) this.playerScrollHead[root]:SetFrame(rankData.headFrame) this.playerScrollHead[root]:SetLevel(rankData.level) this.playerScrollHead[root]:SetScale(Vector3.one*0.7) this.playerScrollHead[root]:SetLayer(this.sortingOrder) this.playerScrollHead[root]:SetEffectScale(0.75) -- Util.GetGameObject(root, "name"):GetComponent("Text").text = rankData.userName Util.GetGameObject(root, "progressbar/progress1"):GetComponent("Image").fillAmount = math.floor((rankData.rankInfo.param1/firstDamage)*100)/100 Util.GetGameObject(root, "progressbar/num"):GetComponent("Text").text = rankData.rankInfo.param1--.."/"..firstDamage Util.GetGameObject(root, "SelfBG"):SetActive(PlayerManager.uid == rankData.uid) local clickBtn=Util.GetGameObject(root,"ClickBtn") Util.AddOnceClick(clickBtn,function() UIManager.OpenPanel(UIName.PlayerInfoPopup, rankData.uid) end) end function this.ShowPanelInfo(chapterId) cutOpenIndex = chapterId this.ShowQuickBtnData() this.ShowEndNumInfo() cutOpenIndexConFig = guildCheckpointConfig[cutOpenIndex] cutOpenIndexMonsterConFig =this.GetMonsterConfigDataById(guildCheckpointConfig[cutOpenIndex].MonsterId) this.ShowBossInfo() this.ShowRewardInfo() end function this.ShowQuickBtnData() local canSweep = GuildTranscriptManager.GetCanSweep() == 1 and true or false local isEqualityChapter = cutOpenIndex == GuildTranscriptManager.GetCurBoss() and true or false LogGreen("canSweep "..tostring(canSweep).." isEqualityChapter "..tostring(isEqualityChapter)) this.quickWarbtn:GetComponent("Button").enabled = canSweep and isEqualityChapter this.warbtn:GetComponent("Button").enabled = isEqualityChapter Util.SetGray(this.quickWarbtn,not (canSweep and isEqualityChapter)) Util.SetGray(this.warbtn,not isEqualityChapter) RankingManager.InitData(RANK_TYPE.GUILDTRANSCRIPT,function() this.ShowRankingListInfo() end,cutOpenIndex) end --显示boss立绘信息 function this.ShowBossInfo() if not cutOpenIndexMonsterConFig then return end local curheroConfig = heroConfig[cutOpenIndexMonsterConFig.MonsterId] this.bossHerobg.sprite = Util.LoadSprite(GetHeroCardStarBg[curheroConfig.Star]) this.bossHerohpPass.fillAmount = GuildTranscriptManager.GetBlood()/10000 this.bossHerohpPassText.text = GuildTranscriptManager.GetBlood()/100 .."%" if cutOpenIndex < GuildTranscriptManager.GetCurBoss() then this.bossHerohpPassText.text = Language[11082] this.bossHerohpPass.fillAmount = 0 end local liveName = GetResourcePath(curheroConfig.Live) local roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, curheroConfig.Id) local scale = roleConfig.play_liveScale local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0) this.bossHerolive.texture = CardRendererManager.GetSpineTexture(1, liveName, Vector3.one * scale, livePos, true) this.bossHerolive.transform.localScale = Vector3.one this.bossHerolive.transform.localPosition = Vector3.zero * 0.6 end function this.ShowRewardInfo() -- guildCheckpointConfig[cutOpenIndex] if not itemList[this.reward1.name] then itemList[this.reward1.name] = {} end if not itemList[this.reward2.name] then itemList[this.reward2.name] = {} end for i = 1, #itemList[this.reward1.name] do itemList[this.reward1.name][i].gameObject:SetActive(false) end for i = 1, #itemList[this.reward1.name] do itemList[this.reward1.name][i].gameObject:SetActive(false) end local reward1Data = ConfigManager.GetConfigData(ConfigName.RewardGroup,cutOpenIndexConFig.Reward).ShowItem local reward2Data = ConfigManager.GetConfigData(ConfigName.RewardGroup,cutOpenIndexConFig.KillReward).ShowItem --96 reward2Data[2] = {96,cutOpenIndexConFig.LegionExp} for i = 1, #reward1Data do if itemList[this.reward1.name][i] then itemList[this.reward1.name][i]:OnOpen(false, reward1Data[i], 0.7,false,false,false,sorting) else itemList[this.reward1.name][i] = SubUIManager.Open(SubUIConfig.ItemView, this.reward1.transform) itemList[this.reward1.name][i]:OnOpen(false, reward1Data[i], 0.7,false,false,false,sorting) end itemList[this.reward1.name][i].gameObject:SetActive(true) end for i = 1, #reward2Data do if itemList[this.reward2.name][i] then itemList[this.reward2.name][i]:OnOpen(false, reward2Data[i], 0.7,false,false,false,sorting) else itemList[this.reward2.name][i] = SubUIManager.Open(SubUIConfig.ItemView, this.reward2.transform) itemList[this.reward2.name][i]:OnOpen(false, reward2Data[i], 0.7,false,false,false,sorting) end itemList[this.reward2.name][i].gameObject:SetActive(true) end end function this.GetMonsterConfigDataById(MonsterId) local monsterConFig = nil local monsterGrip = ConfigManager.GetConfigData(ConfigName.MonsterGroup,MonsterId) if not monsterGrip then return nil end local monsterId = 0 for i = 1, #monsterGrip.Contents do if monsterId <= 0 then for j = 1, #monsterGrip.Contents[i] do if monsterGrip.Contents[i][j] > 0 then monsterId = monsterGrip.Contents[i][j] break end end end end if monsterId <= 0 then return nil end local monsterData = ConfigManager.GetConfigData(ConfigName.MonsterConfig,monsterId) return monsterData end function this.ShowEndNumInfo() this.endNumText.text = Language[11083] .. GuildTranscriptManager.GetCanBattleCount() this.endNumBuyText.text = Language[11084] .. GuildTranscriptManager.GetCanBuyBattleCount() end function this.QuickWar() GuildTranscriptManager.GuildChallengeRequest(1,function() this.ShowPanelData() this.ShowEndNumInfo() RankingManager.InitData(RANK_TYPE.GUILDTRANSCRIPT,function() this.ShowRankingListInfo() end,GuildTranscriptManager.GetCurBoss()) end) end function this.ShowBuffData() curBuyIndex = GuildTranscriptManager.GetbuffCount() local curguildCheckpointConfig = guildCheckpointConfig[GuildTranscriptManager.GetCurBoss()] local attackBuffNum = 0 if curBuyIndex > 0 then local addNum = ConfigManager.GetConfigData(ConfigName.FoodsConfig,curguildCheckpointConfig.AttributePromote[curBuyIndex]).EffectPara attackBuffNum = math.floor(addNum[1][2]/100) end local GetbuffTime = GuildTranscriptManager.GetbuffTime() > 0 and GuildTranscriptManager.GetbuffTime() - PlayerManager.serverTime or 0 if attackBuffNum == 0 then --%s this.attackInfoText.text = Language[11085] else this.attackInfoText.text = string.format(Language[11086],attackBuffNum).."%" end this.RemainTimeDown(this.attackInfoTime, GetbuffTime) end this.timer = Timer.New() --刷新倒计时显示 function this.RemainTimeDown(_timeTextExpert,timeDown) if timeDown > 0 then -- if this.attackInfoTimeGo then -- this.attackInfoTimeGo:SetActive(true) -- end if _timeTextExpert then _timeTextExpert.text = this.TimeStampToDateString(timeDown) end if this.timer then this.timer:Stop() this.timer = nil end this.timer = Timer.New(function() if _timeTextExpert then _timeTextExpert.text = this.TimeStampToDateString(timeDown) end if timeDown < 0 then _timeTextExpert.text = "" this.attackInfoText.text = Language[11085] -- if this.attackInfoTimeGo then -- this.attackInfoTimeGo:SetActive(false) -- end this.timer:Stop() this.timer = nil end timeDown = timeDown - 1 end, 1, -1, true) this.timer:Start() else if this.timer then this.timer:Stop() this.timer = nil end _timeTextExpert.text = "" this.attackInfoText.text = Language[11085] -- LogGreen("ssssssssss") -- if this.attackInfoTimeGo then -- LogGreen("ssssssssss2") -- this.attackInfoTimeGo:SetActive(false) -- end end end function this.TimeStampToDateString(second) return string.format(Language[11087],TimeToHMS(second)) end function this.SetSelectImagePos(parent) oldSelceParent = parent Util.SetGray(this.SelectImage,false) this.SelectImage:SetActive(true) this.SelectImage.transform:SetParent(Util.GetGameObject(parent, "GameObject").transform) this.SelectImage:GetComponent("RectTransform").localPosition = Vector3.zero this.SelectImage:GetComponent("RectTransform").localScale = Vector3.New(1,1,1) end --界面关闭时调用(用于子类重写) function GuildTranscriptMainPopup:OnClose() end --界面销毁时调用(用于子类重写) function GuildTranscriptMainPopup:OnDestroy() itemList = {} if this.timer then this.timer:Stop() this.timer = nil end end return GuildTranscriptMainPopup