diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/QianKunBox.lua b/Assets/ManagedResources/~Lua/Modules/Operating/QianKunBox.lua index da36afcc1e..c3032ac947 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/QianKunBox.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/QianKunBox.lua @@ -60,6 +60,7 @@ function QianKunBox:InitComponent(gameObject) self.shop = Util.GetGameObject(gameObject,"shop") self.shopBack = Util.GetGameObject(self.shop,"shopBack/btnBack") self.content = Util.GetGameObject(self.shop,"content") + self.livename=nil self.live = Util.GetGameObject(self.shop,"live") end @@ -71,17 +72,20 @@ function QianKunBox:BindEvent() ActivityDetail.new(self.detail,2) end) Util.AddClick(self.btnStore,function() - -- Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnCurrencyChange,PanelType.QianKunStore) self.shop:SetActive(true) self.btnBack:SetActive(false) self.tabList:SetActive(false) self.bottomBar:SetActive(false) + self.livename = "live2d_ui_h_52_xx_pf1" + self.liveNode = poolManager:LoadLive(self.livename, self.live.transform, Vector3.New(0.25,0.25,0.25), Vector3.New(123,214,0)) end) Util.AddClick(self.shopBack,function() self.shop:SetActive(false) self.btnBack:SetActive(true) self.tabList:SetActive(true) self.bottomBar:SetActive(true) + poolManager:UnLoadLive(self.livename, self.liveNode) + self.livename = nil end) end @@ -199,7 +203,7 @@ function QianKunBox:storeShow() self.shopView = SubUIManager.Open(SubUIConfig.ShopView, self.content.transform) end self.shopView:ShowShop(SHOP_TYPE.QIANKUNBOX_SHOP,orginLayer) - self.live = poolManager:LoadLive("live2d_ui_h_52_xx_pf1", self.live.transform, Vector3.New(0.25,0.25,0.25), Vector3.New(123,214,0)) + end --时间 @@ -235,14 +239,10 @@ function QianKunBox:OnHide() self.timer:Stop() self.timer = nil end -end - -function QianKunBox:OnDestroy() if self.shopView then self.shopView = SubUIManager.Close(self.shopView) self.shopView = nil end - poolManager:UnLoadLive("live2d_ui_h_52_xx_pf1", self.live) end return QianKunBox \ No newline at end of file diff --git a/data_execl/base_data/TreasureTaskConfig.xlsx b/data_execl/base_data/TreasureTaskConfig.xlsx index 4bae4dd76c..d6079eee91 100644 Binary files a/data_execl/base_data/TreasureTaskConfig.xlsx and b/data_execl/base_data/TreasureTaskConfig.xlsx differ