miduo_client/Assets/ManagedResources/~Lua/Modules/Popup/SmallSoldierAutoPanel.lua

50 lines
1.2 KiB
Lua
Raw Normal View History

require("Base/BasePanel")
SmallSoldierAutoPanel = Inherit(BasePanel)
local this = SmallSoldierAutoPanel
--初始化组件(用于子类重写)
function SmallSoldierAutoPanel:InitComponent()
this.btnClose = Util.GetGameObject(self.gameObject, "btn_close")
2024-09-06 10:38:56 +08:00
this.tipTxt = Util.GetGameObject(self.gameObject, "tip"):GetComponent("Text")
this.tipTxt.text = Language[12250]
end
--绑定事件(用于子类重写)
function SmallSoldierAutoPanel:BindEvent()
2024-09-06 10:38:56 +08:00
Util.AddClick(this.btnClose, function()
SmallSoldierManager.isAuto = false
self:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function SmallSoldierAutoPanel:AddListener()
end
--移除事件监听(用于子类重写)
function SmallSoldierAutoPanel:RemoveListener()
end
function SmallSoldierAutoPanel:OnSortingOrderChange()
2024-09-06 10:38:56 +08:00
end
--界面打开时调用(用于子类重写)
2024-09-06 10:38:56 +08:00
function SmallSoldierAutoPanel:OnOpen(battlePanel, showRecord, backPanel, _fightType)
this:SetSortingOrder(6200)
end
--界面关闭时调用(用于子类重写)
function SmallSoldierAutoPanel:OnClose()
2024-09-06 10:38:56 +08:00
end
--界面销毁时调用(用于子类重写)
function SmallSoldierAutoPanel:OnDestroy()
end
2024-09-06 10:38:56 +08:00
return SmallSoldierAutoPanel