From c067b888d3408f1b06303fc2bc8d83d70fc6486e Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 4 Jun 2021 14:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=99=BB=E5=BD=95=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E3=80=91=E5=A6=82=E6=9E=9C=E7=99=BB=E5=BD=95=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5=E4=B8=8D=E5=86=8D=E6=92=AD?= =?UTF-8?q?=E6=94=BE=EF=BC=8C=E6=88=98=E6=96=97=E8=BF=98=E5=8E=9Fboss?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E4=B8=8D=E8=83=BD=E8=B7=B3=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Framework/Manager/PackageManager.lua | 22 +++++++++++-------- .../~Lua/Modules/Battle/View/BattlePanel.lua | 6 ++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Framework/Manager/PackageManager.lua b/Assets/ManagedResources/~Lua/Framework/Manager/PackageManager.lua index 143b49572f..333c173157 100644 --- a/Assets/ManagedResources/~Lua/Framework/Manager/PackageManager.lua +++ b/Assets/ManagedResources/~Lua/Framework/Manager/PackageManager.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 2e563a7add..601fbe835a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -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, }