图鉴错乱修改

dev_chengFeng
zhangqiang 2021-04-17 16:35:38 +08:00
parent eb5cfeb7f8
commit af8aed7701
1 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,4 @@
require("Base/BasePanel")
RoleStoryLayout = Inherit(BasePanel)
local this = RoleStoryLayout
RoleStoryLayout = {}
local curHeroData--当前英雄信息
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
@ -19,7 +17,7 @@ end
--初始化组件(用于子类重写)
function RoleStoryLayout:InitComponent()
this.infoTextStory = Util.GetGameObject(self.gameObject ,"infoBg/infoRect/infoText"):GetComponent("Text")
self.infoTextStory = Util.GetGameObject(self.gameObject ,"infoBg/infoRect/infoText"):GetComponent("Text")
end
--绑定事件(用于子类重写)
@ -48,9 +46,9 @@ end
function RoleStoryLayout:SetData(_sortinglayer,_parent,_curHerodata,_isUpZhen,_heroDatas)
curHeroData = _curHerodata
local story = curHeroData.heroConfig and curHeroData.heroConfig.HeroStory or curHeroData.HeroStory
this.infoTextStory.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-2, 0)
self.infoTextStory.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(-2, 0)
local stroyStr = string.gsub(GetLanguageStrById(story),"#","\n")
this.infoTextStory.text = string.gsub(stroyStr,"|","  ")--传记
self.infoTextStory.text = string.gsub(stroyStr,"|","  ")--传记
end
function RoleStoryLayout:OnHide()