【轩辕宝镜】偶现跨0点报错

dev_chengFeng
gaoxin 2021-11-26 10:53:49 +08:00
parent 8c7d2e935e
commit 5557795658
1 changed files with 40 additions and 38 deletions

View File

@ -144,45 +144,47 @@ end
this.refreshShow = function()
local openFunctions = {}
for k,v in pairs(activityType) do
local go = Util.GetGameObject(this.AnimRoot, v.gameObject)
go:GetComponent("Image").sprite = this.spLoader:LoadSprite(v.bg)
local textParnet = Util.GetGameObject(go, "titileBg")
local textName = Util.GetGameObject(textParnet, "Text"):GetComponent("Text")
textName.text =v.name
SetTextVerTial(Util.GetGameObject(textParnet, "Text"),Vector3.New(295.93,-10.17,0),"MiddleRight")
if GetCurLanguage() == 2 then
textName.fontSize = 36
end
local state = XuanYuanMirrorManager.GetMirrorState(k) == 1
--LogGreen(k.." 宝镜state:"..XuanYuanMirrorManager.GetMirrorState(k))
if not state or state == 0 then
local timeStr = this:GetOpenTime(k)
Util.GetGameObject(go, "timeBg/Text"):GetComponent("Text").text = timeStr..Language[10310]
Util.GetGameObject(go, "redPoint").gameObject:SetActive(false)
else
openFunctions[k] = {}
openFunctions[k].timeComp = Util.GetGameObject(go, "timeBg/Text"):GetComponent("Text")
if XuanYuanMirrorManager.CarbonRedCheck() then
Util.GetGameObject(go, "redPoint").gameObject:SetActive(true)
else
Util.GetGameObject(go, "redPoint").gameObject:SetActive(false)
end
end
Util.SetGray(go,not state)
Util.AddOnceClick(go ,function()
if state then
LogBlue("宝镜状态:"..activityType[k].name..XuanYuanMirrorManager.GetMirrorState(k))
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,k)
else
LogBlue("宝镜未开启提示:"..activityType[k].name.."未开启!")
PopupTipPanel.ShowTip(activityType[k].name..Language[10338])
end
end)
for k,v in pairs(activityType) do
local go = Util.GetGameObject(this.AnimRoot, v.gameObject)
if go then
go:GetComponent("Image").sprite = this.spLoader:LoadSprite(v.bg)
local textParnet = Util.GetGameObject(go, "titileBg")
local textName = Util.GetGameObject(textParnet, "Text"):GetComponent("Text")
textName.text =v.name
SetTextVerTial(Util.GetGameObject(textParnet, "Text"),Vector3.New(295.93,-10.17,0),"MiddleRight")
if GetCurLanguage() == 2 then
textName.fontSize = 36
end
this:TimeCountDown(openFunctions)
this.remainTimes.text = XuanYuanMirrorManager.GetTimeTip()
local state = XuanYuanMirrorManager.GetMirrorState(k) == 1
--LogGreen(k.." 宝镜state:"..XuanYuanMirrorManager.GetMirrorState(k))
if not state or state == 0 then
local timeStr = this:GetOpenTime(k)
Util.GetGameObject(go, "timeBg/Text"):GetComponent("Text").text = timeStr..Language[10310]
Util.GetGameObject(go, "redPoint").gameObject:SetActive(false)
else
openFunctions[k] = {}
openFunctions[k].timeComp = Util.GetGameObject(go, "timeBg/Text"):GetComponent("Text")
if XuanYuanMirrorManager.CarbonRedCheck() then
Util.GetGameObject(go, "redPoint").gameObject:SetActive(true)
else
Util.GetGameObject(go, "redPoint").gameObject:SetActive(false)
end
end
Util.SetGray(go,not state)
Util.AddOnceClick(go ,function()
if state then
LogBlue("宝镜状态:"..activityType[k].name..XuanYuanMirrorManager.GetMirrorState(k))
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,k)
else
LogBlue("宝镜未开启提示:"..activityType[k].name.."未开启!")
PopupTipPanel.ShowTip(activityType[k].name..Language[10338])
end
end)
end
end
this:TimeCountDown(openFunctions)
this.remainTimes.text = XuanYuanMirrorManager.GetTimeTip()
end
this.UpdateCarbonContent = function(...)