【bug】修复报错

dev_chengFeng
gaoxin 2021-05-27 20:24:33 +08:00
parent 916a777f59
commit d0b8f8db8e
3 changed files with 12 additions and 14 deletions

View File

@ -39,7 +39,7 @@ function SpriteLoader:UnLoadSprite()
end end
SpriteLoaderPool[self.id] = SpriteLoaderPool[self.id] + 1 SpriteLoaderPool[self.id] = SpriteLoaderPool[self.id] + 1
if SpriteLoaderPool[self.id] > 1 then if SpriteLoaderPool[self.id] > 1 then
LogError("SpriteLoader Repeat UnLoad : ".. self.id..", count : "..SpriteLoaderPool[self.id]) --LogError("SpriteLoader Repeat UnLoad : ".. self.id..", count : "..SpriteLoaderPool[self.id])
end end
for name, count in pairs(self.SpriteList) do for name, count in pairs(self.SpriteList) do
-- if name == "shadow_4" then -- if name == "shadow_4" then

View File

@ -12,22 +12,18 @@ end
--添加事件监听(用于子类重写) --添加事件监听(用于子类重写)
function CommonActPage:AddListener() function CommonActPage:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, function() Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.EventRefreshData, self)
self:RefreshData(true,false,false) Game.GlobalEvent:AddEvent(GameEvent.DynamicTask.OnMissionChange, self.EventRefreshData, self)
end,self)
Game.GlobalEvent:AddEvent(GameEvent.DynamicTask.OnMissionChange, function()
self:RefreshData(true,false,false)
end,self)
end end
--移除事件监听(用于子类重写) --移除事件监听(用于子类重写)
function CommonActPage:RemoveListener() function CommonActPage:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, function() Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.EventRefreshData, self)
self:RefreshData(true,false,false) Game.GlobalEvent:RemoveEvent(GameEvent.DynamicTask.OnMissionChange, self.EventRefreshData,self)
end,self) end
Game.GlobalEvent:RemoveEvent(GameEvent.DynamicTask.OnMissionChange, function()
self:RefreshData(true,false,false) function CommonActPage:EventRefreshData()
end,self) self:RefreshData(true,false,false)
end end
function CommonActPage:InitComponent() function CommonActPage:InitComponent()

View File

@ -568,7 +568,9 @@ function SingleFightPlayerView:SetIconShow(_eventpoint)
self.eventPointPos:ShowDialogue(false) self.eventPointPos:ShowDialogue(false)
self.eventPointPos:SetDialogueStr(strList1[num]) self.eventPointPos:SetDialogueStr(strList1[num])
Timer.New(function() Timer.New(function()
self.dialogueRoot.gameObject:SetActive(false) if self.dialogueRoot then
self.dialogueRoot.gameObject:SetActive(false)
end
if self.state == 1 then if self.state == 1 then
self.eventPointPos:ShowDialogue(true) self.eventPointPos:ShowDialogue(true)
self:NotBattleShow() self:NotBattleShow()