【优化】LOADING背景图和TIPS应该多一些

dev_chengFeng
jiaoyangna 2021-01-22 16:29:19 +08:00
parent 4ec73a4a8d
commit 04511de9f5
1 changed files with 10 additions and 2 deletions

View File

@ -1,17 +1,25 @@
require("Base/BasePanel") require("Base/BasePanel")
LoadingPanel = Inherit(BasePanel) LoadingPanel = Inherit(BasePanel)
local this = LoadingPanel local this = LoadingPanel
local sprites = {"loding1"}
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function LoadingPanel:InitComponent() function LoadingPanel:InitComponent()
Log("LoadingPanel:InitComponent") Log("LoadingPanel:InitComponent")
this.Slider = Util.GetGameObject(self.gameObject, "Slider"):GetComponent("Slider") this.Slider = Util.GetGameObject(self.gameObject, "Slider"):GetComponent("Slider")
this.Tip = Util.GetGameObject(self.gameObject, "Slider/Image/LoadingText"):GetComponent("Text") this.Tip = Util.GetGameObject(self.gameObject, "Slider/Image/LoadingText"):GetComponent("Text")
this.SliderText = Util.GetGameObject(self.gameObject, "Slider/Fill Area/Fill/Image/Text"):GetComponent("Text") this.SliderText = Util.GetGameObject(self.gameObject, "Slider/Fill Area/Fill/Image/Text"):GetComponent("Text")
this.bg = Util.GetGameObject(self.gameObject, "bg1"):GetComponent("Image")
screenAdapte(Util.GetGameObject(self.gameObject, "bg1")) screenAdapte(Util.GetGameObject(self.gameObject, "bg1"))
screenAdapte(Util.GetGameObject(self.gameObject, "bg2")) screenAdapte(Util.GetGameObject(self.gameObject, "bg2"))
end end
function LoadingPanel:OnOpen()
local index = 0
math.randomseed(os.time())
index = math.random(1, #sprites)
this.bg.sprite = Util.LoadSprite(sprites[index])
end
local callList = {} local callList = {}
local curIndex = 0 local curIndex = 0
local lerp = 0 local lerp = 0