【优化】LOADING背景图和TIPS应该多一些
parent
4ec73a4a8d
commit
04511de9f5
|
@ -1,17 +1,25 @@
|
|||
require("Base/BasePanel")
|
||||
LoadingPanel = Inherit(BasePanel)
|
||||
local this = LoadingPanel
|
||||
local sprites = {"loding1"}
|
||||
--初始化组件(用于子类重写)
|
||||
function LoadingPanel:InitComponent()
|
||||
Log("LoadingPanel:InitComponent")
|
||||
this.Slider = Util.GetGameObject(self.gameObject, "Slider"):GetComponent("Slider")
|
||||
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.bg = Util.GetGameObject(self.gameObject, "bg1"):GetComponent("Image")
|
||||
screenAdapte(Util.GetGameObject(self.gameObject, "bg1"))
|
||||
screenAdapte(Util.GetGameObject(self.gameObject, "bg2"))
|
||||
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 curIndex = 0
|
||||
local lerp = 0
|
||||
|
@ -30,7 +38,7 @@ end
|
|||
function LoadingPanel.AddStep(func)
|
||||
table.insert(callList, func)
|
||||
maxIndex = maxIndex + 1
|
||||
end
|
||||
end
|
||||
|
||||
function LoadingPanel.OnStep()
|
||||
lerp = 0
|
||||
|
|
Loading…
Reference in New Issue