From 9ca48508415b4dcf52dfee1ab252691197e29d2f Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 30 Mar 2021 20:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=89=B9=E6=9D=83=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E5=B0=86=E7=95=8C=E9=9D=A2=E9=A1=B6=E9=83=A8=E7=9A=84?= =?UTF-8?q?=E7=89=B9=E6=9D=83=E7=AD=89=E7=BA=A7=E7=A7=BB=E5=9B=9E-?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=8D=A2=E5=A4=B4=E5=83=8F=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E7=AD=89=E4=B8=8D=E5=88=B7=E6=96=B0=EF=BC=8Cgm?= =?UTF-8?q?=E4=BB=85=E5=9C=A8=E4=B8=BB=E7=95=8C=E9=9D=A2=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/View/PlayerInfoView.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/View/PlayerInfoView.lua b/Assets/ManagedResources/~Lua/View/PlayerInfoView.lua index 1374fc604c..eb4cb72bf3 100644 --- a/Assets/ManagedResources/~Lua/View/PlayerInfoView.lua +++ b/Assets/ManagedResources/~Lua/View/PlayerInfoView.lua @@ -37,7 +37,7 @@ end function PlayerInfoView:BindEvent() --GM工具 Util.AddClick(self.headBox, function() - if AppConst.isOpenGM then + if AppConst.isOpenGM and UIManager.IsOpen(UIName.MainPanel) then UIManager.OpenPanel(UIName.GMPanel) else UIManager.OpenPanel(UIName.SettingPanel) @@ -54,6 +54,9 @@ end function PlayerInfoView:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.OnShow, self) Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, self.OnShow, self) + Game.GlobalEvent:AddEvent(GameEvent.Player.OnChangeName, self.OnShow, self) + Game.GlobalEvent:AddEvent(GameEvent.Player.OnHeadFrameChange, self.OnShow, self) + Game.GlobalEvent:AddEvent(GameEvent.Player.OnHeadChange, self.OnShow, self) Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, self.RefreshPower, self) -- 绑定红点 @@ -65,6 +68,9 @@ end function PlayerInfoView:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.OnShow, self) Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerLvChange, self.OnShow, self) + Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnChangeName, self.OnShow, self) + Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnHeadFrameChange, self.OnShow, self) + Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnHeadChange, self.OnShow, self) Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, self.RefreshPower, self) -- 解除绑定