From af8aed77010bf19dd10a7fcbe35cc3412de4ceaa Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Sat, 17 Apr 2021 16:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E9=89=B4=E9=94=99=E4=B9=B1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/RoleInfo/RoleStoryLayout.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleStoryLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleStoryLayout.lua index 68e46cfd7b..8cb097c5b1 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleStoryLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleStoryLayout.lua @@ -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()