require("Base/BasePanel") GongMingResultTips = Inherit(BasePanel) local this = GongMingResultTips local curSelectHeroList={} local heroDataList={} local curNeedRoleNum local openThisPanel local curHeroData = {} local TempData = nil; local SelectHero = nil local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) --初始化组件(用于子类重写) function GongMingResultTips:InitComponent() this.spLoader = SpriteLoader.New() self.BackMask = Util.GetGameObject(self.transform, "BackMask") self.breakOpenSkillGrid =Util.GetGameObject(self.transform, "bg/breakOpenSkill/Mask") self.upStarSkillTextPreDegree = Util.GetGameObject(self.transform, "bg/upStarSkillTextPre1/content") self.upStarSkillTextPreEquip = Util.GetGameObject(self.transform, "bg/upStarSkillTextPre2/content") self.preEquip = Util.GetGameObject(self.transform, "bg/upStarSkillTextPre2") self.preEquip:SetActive(false) self.upStarSkillTextPreHun = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre3/content") self.preHun = Util.GetGameObject(self.transform, "bg/upStarSkillTextPre3") self.preHun:SetActive(false) self.upStarSkillTextPreSoul = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre4/content") self.preSoul = Util.GetGameObject(self.transform, "bg/upStarSkillTextPre4") self.preSoul:SetActive(false) self.upStarSkillTextPreFa = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre5/content") self.upStarSkillTextPreFa1 = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre5") self.upStarSkillTextPreFa1:SetActive(false) self.upStarOpenSkill =Util.GetGameObject(self.transform, "bg/upStarOpenSkill/Mask") end --绑定事件(用于子类重写) function GongMingResultTips:BindEvent() Util.AddClick(this.BackMask, function() self:ClosePanel() end) end --添加事件监听(用于子类重写) function GongMingResultTips:AddListener() end --移除事件监听(用于子类重写) function GongMingResultTips:RemoveListener() end function GongMingResultTips:OnOpen(skinId) local data = HarmonyManager:GetAdditions() for i = 1, #data do if data[i].additionType == 1 then if data[i].heroTid == 0 then local num = HarmonyManager:HongMengTowerUpLimit() self.upStarSkillTextPreDegree:GetComponent("Text").text = string.format(Language[12196],data[i].value,num) elseif data[i].heroTid == -1 then else self.upStarSkillTextPreDegree:GetComponent("Text").text = string.format(Language[12197],data[i].value,GetLanguageStrById(ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)) end elseif data[i].additionType == 2 then if data[i].value == -1 then self.upStarSkillTextPreEquip:GetComponent("Text").text = string.format(Language[12198]) else local equip = ConfigManager.GetConfigData(ConfigName.EquipStarsConfig,data[i].value) self.upStarSkillTextPreEquip:GetComponent("Text").text = GetStringByEquipQua(equip.Quality,string.format(Language[12199],GetQuantityStrByquality(equip.Quality),equip.Stars,GetLanguageStrById(ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName))) end elseif data[i].additionType == 3 then if data[i].heroTid~= 0 and data[i].value > 0 then self.upStarSkillTextPreHun:SetActive(true) self.upStarSkillTextPreHun:GetComponent("Text").text = string.format("%d(%s)",data[i].value,GetLanguageStrById(ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)) else if PlayerManager.level<75 then self.upStarSkillTextPreHun:SetActive(false) self.upStarSkillTextPreHun:GetComponent("Text").text = "" else self.upStarSkillTextPreHun:SetActive(true) self.upStarSkillTextPreHun:GetComponent("Text").text = string.format(Language[12198]) end end elseif data[i].additionType == 4 then if data[i].heroTid ~= 0 and data[i].value > 0 then self.upStarSkillTextPreSoul:SetActive(true) self.upStarSkillTextPreSoul:GetComponent("Text").text =string.format("%d(%s)",data[i].value,GetLanguageStrById(ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)) else if PlayerManager.level<75 then self.upStarSkillTextPreSoul:SetActive(false) self.upStarSkillTextPreSoul:GetComponent("Text").text ="" else self.upStarSkillTextPreSoul:SetActive(true) self.upStarSkillTextPreSoul:GetComponent("Text").text = string.format(Language[12198]) end end else if data[i].value ~= -1 then print(data[i].heroTid ) self.upStarSkillTextPreFa:GetComponent("Text").text =string.format("%d(%s)",data[i].value,GetLanguageStrById(ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)) else self.upStarSkillTextPreFa:GetComponent("Text").text =string.format(Language[12198]) end end end end --界面关闭时调用(用于子类重写) function GongMingResultTips:OnClose() end --界面销毁时调用(用于子类重写) function GongMingResultTips:OnDestroy() this.spLoader:Destroy() end return GongMingResultTips