require("Base/BasePanel") ExplorePanel = Inherit(BasePanel) local this = ExplorePanel -- 小地图 local fightMap = require("Modules/Fight/View/ExploreMapView") --初始化组件(用于子类重写) function ExplorePanel:InitComponent() self.spLoader = SpriteLoader.New() self.upView = SubUIManager.Open(SubUIConfig.UpView,self.gameObject.transform) self.backBtn = Util.GetGameObject(self.gameObject, "btns/backBtn") self.lookReward = Util.GetGameObject(self.gameObject, "btns/lookReward") --fightMap:InitComponent(self.gameObject, this) end --绑定事件(用于子类重写 function ExplorePanel:BindEvent() Util.AddClick(self.backBtn,function() self:ClosePanel() end) Util.AddClick(self.lookReward,function() UIManager.OpenPanel(UIName.ExploreRewardPopup,self.mapData.mapId) end) end --添加事件监听(用于子类重 function ExplorePanel:AddListener() --fightMap:AddListener() end --移除事件监听(用于子类重写) function ExplorePanel:RemoveListener() --fightMap:RemoveListener() end --界面打开时调用(用于子类重写) function ExplorePanel:OnOpen(data) self.mapData = data end --界面打开或者重新打开后,界面刷新时调用(用于子类重写) function ExplorePanel:OnShow() --fightMap:Init() end --界面关闭时调用(用于子类重写) function ExplorePanel:OnClose() --fightMap:OnClose() end function ExplorePanel:OnSortingOrderChange() --fightMap:OnSortingOrderChange(self.sortingOrder) end --界面销毁时调用(用于子类重写) function ExplorePanel:OnDestroy() SubUIManager.Close(self.upView) self.upView = nil self.spLoader:Destroy() end return ExplorePanel