2021-09-09 20:45:12 +08:00
|
|
|
|
local this = {}
|
|
|
|
|
--传入父脚本模块
|
|
|
|
|
local parent
|
|
|
|
|
--传入特效层级
|
|
|
|
|
local sortingOrder=0
|
|
|
|
|
|
|
|
|
|
--初始化组件(用于子类重写)
|
|
|
|
|
function this:InitComponent(gameObject)
|
|
|
|
|
this.title = Util.GetGameObject(gameObject, "Title/Text"):GetComponent("Text")
|
|
|
|
|
this.addList = Util.GetGameObject(gameObject, "AddList")
|
|
|
|
|
this.TextPre = Util.GetGameObject(this.addList, "TextPre")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--绑定事件(用于子类重写)
|
|
|
|
|
function this:BindEvent()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--添加事件监听(用于子类重写)
|
|
|
|
|
function this:AddListener()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--移除事件监听(用于子类重写)
|
|
|
|
|
function this:RemoveListener()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面打开时调用(用于子类重写)
|
|
|
|
|
function this:OnShow(_parent,...)
|
|
|
|
|
parent=_parent
|
|
|
|
|
sortingOrder = _parent.sortingOrder
|
|
|
|
|
local _args = {...}
|
|
|
|
|
local professionId=_args[1]
|
|
|
|
|
local professionLv=_args[2]
|
|
|
|
|
local professionName=_args[3]
|
|
|
|
|
local index=0
|
|
|
|
|
this.title.text=string.format("四象心法-%s",professionName)
|
|
|
|
|
local fourQuadConfigArr = ConfigManager.GetConfig(ConfigName.FourQuadrantConfig)
|
|
|
|
|
for i, configInfo in ConfigPairs(fourQuadConfigArr) do
|
|
|
|
|
if configInfo.Star>0 then
|
2021-09-17 15:18:50 +08:00
|
|
|
|
local propId=configInfo.Skill[professionId][1]
|
|
|
|
|
local propAdd=configInfo.Skill[professionId][2]/100
|
|
|
|
|
local propertyConfig= ConfigManager.GetConfigDataByKey(ConfigName.PropertyConfig,"PropertyId",propId)
|
2021-09-09 20:45:12 +08:00
|
|
|
|
local textObj =this.addList.transform:GetChild(index)
|
|
|
|
|
index=index+1
|
|
|
|
|
local skillText=textObj:GetComponent("Text")
|
|
|
|
|
if configInfo.Star==professionLv then
|
2023-12-07 01:11:27 +08:00
|
|
|
|
skillText.text=string.format("<color=#18FF00>%s级:全体英雄%s+%s%%</color>",fourQuadConfigArr[i].Star,propertyConfig.Info,propAdd)
|
2021-09-09 20:45:12 +08:00
|
|
|
|
else
|
2023-12-07 01:11:27 +08:00
|
|
|
|
skillText.text=string.format("<color=#AEBEB6>%s级:全体英雄%s+%s%%</color>",fourQuadConfigArr[i].Star,propertyConfig.Info,propAdd)
|
2021-09-09 20:45:12 +08:00
|
|
|
|
end
|
|
|
|
|
textObj.gameObject:SetActive(true)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面关闭时调用(用于子类重写)
|
|
|
|
|
function this:OnClose()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面销毁时调用(用于子类重写)
|
|
|
|
|
function this:OnDestroy()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return this
|