【登录视频】如果登录视频加载失败不再播放,战斗还原boss关卡不能跳过的功能
parent
6158f0916a
commit
c067b888d3
|
|
@ -64,15 +64,19 @@ function PackageManager.SetVideo(obj, bg)
|
|||
if this.config.VideoName then
|
||||
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then
|
||||
Log("加载视频:"..tostring(this.config.VideoName))
|
||||
resMgr:PreLoadAssetAsync(this.config.VideoName, function()
|
||||
if UIManager.IsOpen(UIName.LoginPanel) then
|
||||
local video = obj:GetComponent("VideoPlayer")
|
||||
-- video.url = ServerConfigManager.GetVersionInfo("resUrl") .. AppConst.PlatformPath .."/"..tostring(this.config.VideoName) ..".mp4"
|
||||
-- video.clip = resMgr:LoadAsset(this.config.VideoName)
|
||||
video.url = AppConst.PersistentDataPath .."/"..tostring(this.config.VideoName)
|
||||
video:Play()
|
||||
bg:DOFade(0, 2)
|
||||
obj:SetActive(true)
|
||||
resMgr:PreLoadAssetAsync(this.config.VideoName, function(isOk)
|
||||
if isOk then
|
||||
if UIManager.IsOpen(UIName.LoginPanel) then
|
||||
local video = obj:GetComponent("VideoPlayer")
|
||||
-- video.url = ServerConfigManager.GetVersionInfo("resUrl") .. AppConst.PlatformPath .."/"..tostring(this.config.VideoName) ..".mp4"
|
||||
-- video.clip = resMgr:LoadAsset(this.config.VideoName)
|
||||
video.url = AppConst.PersistentDataPath .."/"..tostring(this.config.VideoName)
|
||||
video:Play()
|
||||
bg:DOFade(0, 2)
|
||||
obj:SetActive(true)
|
||||
end
|
||||
else
|
||||
LogError("视频加载失败:"..this.config.VideoName)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ local UpdateBtnGMFunc = {
|
|||
if not BattleManager.IsUnlockBattlePass() then
|
||||
return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
|
||||
end
|
||||
-- if FightPointPassManager.GetCurOpenFightIdIsBoss() then
|
||||
-- return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
|
||||
-- end
|
||||
if FightPointPassManager.GetCurOpenFightIdIsBoss() then
|
||||
return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
|
||||
end
|
||||
return SKIP_STATE.UNLOCK
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue