【周卡,月卡】====刷新修改

dev_chengFeng
wangzhenxing 2022-07-26 11:55:20 +08:00
parent cd4969d12c
commit 88bdd83937
1 changed files with 10 additions and 2 deletions

View File

@ -76,13 +76,21 @@ end
--添加事件监听(用于子类重写)
function MonthCardPage:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, self.BuySuccess)
Game.GlobalEvent:AddEvent(GameEvent.MonthCard.OnMonthCardUpdate, MonthCardPage.RefreshStoneShow)
Game.GlobalEvent:AddEvent(GameEvent.MonthCard.OnMonthCardUpdate, function()
MonthCardManager.RefreshMonthCardEnd()
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 1)
self:RefreshStoneShow()
end)
end
--移除事件监听(用于子类重写)
function MonthCardPage:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.MoneyPay.OnPayResultSuccess, self.BuySuccess)
Game.GlobalEvent:RemoveEvent(GameEvent.MonthCard.OnMonthCardUpdate, MonthCardPage.RefreshStoneShow)
Game.GlobalEvent:RemoveEvent(GameEvent.MonthCard.OnMonthCardUpdate, function()
MonthCardManager.RefreshMonthCardEnd()
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 1)
self:RefreshStoneShow()
end)
end
--界面打开时调用(用于子类重写)