【福星高照】增加拍脸

dev_chengFeng
ZhangBiao 2021-03-30 20:20:12 +08:00
parent d61c55d24d
commit 9ed1f4f8c2
2 changed files with 12 additions and 12 deletions

View File

@ -5,6 +5,7 @@ local sortingOrder = 0
local rewardList = {}
local itemPreList={} --item预设容器
local data
local func
local timeData = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
--初始化组件(用于子类重写)
@ -20,7 +21,6 @@ function FuXingGaoZhao:InitComponent()
table.insert(rewardList,self.mid.transform:GetChild(i-1))
end
end
self.gift = ConfigManager.GetConfigDataByKey(ConfigName.StoreConfig,"Id",11001)
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft})
end
--绑定事件(用于子类重写)
@ -33,13 +33,13 @@ function FuXingGaoZhao:BindEvent()
Util.AddClick(self.getBtn,function ()
if data.ActState == 0 then
local configData = ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",110).Value
local string = string.split(configData,"#")
local costId, costNum = tonumber(string[1]),tonumber(string[2])
local strings = string.split(configData,"#")
local costId, costNum = tonumber(strings[1]),tonumber(strings[2])
if costNum > BagManager.GetTotalItemNum(costId) then
JumpManager.GoJump(36003)
else
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
MsgPanel.ShowTwo(string.format( "是否花费%s%s进行储值",costNum,GetLanguageStrById(itemName)), nil, function()
MsgPanel.ShowTwo(string.format("是否花费%s%s进行储值",costNum,itemName), nil, function()
NetManager.FuXingStoreBuyRequest(data.activityId,function ()
PopupTipPanel.ShowTip("您已成功进行储值!")
FuXingGaoZhao:Refresh()
@ -67,15 +67,11 @@ end
function FuXingGaoZhao:OnSortingOrderChange()
Util.AddParticleSortLayer(self.effect, self.sortingOrder - sortingOrder)
sortingOrder = self.sortingOrder
-- if(#itemPreList ~= 0)then
-- for i=1,#itemPreList do
-- itemPreList[i]:SetEffectLayer(self.sortingOrder)
-- end
-- end
end
--界面打开时调用(用于子类重写)
function FuXingGaoZhao:OnOpen()
function FuXingGaoZhao:OnOpen(_func)
func = _func
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
end
@ -154,7 +150,11 @@ function FuXingGaoZhao:OnClose()
if self.timer then
self.timer:Stop()
self.timer = nil
end
end
if func then
func()
func = nil
end
end
--界面销毁时调用(用于子类重写)

View File

@ -4891,7 +4891,7 @@ function this.FuXingStoreBuyRequest(activityId,func)
local data = ActivityProto_pb.FuXingStoreBuyRequest()
data.activityId = activityId
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.FU_XING_STORE_BUY_REQUEST, MessageTypeProto_pb.FU_XING_STORE_BUY_RESPONSE, nil, function(buffer)
Network:SendMessageWithCallBack(MessageTypeProto_pb.FU_XING_STORE_BUY_REQUEST, MessageTypeProto_pb.FU_XING_STORE_BUY_RESPONSE, msg, function(buffer)
if func then
func()
end