Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
DESKTOP-98AVA47\Administrator 2021-07-16 14:46:31 +08:00
commit 6aeea9a736
1 changed files with 26 additions and 19 deletions

View File

@ -96,9 +96,17 @@ end
function PackageManager.SetVideo(obj, bg) function PackageManager.SetVideo(obj, bg)
obj:SetActive(false) obj:SetActive(false)
if this.config then
if this.config.VideoName then
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then
if this.StreamConfig and this.StreamConfig.LoginPanelVideoBG and this.StreamConfig.LoginPanelVideoBG ~= "" then
Log("加载Stream视频"..tostring(this.StreamConfig.LoginPanelVideoBG))
if UIManager.IsOpen(UIName.LoginPanel) then
local video = obj:GetComponent("VideoPlayer")
video.url = "file://" .. UnityEngine.Application.streamingAssetsPath .."/Res/"..tostring(this.StreamConfig.LoginPanelVideoBG)..".mp4"
video:Play()
bg:DOFade(0, 2)
obj:SetActive(true)
end
elseif this.config and this.config.VideoName and this.config.VideoName ~= "" then
Log("加载视频:"..tostring(this.config.VideoName)) Log("加载视频:"..tostring(this.config.VideoName))
resMgr:PreLoadAssetAsync(this.config.VideoName, function(isOk) resMgr:PreLoadAssetAsync(this.config.VideoName, function(isOk)
if isOk then if isOk then
@ -115,7 +123,6 @@ function PackageManager.SetVideo(obj, bg)
Log("视频加载失败:"..this.config.VideoName) Log("视频加载失败:"..this.config.VideoName)
end end
end) end)
end
else else
Log("包名:"..tostring(this.config.PackageName).."登录视频为空!") Log("包名:"..tostring(this.config.PackageName).."登录视频为空!")
end end