diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index 19e0b25c59..74ed788058 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -104,7 +104,9 @@ function this.GetChapterLevelData(allChapterId,levelId) end end function this.SetCurChapterId(ChapterId) - curChapterId = ChapterId + if curChapterId < ChapterId then + curChapterId = ChapterId + end end function this.GetCurChapterId() return curChapterId @@ -117,7 +119,9 @@ function this.GetisShowChapterOpenPopup() return isShowChapterOpenPopup end function this.SetCurChapterLevelId(ChapterLevelId) - curChapterLevelId = ChapterLevelId + if curChapterLevelId < ChapterLevelId then + curChapterLevelId = ChapterLevelId + end end function this.GetCurChapterLevelId() return curChapterLevelId diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua index 893b517155..4efede4ca6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua @@ -12,7 +12,6 @@ this.timer = Timer.New() function this:InitComponent(gameObject) this.spLoader = SpriteLoader.New() this.backBtn=Util.GetGameObject(gameObject,"bg/backBtn") - this.backBtn:SetActive(true) this.Root=Util.GetGameObject(gameObject,"Root") this.proPre=Util.GetGameObject(gameObject,"proPre") this.shengxingIma=Util.GetGameObject(gameObject,"bg/shengxing"):GetComponent("Image") @@ -22,10 +21,6 @@ end function this:BindEvent() Util.AddClick(this.backBtn,function() parent:ClosePanel() - if this.timer then - this.timer:Stop() - this.timer = nil - end end) end @@ -105,6 +100,7 @@ function this:OnClose() this.timer:Stop() this.timer = nil end + parent:ClosePanel() end function this:OnDestroy()