114 lines
5.1 KiB
Lua
114 lines
5.1 KiB
Lua
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()
|
|
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.upStarSkillTextPreHun = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre3/content")
|
|
self.upStarSkillTextPreSoul = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre4/content")
|
|
self.upStarSkillTextPreFa = Util.GetGameObject(self.transform,"bg/upStarSkillTextPre5/content")
|
|
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("<color=green>%d</color>(%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("<color=green>%d</color>(%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("<color=green>%d</color>(%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()
|
|
|
|
|
|
end
|
|
|
|
return GongMingResultTips |