From d9e1951a83b759f861f5807116bdce076c007739 Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1545929779@qq.com> Date: Sat, 20 Apr 2024 18:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E5=85=85=E5=BC=95=E5=AF=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Fight/FightEndLvUpPanel.lua | 2 +- .../Modules/Fight/FightPointPassMainPanel.lua | 61 ++++++++++++------- .../~Lua/Modules/Guide/GuideManager.lua | 34 ++++++++--- .../~Lua/Modules/Guide/GuidePanel.lua | 2 +- .../~Lua/Modules/Main/GMPanel.lua | 2 +- .../~Lua/Modules/Main/MainPanel.lua | 15 ++++- 6 files changed, 79 insertions(+), 37 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightEndLvUpPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightEndLvUpPanel.lua index 52418b9c21..035e30133f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightEndLvUpPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightEndLvUpPanel.lua @@ -74,7 +74,7 @@ function FightEndLvUpPanel:OnOpen(...) oldLevel=data[1] curLevel=data[2] callBack = data[3] - Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange) + --Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange) -- Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.UpgradePac) this.ShowPanelData() SubmitExtraData({type = SDKSubMitType.TYPE_LEVEL_UP}) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index cb7c9a0fd4..4cc5067d74 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -655,6 +655,8 @@ local battleTime=0 local bossHp=0 local curAttack=0 local allAttacck=0 +local timer2=nil +local timer1=nil function this.BattleLogic() if this.battleTimer then this.battleTimer:Stop() @@ -700,8 +702,8 @@ function this.BattleLogic() if this.heroList[i].spine then this.heroList[i].effect.transform.position =this.heroList[i].pos.transform.position local seed= math.random(0,100)/100 - local timer1 = Timer.New(function() - if this.heroList[i].spine and this.heroList[i].effect then + timer1 = Timer.New(function() + if this.heroList[i] and this.heroList[i].spine and this.heroList[i].effect then this.heroList[i].spine.AnimationState:SetAnimation(0, "touch", true) Util.ClearTrailRender(this.heroList[i].effect) this.heroList[i].effect:SetActive(true) @@ -745,22 +747,25 @@ function this.BattleLogic() aaa.effect.transform.position =aaa.pos.transform.position --aaa.spine.AnimationState:SetAnimation(0, "touch", true) local seed1 = math.random(0,100)/100 - local timer2=Timer.New(function() + timer2=Timer.New(function() if aaa.effect and aaa.spineAni then Util.ClearTrailRender(aaa.effect) - aaa.effect:SetActive(true) - aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false) - aaa.effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function () - if aaa.effect then - aaa.effect:SetActive(false) - end - local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5) - bossHp=bossHp-attack - allAttacck=allAttacck+attack - this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack) - aaa.spineAni.AnimationState:SetAnimation(0, "move3",true) - this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) - end) + if aaa.effect and aaa.spineAni then + aaa.effect:SetActive(true) + aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false) + aaa.effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function () + if aaa.effect then + aaa.effect:SetActive(false) + end + local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5) + bossHp=bossHp-attack + allAttacck=allAttacck+attack + this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack) + aaa.spineAni.AnimationState:SetAnimation(0, "move3",true) + this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber) + end) + end + end end,seed1, 1, true) @@ -1461,7 +1466,20 @@ function FightPointPassMainPanel:OnClose() -- fightMap:OnClose() -- hasMap = false -- end - + if this.battleTimer then + this.battleTimer:Stop() + LogError("停止战斗---------------------------------") + + this.battleTimer=nil + end + if timer1 then + timer1:Stop() + end + if timer2 then + timer2:Stop() + end + timer1=nil + timer2=nil if this.animTimer then this.animTimer:Stop() end @@ -1494,9 +1512,11 @@ end --界面销毁时调用(用于子类重写) function FightPointPassMainPanel:OnDestroy() + orginLayer=0 invadeMonster:OnDestroy() this.spLoader:Destroy() + -- poolManager:UnLoadAsset("GuideEffect", this.GuideEffectGo, PoolManager.AssetType.GameObject) -- poolManager:UnLoadAsset("GuideEffect", this.GuideJumpEffectGo, PoolManager.AssetType.GameObject) poolManager:UnLoadLive(fightAnimRes, this.animGo, PoolManager.AssetType.GameObject) @@ -1529,12 +1549,7 @@ function FightPointPassMainPanel:OnDestroy() soliderPreList={} this.bossLiveGO=nil this.bossLiveName=nil - if this.battleTimer then - this.battleTimer:Stop() - LogError("停止战斗---------------------------------") - - this.battleTimer=nil - end + this.Floater:Dispose() this.Floater=nil diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index d772ae338f..1cb807f2db 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -16,7 +16,8 @@ local _FuncGuideList = {} --初始化 function this.Initialize() Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.OnFunctionOpen) - Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange) + --Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange) + Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, this.OnLevelChange) Game.GlobalEvent:AddEvent(GameEvent.Practice.PracticeGuide,this.PracticeGuideFun) Game.GlobalEvent:AddEvent(GameEvent.EndLess.GuidePanel,this.EndlessGuideFun) Game.GlobalEvent:AddEvent(GameEvent.Mission.OnPassFight,this.OnFightPass) @@ -58,19 +59,30 @@ end function this.OnLevelChange() -- 提审服不再出发相关引导 - if SERVER_VERSION == 1 then - return - end + LogError("1111111111111111111111111122222222222222等级辩护引导1111111111111 "..PlayerManager.level) + -- if SERVER_VERSION == 1 then + -- LogError("1111111111111111111111111122222222222222首充加入引导1111111111111") + -- return + -- end -- 首充引导特殊处理到十级开放 if PlayerManager.level == 10 then - table.insert(_FuncGuideList, 100200) - --解开孙悟空封印的剧情 - --StoryMapManager.isShowStory = 1 + LogError(" 首充加入引导") + --if CheckListIsContainValue1(_FuncGuideList,100200)==false then + --table.insert(_FuncGuideList, 100200) + if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then + GuideManager.ShowGuide(100200) + end + + --end this.CheckFuncGuide() + --解开孙悟空封印的剧情 + -- StoryMapManager.isShowStory = 1 elseif PlayerManager.level == 15 then - StoryMapManager.isShowStory = 3 + --StoryMapManager.isShowStory = 3 elseif CheckFunctionOpen(FUNCTION_OPEN_TYPE.hunyin) then--魂印功能 引导商店魂印页签 - table.insert(_FuncGuideList, 101700) + if CheckListIsContainValue1(_FuncGuideList,101700)==false then + table.insert(_FuncGuideList, 101700) + end this.CheckFuncGuide() elseif CheckFunctionOpen(FUNCTION_OPEN_TYPE.GodPrint) then -- body @@ -128,7 +140,7 @@ function this.OnFightPass(fightId) if not guideId or guideId == 0 then return end - if funcDic[guideId] then + if funcDic and funcDic[guideId] then -- funcDic[guideId] = nil return end @@ -222,10 +234,12 @@ end -- 检测功能引导 function GuideManager.CheckFuncGuide() + LogError("GuideManager.IsInMainGuide()=="..tostring(GuideManager.IsInMainGuide()).." "..tostring(_IsFuncGuild).." #_FuncGuideList=="..#_FuncGuideList) PlayerPrefs.SetInt(PlayerManager.uid.."MainRightBarSetting",1)--引导开始关闭右侧伸缩条 if not GuideManager.IsInMainGuide() and not _IsFuncGuild and #_FuncGuideList > 0 then local guideId = _FuncGuideList[1] if not funcDic[guideId] then + LogError("guideId======================================="..guideId) this.SyncFuncGuideServer(guideId) GuideManager.ShowGuide(guideId) end diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index 2b86ac0745..b3803d893d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -662,7 +662,7 @@ function this:OnOpen(id, func, ...) LogError("id========================"..id) if id==1 then --疯体屏蔽创角奖励界面 - UIManager.OpenPanel(UIName.GMEspecially) + --UIManager.OpenPanel(UIName.GMEspecially) end this.gameObject:GetComponent("Image").raycastTarget = true local delay = GuideConfig[id].DelayShow diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index ca42b27085..4e736f308c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -170,7 +170,7 @@ function GMPanel.LVPlayer(lv) NetManager.GMEvent(string.format("7#%s#0",lv)) local cor = coroutine.start(function() coroutine.wait(1) - Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange) + --Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange) --LogGreen("升级了") end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 7145aacacb..c2c2b3dd8c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1171,7 +1171,20 @@ end function this:TabBtnAction(id,actType,data) if actType == 1 then if id == ActivityTypeDef.FirstRecharge then - UIManager.OpenPanel(UIName.FirstRechargePanel) + if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then + local isOpen=CheckFunctionOpen(153) + if isOpen then + UIManager.OpenPanel(UIName.GMEspecially,function() + UIManager.OpenPanel(UIName.FirstRechargePanel) + PlayerPrefs.SetInt(PlayerManager.uid.."isGMEsp",1) + end) + else + UIManager.OpenPanel(UIName.FirstRechargePanel) + end + + else + UIManager.OpenPanel(UIName.FirstRechargePanel) + end elseif id == ActivityTypeDef.SevenDayCarnival then UIManager.OpenPanel(UIName.SevenDayCarnivalPanelV2,SevenDayCarnivalManager.GetPriorityDayNumber()) elseif id == ActivityTypeDef.WarPowerSort then