【登录】修改特效依然再喜扑的包里显示的问题

dev_chengFeng
gaoxin 2021-06-03 23:03:09 +08:00
parent 079afb4e8d
commit 3eb84202f2
1 changed files with 11 additions and 11 deletions

View File

@ -32,10 +32,6 @@ function this:InitComponent()
orginLayer = 0
this.loginPart = this.gameObject
local bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image")
local bgStr = PackageManager.GetLoginPanelBg()
bg.sprite = this.spLoader:LoadSprite(bgStr)
this.tip = Util.GetGameObject(this.loginPart, "tip/Text")
this.loginAnim = this.gameObject:GetComponent("Animator")
@ -63,15 +59,19 @@ function this:InitComponent()
this.versionText = Util.GetGameObject(this.loginPart, "version"):GetComponent("Text")
this.versionText.text = Language[11136]..LoginRoot_Version
-- 背景
local bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image")
this.bgStr = PackageManager.GetLoginPanelBg()
if this.bgStr then
bg.sprite = this.spLoader:LoadSprite(this.bgStr)
end
-- logo
this.logo = Util.GetGameObject(this.gameObject, "logo"):GetComponent("Image")
local logoStr = PackageManager.GetLoginPanelLogo()
if logoStr then
this.logoStr = PackageManager.GetLoginPanelLogo()
if this.logoStr then
this.logo.gameObject:SetActive(true)
this.logo.sprite = this.spLoader:LoadSprite(logoStr)
this.logo.sprite = this.spLoader:LoadSprite(this.logoStr)
this.logo:SetNativeSize()
-- 特效只有在特殊背景显示
Util.GetGameObject(this.btnLoginPart, "effect (1)"):SetActive(logoStr == "dl_ui_effect_bg")
else
this.logo.gameObject:SetActive(false)
end
@ -681,7 +681,7 @@ end
function this.SetLoginPart(flag)
this.loginAnim.enabled = flag
this.btnLoginPart:SetActive(flag)
this.btnLoginPart:SetActive(flag and tostring(this.bgStr) == "dl_ui_effect_bg")
this.btnLogin:SetActive(flag)
this.serverSelectPart:SetActive(flag)
end