DESKTOP-MMO982B\User 2026-03-04 12:57:07 +08:00
parent 822de675fe
commit d15f0bc0ca
3 changed files with 27 additions and 13 deletions

View File

@ -23,16 +23,18 @@ function BasePanel:CreateUI(gameObject)
end
)
end
MyPCall(
function()
self:InitComponent()
end
)
MyPCall(
function()
--MyPCall(
--function()
--self:InitComponent()
--end
--)
self:BindEvent()
end
)
--MyPCall(
--function()
--self:BindEvent()
--end
--)
end
--设置渲染层级

View File

@ -96,7 +96,7 @@ function this:InitComponent()
this.battleSceneLogicGameObject, this.battleSceneGameObject = BattleManager.CreateBattleScene(nil)
chatPanel:InitComponent(Util.GetGameObject(self.gameObject, "ChatPanel"), this)
BattleView:InitComponent(self, this.battleSceneLogicGameObject, this.battleSceneGameObject)
LogError("gggggggggggggggggggggggggggggg")
this.spLoader = SpriteLoader.New()
--BattleView:InitComponent(self, self.gameObject)
@ -1046,7 +1046,7 @@ end
function this:OnDestroy()
LogError("dddddddddddddddddddddddddddddd")
BattleView:OnDestroy()
--chatPanel:OnDestroy()
chatPanel:OnDestroy()
this.spLoader:Destroy()
--销毁战场
if this.battleSceneLogicGameObject ~= nil then

View File

@ -69,9 +69,9 @@ end
function this:BindEvent()
-- 关闭界面
Util.AddClick(this.btnBack, function()
UIManager.OpenPanel(UIName.ChatPanel, nil, 2)
end)
--Util.AddClick(this.btnBack, function()
--UIManager.OpenPanel(UIName.ChatPanel, nil, 2)
--end)
-- 发送消息
Util.AddClick(this.btnSend, function()
@ -157,6 +157,18 @@ end
function this:OnClose()
-- 关闭定时刷新数据
ChatManager.StopChatDataUpdate()
if this.FriendScrollView then
SubUIManager.Close(this.FriendScrollView)
this.FriendScrollView = nil
end
if this.ChatScrollView then
SubUIManager.Close(this.ChatScrollView)
this.ChatScrollView = nil
end
if this.SystemScrollView then
SubUIManager.Close(this.SystemScrollView)
this.SystemScrollView = nil
end
end
-- tab节点自定义设置