parent
6391c6ea97
commit
7e62f47ca8
|
@ -154,6 +154,80 @@ MonoBehaviour:
|
|||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
--- !u!1 &902109664729184121
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1998110613615297096}
|
||||
- component: {fileID: 7578140580301704726}
|
||||
- component: {fileID: 5483022450691139606}
|
||||
m_Layer: 5
|
||||
m_Name: red
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1998110613615297096
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 902109664729184121}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 311860523735992108}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -15.404999, y: -15.475}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7578140580301704726
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 902109664729184121}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5483022450691139606
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 902109664729184121}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &1391152455146847042
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -814,6 +888,7 @@ RectTransform:
|
|||
- {fileID: 1052084151771884818}
|
||||
- {fileID: 7944016472393893859}
|
||||
- {fileID: 3435773343199518887}
|
||||
- {fileID: 1937467392759674615}
|
||||
m_Father: {fileID: 5560347858770598648}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -911,6 +986,80 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
--- !u!1 &3694849207738348854
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1937467392759674615}
|
||||
- component: {fileID: 1979780772852713283}
|
||||
- component: {fileID: 2578863368631290898}
|
||||
m_Layer: 5
|
||||
m_Name: red
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1937467392759674615
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3694849207738348854}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2545290923758964436}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -15, y: -28.642}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1979780772852713283
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3694849207738348854}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2578863368631290898
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3694849207738348854}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3735146837288898138
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1747,6 +1896,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8788889948934153483}
|
||||
- {fileID: 1998110613615297096}
|
||||
m_Father: {fileID: 4957794194947264391}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
@ -1041,6 +1041,8 @@ RedPointType = {
|
|||
|
||||
ExploreFunc = 12301,
|
||||
chaozhifanli = 90001,
|
||||
chaozhifanli6 = 90002,
|
||||
chaozhifanli30 = 90003,
|
||||
|
||||
--家园红点
|
||||
HomeLand = 700,--主城家园红点
|
||||
|
|
|
@ -140,7 +140,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
this.mission[v.activityId] = v
|
||||
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
for n, m in ipairs(v.mission) do
|
||||
-- LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||
-- LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
||||
this.onlineOpen = true
|
||||
this.onlineGetRewardState[m.missionId] = m.state
|
||||
|
@ -589,6 +589,8 @@ function this.RefreshActivityRedPoint()
|
|||
CheckRedPointStatus(RedPointType.recruitTreasure_three)
|
||||
CheckRedPointStatus(RedPointType.yunmenghaoli)
|
||||
CheckRedPointStatus(RedPointType.FestevalRed)
|
||||
CheckRedPointStatus(RedPointType.chaozhifanli6)
|
||||
CheckRedPointStatus(RedPointType.chaozhifanli30)
|
||||
end
|
||||
|
||||
function this.GetContinuityRechargeRedPoint()
|
||||
|
|
|
@ -7,10 +7,11 @@ local artResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig
|
|||
local activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local BTNS = {
|
||||
[1] = {bg1 = "b_baibao_andi",bg2 = "b_baibao_liangdi",text1 = "c_czfl_6yuan",text2 = "c_czfl_6yuan2",showType = 48,actType = ActivityTypeDef.chaozhifanli,goodsType = GoodsTypeDef.chaozhifanli},
|
||||
[2] = {bg1 = "b_baibao_andi",bg2 = "b_baibao_liangdi",text1 = "c_czfl_30yuan",text2 = "c_czfl_30yuan2",showType = 49,actType = ActivityTypeDef.chaozhifanli30,goodsType = GoodsTypeDef.chaozhifanli},
|
||||
[1] = {bg1 = "b_baibao_andi",bg2 = "b_baibao_liangdi",text1 = "c_czfl_6yuan",text2 = "c_czfl_6yuan2",showType = 48,actType = ActivityTypeDef.chaozhifanli,goodsType = GoodsTypeDef.chaozhifanli,redpoint= RedPointType.chaozhifanli6},
|
||||
[2] = {bg1 = "b_baibao_andi",bg2 = "b_baibao_liangdi",text1 = "c_czfl_30yuan",text2 = "c_czfl_30yuan2",showType = 49,actType = ActivityTypeDef.chaozhifanli30,goodsType = GoodsTypeDef.chaozhifanli,redpoint= RedPointType.chaozhifanli30},
|
||||
}
|
||||
local curPage = 1
|
||||
local redList = {}
|
||||
function PremiumRebatePanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
this.backBtn = Util.GetGameObject(self.gameObject, "closeBtn")
|
||||
|
@ -46,6 +47,7 @@ end
|
|||
function this.PageTabAdapter(tab, index, status)
|
||||
local select = Util.GetGameObject(tab, "select")
|
||||
local title = Util.GetGameObject(tab, "title"):GetComponent("Image")
|
||||
local red = Util.GetGameObject(tab, "red")
|
||||
if status == "select" then
|
||||
select.gameObject:SetActive(true)
|
||||
title.sprite = this.spLoader:LoadSprite(BTNS[index].text1)
|
||||
|
@ -53,6 +55,8 @@ function this.PageTabAdapter(tab, index, status)
|
|||
select.gameObject:SetActive(false)
|
||||
title.sprite = this.spLoader:LoadSprite(BTNS[index].text2)
|
||||
end
|
||||
BindRedPointObject(BTNS[index].redpoint,red)
|
||||
redList[BTNS[index].redpoint] = red
|
||||
end
|
||||
|
||||
function this.PageTabIsLockCheck()
|
||||
|
@ -94,7 +98,7 @@ end
|
|||
function PremiumRebatePanel:Refresh(isTop,isAni)
|
||||
--value 累计充值天数 昨天 ,,
|
||||
this.actData = ActivityGiftManager.GetActivityTypeInfo(BTNS[curPage].actType)
|
||||
this.giftData = DynamicActivityManager.GetGiftDataByType({{DataType.Direct,BTNS[curPage].goodsType,BTNS[curPage].showType}})
|
||||
--this.giftData = DynamicActivityManager.GetGiftDataByType({{DataType.Direct,BTNS[curPage].goodsType,BTNS[curPage].showType}})
|
||||
this.actConfigData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",this.actData.activityId)
|
||||
local missionConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityRewardConfig,"ActivityId",this.actData.activityId,"Sort",this.actData.value + 1)
|
||||
local missionData = ActivityGiftManager.GetActivityInfo(this.actData.activityId,missionConfig.Id)
|
||||
|
@ -110,8 +114,8 @@ end
|
|||
|
||||
function PremiumRebatePanel:SetRewardShow(isTop,isAni)
|
||||
-- 显示
|
||||
this.scrollView:SetData(this.giftData, function (index, item)
|
||||
this:ShowSingleHero(item, this.giftData[index],index)
|
||||
this.scrollView:SetData(this.actData.mission, function (index, item)
|
||||
this:ShowSingleHero(item, this.actData.mission[index],index)
|
||||
end,not isTop,not isAni)
|
||||
this.scrollView:SetIndex(this.actData.value + 1)
|
||||
end
|
||||
|
@ -122,7 +126,8 @@ function PremiumRebatePanel:ShowSingleHero(go,_data,index)
|
|||
local btnGet = Util.GetGameObject(go, "btnGet")
|
||||
local btnText = Util.GetGameObject(go, "btnGet/Text"):GetComponent("Text")
|
||||
local btnImg = Util.GetGameObject(go, "btnGet"):GetComponent("Image")
|
||||
local missionConfigData = this.actConfigData[index]
|
||||
local red = Util.GetGameObject(btnImg.gameObject, "red")
|
||||
local missionConfigData = activityRewardConfig[_data.missionId]
|
||||
if missionConfigData then
|
||||
go.gameObject:SetActive(true)
|
||||
else
|
||||
|
@ -136,31 +141,46 @@ function PremiumRebatePanel:ShowSingleHero(go,_data,index)
|
|||
for k,v in ipairs(this.itemViewList[go]) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1, #_data.data.shows do
|
||||
for i = 1, #missionConfigData.Reward do
|
||||
if not this.itemViewList[go][i] then
|
||||
this.itemViewList[go][i] = SubUIManager.Open(SubUIConfig.ItemView,grid.transform)
|
||||
this.itemViewList[go][i].gameObject:SetActive(false)
|
||||
end
|
||||
this.itemViewList[go][i]:OnOpen(false, {_data.data.shows[i][1],_data.data.shows[i][2],_data.data.shows[i][3]}, 0.65,false,false,false,this.sortingOrder)
|
||||
this.itemViewList[go][i]:OnOpen(false, {missionConfigData.Reward[i][1],missionConfigData.Reward[i][2],missionConfigData.Reward[i][3]}, 0.65,false,false,false,this.sortingOrder)
|
||||
this.itemViewList[go][i].gameObject:SetActive(true)
|
||||
end
|
||||
btnText.gameObject:SetActive(true)
|
||||
btnText.text = _data.data.price
|
||||
local missionData = ActivityGiftManager.GetActivityInfo(this.actData.activityId,missionConfigData.Id)
|
||||
if missionData.state == 0 and index == this.actData.value + 1 then
|
||||
red.gameObject:SetActive(false)
|
||||
btnText.text = "前往"--_data.data.price
|
||||
if _data.state == 0 and index == this.actData.value + 1 then
|
||||
Util.SetGray(btnGet,false)
|
||||
Util.AddOnceClick(btnGet,function ()
|
||||
PayManager.Pay(_data.data.shopData.goodsId, function(id)
|
||||
FirstRechargeManager.RefreshAccumRechargeValue(_data.data.shopData.goodsId)
|
||||
OperatingManager.SetHadBuyGoodsId({_data.data.shopData.goodsId})
|
||||
ActivityGiftManager.SetActivityInfo(this.actData.activityId, missionData.missionId, 1)
|
||||
missionData.state = 1
|
||||
self:ShowSingleHero(go,_data,index)
|
||||
if _data.progress >= missionConfigData.Values[1][1] then
|
||||
red.gameObject:SetActive(true)
|
||||
Util.AddOnceClick(btnGet,function ()
|
||||
-- PayManager.Pay(_data.data.shopData.goodsId, function(id)
|
||||
-- FirstRechargeManager.RefreshAccumRechargeValue(_data.data.shopData.goodsId)
|
||||
-- OperatingManager.SetHadBuyGoodsId({_data.data.shopData.goodsId})
|
||||
-- ActivityGiftManager.SetActivityInfo(this.actData.activityId, _data.missionId, 1)
|
||||
-- _data.state = 1
|
||||
-- self:ShowSingleHero(go,_data,index)
|
||||
-- end)
|
||||
NetManager.GetActivityRewardRequest(_data.missionId, this.actData.activityId, function(_drop)
|
||||
ActivityGiftManager.SetActivityInfo(this.actData.activityId, _data.missionId, 1)
|
||||
_data.state = 1
|
||||
self:ShowSingleHero(go,_data,index)
|
||||
CheckRedPointStatus(BTNS[curPage].redpoint)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, _drop, 1,function()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
elseif missionData.state == 1 then
|
||||
else
|
||||
Util.AddOnceClick(btnGet,function ()
|
||||
JumpManager.GoJump(36008)
|
||||
end)
|
||||
end
|
||||
elseif _data.state == 1 then
|
||||
Util.SetGray(btnGet,true)
|
||||
btnText.text = "已购买"
|
||||
btnText.text = "已领取"
|
||||
Util.AddOnceClick(btnGet,function ()
|
||||
|
||||
end)
|
||||
|
@ -183,6 +203,10 @@ end
|
|||
function PremiumRebatePanel:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
this.itemViewList = {}
|
||||
for k,v in pairs(redList) do
|
||||
ClearRedPointObject(k,v)
|
||||
end
|
||||
redList = {}
|
||||
end
|
||||
|
||||
return PremiumRebatePanel
|
|
@ -165,6 +165,7 @@ function DailyRechargePanel:OnShow()
|
|||
self:RefreshPanel()
|
||||
end
|
||||
function DailyRechargePanel:SetGrid()
|
||||
LogGreen("#self.actInfo.mission:"..#self.actInfo.mission)
|
||||
for i = 1, math.max(#self.actInfo.mission,#self.items) do
|
||||
if not self.items[i] then
|
||||
return
|
||||
|
|
|
@ -850,7 +850,27 @@ function this.CheckRedPointPremium()
|
|||
if PlayerPrefs.GetInt("chaozhifanli"..PlayerManager.uid) ~= day then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
if this.CheckRedPointPremiumSingle(ActivityTypeDef.chaozhifanli) then
|
||||
return true
|
||||
else
|
||||
return this.CheckRedPointPremiumSingle(ActivityTypeDef.chaozhifanli30)
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function this.CheckRedPointPremiumSingle(activityType)
|
||||
local actType = activityType
|
||||
if activityType == RedPointType.chaozhifanli6 then
|
||||
actType = ActivityTypeDef.chaozhifanli
|
||||
else
|
||||
actType = ActivityTypeDef.chaozhifanli30
|
||||
end
|
||||
local actdata = ActivityGiftManager.GetActivityTypeInfo(actType)
|
||||
for i = 1,#actdata.mission do
|
||||
if actdata.mission[i].state == 0 and actdata.mission[i].progress >= actRewardConfig[actdata.mission[i].missionId].Values[1][1] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue