天天送券提交
parent
4182b895dd
commit
4cb770f9cc
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d44045d87c9df504d84922841abdc1c4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1122,6 +1122,7 @@ RedPointType = {
|
|||
eastSeaFindGod3 = 98006,
|
||||
eastSeaFindGod4 = 98007,
|
||||
song10Wan=9503, --送10万真充
|
||||
tiantianXJQ=9504,--天天现金券
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -535,6 +535,7 @@ UIName = {
|
|||
RoleGodKingLayout=543, --英雄神王篇显示
|
||||
RoleGodKingUpLvPopup=544, --英雄神王篇升级界面
|
||||
RoleGodKingUpLvListPanel=545, --英雄神王升级列表界面
|
||||
GMTianTianXJQ=546, --天天放券
|
||||
}
|
||||
|
||||
SubUIConfig = {
|
||||
|
|
|
@ -271,6 +271,23 @@ function this.CheckHHBJRedPoint()
|
|||
return false
|
||||
end
|
||||
|
||||
|
||||
|
||||
--天天现金券红点
|
||||
function this.CheckDayDayXJQRedPoint()
|
||||
local activityData=ActivityGiftManager.GetActivityInfoByType(12701)
|
||||
if activityData and activityData.mission then
|
||||
for i = 1, #activityData.mission do
|
||||
if activityData.mission[i].state==0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
|
||||
--检测专武活动红点
|
||||
function this.CheckZWHDRedPoint()
|
||||
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
local GMTianTianXJQ = quick_class("GMTianTianXJQ", BasePanel)
|
||||
local actRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
||||
local kMaxReward = 5
|
||||
local index = 0
|
||||
|
||||
local cursortingOrder
|
||||
local isFirstOpen = false
|
||||
local missionId=0
|
||||
local state=0
|
||||
|
||||
function GMTianTianXJQ:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
cursortingOrder = 0
|
||||
self.backBtnNew = Util.GetGameObject(self.transform, "BG")
|
||||
self.backBtn = Util.GetGameObject(self.transform, "frame")
|
||||
self.title = Util.GetGameObject(self.backBtn, "bg/title"):GetComponent("Text")
|
||||
self.infoTxt=Util.GetGameObject(self.backBtn, "bg/title/Text"):GetComponent("Text")
|
||||
self.infoTxt.text="现金点券每日0点清空,请各位道友注意使用"
|
||||
|
||||
self.rewardContent = {}
|
||||
self.rewardContentEffect = {}
|
||||
self.rewardContentbg = {}
|
||||
self.rewardList = {}
|
||||
for i = 1, kMaxReward do
|
||||
self.rewardContent[i] = Util.GetGameObject(self.backBtn, "bg/rewardContent/itemPos_" .. i)
|
||||
self.rewardContentEffect[i] = Util.GetGameObject(self.rewardContent[i], "Kuang")
|
||||
self.rewardContentbg[i] = Util.GetGameObject(self.rewardContent[i], "Image")
|
||||
effectAdapte(self.rewardContentEffect[i])
|
||||
self.rewardList[i] = SubUIManager.Open(SubUIConfig.ItemView, self.rewardContent[i].transform)
|
||||
end
|
||||
|
||||
self.dealBtn = Util.GetGameObject(self.backBtn,"bg/dealBtn")
|
||||
self.dealText = Util.GetGameObject(self.dealBtn, "Text"):GetComponent("Text")
|
||||
self.dealText.text="领取"
|
||||
self.UI_effect_DailyRechargePanel_particle = Util.GetGameObject(self.transform, "frame/UI_effect_DailyRechargePanel_particle")
|
||||
|
||||
end
|
||||
|
||||
function GMTianTianXJQ:BindEvent()
|
||||
|
||||
Util.AddClick(self.backBtnNew, function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.dealBtn, function()
|
||||
NetManager.GetActivityRewardRequest(missionId,12701,function(_drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, _drop, 1)
|
||||
self:RefreshPanel()
|
||||
CheckRedPointStatus(RedPointType.tiantianXJQ)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
end
|
||||
local func=nil
|
||||
function GMTianTianXJQ:OnOpen(_func)
|
||||
func=_func
|
||||
--GMEspecially:SetSortingOrder(6300)
|
||||
self.UI_effect_DailyRechargePanel_particle:SetActive(true)
|
||||
end
|
||||
function GMTianTianXJQ:AddListener()
|
||||
end
|
||||
function GMTianTianXJQ:RemoveListener()
|
||||
end
|
||||
function GMTianTianXJQ:OnSortingOrderChange()
|
||||
Util.AddParticleSortLayer( self.UI_effect_DailyRechargePanel_particle, self.sortingOrder - cursortingOrder)
|
||||
for i = 1, #self.rewardContentEffect do
|
||||
Util.AddParticleSortLayer( self.rewardContentEffect[i], self.sortingOrder - cursortingOrder)
|
||||
end
|
||||
cursortingOrder = self.sortingOrder
|
||||
end
|
||||
function GMTianTianXJQ:OnShow()
|
||||
self.title.text = "每日现金点券放送"
|
||||
self:RefreshPanel()
|
||||
end
|
||||
|
||||
|
||||
function GMTianTianXJQ:OnClose()
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end
|
||||
|
||||
function GMTianTianXJQ:OnDestroy()
|
||||
self.spLoader:Destroy()
|
||||
end
|
||||
|
||||
|
||||
function GMTianTianXJQ:RefreshPanel()
|
||||
local info=ActivityGiftManager.GetActivityInfoByType(12701)
|
||||
if info and info.mission then
|
||||
for i = 1, #info.mission do
|
||||
missionId=info.mission[i].missionId
|
||||
state=info.mission[i].state
|
||||
end
|
||||
end
|
||||
Util.SetGray(self.dealBtn,state==1)
|
||||
table.walk(self.rewardList, function(rewardPosItem)
|
||||
rewardPosItem.gameObject:SetActive(false)
|
||||
end)
|
||||
table.walk(self.rewardContent, function(rewardPosItem)
|
||||
rewardPosItem.gameObject:SetActive(false)
|
||||
end)
|
||||
table.walk(self.rewardContentbg, function(rewardPosItem)
|
||||
rewardPosItem.gameObject:SetActive(false)
|
||||
end)
|
||||
local config=ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,21001)
|
||||
for i = 1, #config.Reward do
|
||||
if self.rewardContent[i] then
|
||||
self.rewardContent[i].gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
self.thread = coroutine.start(function()
|
||||
coroutine.wait(0.2)
|
||||
for i, rewardInfo in ipairs(config.Reward) do
|
||||
if self.rewardList[i] then
|
||||
self.rewardList[i]:OnOpen(false, rewardInfo, 1.1,true)
|
||||
self.rewardList[i]:ResetNameColor(Vector4.New(0.298,0.133,0.102,1))
|
||||
self.rewardList[i]:ResetBtnInteractable(false)
|
||||
self.rewardList[i].gameObject:SetActive(true)
|
||||
self.rewardContentbg[i].gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function GMTianTianXJQ:OnDealBtnClicked()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
return GMTianTianXJQ
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a552260102c382745b6408d24e44c614
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1321,6 +1321,8 @@ function this:TabBtnAction(id,actType,data)
|
|||
JumpManager.GoJump(40085)
|
||||
elseif id==126 then
|
||||
UIManager.OpenPanel(UIName.ZeroPointOnePanel)
|
||||
elseif id==127 then
|
||||
UIManager.OpenPanel(UIName.GMTianTianXJQ)
|
||||
end
|
||||
elseif actType == 2 then
|
||||
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
|
||||
|
|
|
@ -727,6 +727,7 @@ function this.RegisterRedCheckFunc()
|
|||
|
||||
RPData:AddCheckFunc(RedPointType.HelpFight,HelpFightManager.CheckRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.TaSuiLingXiao,ActivityGiftManager.CheckTaSuiLingXiaoRed)
|
||||
RPData:AddCheckFunc(RedPointType.tiantianXJQ,ActivityGiftManager.CheckDayDayXJQRedPoint)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
Loading…
Reference in New Issue