local UISplash = UIViewClass() local EventSystem = require('Event/EventSystem') function UISplash:OnCreated() if GameAppInfo.IsChinesePackage() or GameAppInfo.IsJapanesePackage() then self.TotalSplashTime = 1.2 else self.TotalSplashTime = 0.2 end UIUtils.SetLabel(self.txt_Temp, AuxUtil.ReadStreamingAssetText('FontTextureSize.txt')) end ---等有闪屏需求再补充 function UISplash:OnOpened(context) self:StartRepeatFunc(self.OnUpdateFun, 0) self:SetSplashImage() if not GameAppInfo.IsJapanesePackage() then end end function UISplash:SetSplashImage() if GameAppInfo.IsChinesePackage() then UIUtils.SetActive(self.splash_image, true) UIUtils.SetLocalizationImage(self.splash_image, "GameHealthyTip.png") elseif GameAppInfo.IsJapanesePackage() then UIUtils.SetActive(self.splash_image, true) UIUtils.SetLocalizationImage(self.splash_image, "GameHealthyTip.png") self.splash_image:SetNativeSize() else UIUtils.SetActive(self.splash_image, false) end end function UISplash:OnUpdateFun(deltaTime, timeSinceUpdate) if timeSinceUpdate >= self.TotalSplashTime then self:StopRepeatFunc(self.OnUpdateFun) CTL.Login.Start() self:CloseView() end end return UISplash