parent
047c5c26f7
commit
a8fd256812
|
|
@ -34,9 +34,9 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -96, y: -158.09998}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -107.549995, y: -158.10004}
|
||||
m_SizeDelta: {x: 76.9, y: 76.897}
|
||||
m_Pivot: {x: 0.50000006, y: 0.5}
|
||||
--- !u!222 &2626895028619679688
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -74,6 +74,162 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &181774338091266417
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2932887958962627933}
|
||||
- component: {fileID: 1370109979933842796}
|
||||
- component: {fileID: 3790412993214586187}
|
||||
m_Layer: 5
|
||||
m_Name: scroller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2932887958962627933
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 181774338091266417}
|
||||
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:
|
||||
- {fileID: 1171539042498346582}
|
||||
m_Father: {fileID: 2481339074999143791}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 4.3}
|
||||
m_SizeDelta: {x: 1045, y: 645.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1370109979933842796
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 181774338091266417}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Content: {fileID: 1171539042498346582}
|
||||
m_Horizontal: 0
|
||||
m_Vertical: 1
|
||||
m_MovementType: 1
|
||||
m_Elasticity: 0.1
|
||||
m_Inertia: 1
|
||||
m_DecelerationRate: 0.135
|
||||
m_ScrollSensitivity: 1
|
||||
m_Viewport: {fileID: 0}
|
||||
m_HorizontalScrollbar: {fileID: 0}
|
||||
m_VerticalScrollbar: {fileID: 0}
|
||||
m_HorizontalScrollbarVisibility: 0
|
||||
m_VerticalScrollbarVisibility: 0
|
||||
m_HorizontalScrollbarSpacing: 0
|
||||
m_VerticalScrollbarSpacing: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &3790412993214586187
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 181774338091266417}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &616022089734749750
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8502060274675274340}
|
||||
- component: {fileID: 5655440297304059979}
|
||||
- component: {fileID: 1137541503666934167}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8502060274675274340
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 616022089734749750}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.121, y: 1.121, z: 1.2}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3026958449964278605}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 82.8385, y: 30.382507}
|
||||
m_SizeDelta: {x: 26, y: 26}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5655440297304059979
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 616022089734749750}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1137541503666934167
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 616022089734749750}
|
||||
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: 0
|
||||
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 &935729246196295134
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -103,7 +259,7 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1171539042498346582}
|
||||
- {fileID: 2932887958962627933}
|
||||
- {fileID: 3026958449964278605}
|
||||
m_Father: {fileID: 9193407636057667010}
|
||||
m_RootOrder: 1
|
||||
|
|
@ -376,6 +532,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 1171539042498346582}
|
||||
- component: {fileID: 3184966851960719010}
|
||||
- component: {fileID: 6846399584543095795}
|
||||
m_Layer: 5
|
||||
m_Name: grid
|
||||
m_TagString: Untagged
|
||||
|
|
@ -390,17 +547,17 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1551830787636578833}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
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: 2481339074999143791}
|
||||
m_Father: {fileID: 2932887958962627933}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -494.8, y: 349.49994}
|
||||
m_SizeDelta: {x: 987.4, y: 670.5}
|
||||
m_AnchoredPosition: {x: -494.8, y: 322.74985}
|
||||
m_SizeDelta: {x: 987.4, y: 0}
|
||||
m_Pivot: {x: -0.00000007683411, y: 0.9999999}
|
||||
--- !u!114 &3184966851960719010
|
||||
MonoBehaviour:
|
||||
|
|
@ -415,17 +572,31 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 37
|
||||
m_Left: 72
|
||||
m_Right: 0
|
||||
m_Top: 5
|
||||
m_Top: 38
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_StartCorner: 0
|
||||
m_StartAxis: 0
|
||||
m_CellSize: {x: 100, y: 100}
|
||||
m_Spacing: {x: 70.41, y: 92}
|
||||
m_Spacing: {x: 68, y: 93.25}
|
||||
m_Constraint: 1
|
||||
m_ConstraintCount: 4
|
||||
m_ConstraintCount: 5
|
||||
--- !u!114 &6846399584543095795
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1551830787636578833}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &2113223897408364641
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -819,8 +990,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -33, y: -158.1}
|
||||
m_SizeDelta: {x: 84, y: 58}
|
||||
m_AnchoredPosition: {x: -33.8, y: -158.1}
|
||||
m_SizeDelta: {x: 107, y: 57}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6006573902792950806
|
||||
CanvasRenderer:
|
||||
|
|
@ -1191,11 +1362,11 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3026958449964278605}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 21.41, y: -29}
|
||||
m_SizeDelta: {x: 190, y: 116}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2583225234602877354
|
||||
|
|
@ -1338,6 +1509,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 8451588087794241115}
|
||||
- {fileID: 8296427967819817445}
|
||||
- {fileID: 8502060274675274340}
|
||||
- {fileID: 4095337321497035801}
|
||||
m_Father: {fileID: 2481339074999143791}
|
||||
m_RootOrder: 1
|
||||
|
|
|
|||
|
|
@ -921,6 +921,10 @@ RedPointType = {
|
|||
wujinTreasure = 8501,
|
||||
wujinBianDui = 8502,
|
||||
chaofanrushengRed = 8503,
|
||||
|
||||
jijin128 = 78,
|
||||
jijin328 = 79,
|
||||
chaozhijijin = 80,
|
||||
}
|
||||
|
||||
RedPointStatus = {
|
||||
|
|
|
|||
|
|
@ -141,9 +141,9 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
this.CheckMoneyProgress(v)
|
||||
this.mission[v.activityId] = v
|
||||
|
||||
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
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
|
||||
|
|
@ -524,7 +524,7 @@ end
|
|||
function this.RefreshActivityProgressData(msg)
|
||||
-- 检测
|
||||
this.CheckMoneyProgress(msg.activityInfo)
|
||||
--Log("刷新活动数据activityId:" .. msg.activityInfo.activityId .. "value:" .. msg.activityInfo.value)
|
||||
LogYellow("刷新活动数据activityId:" .. msg.activityInfo.activityId .. "value:" .. msg.activityInfo.value)
|
||||
|
||||
if this.mission[msg.activityInfo.activityId] then
|
||||
this.mission[msg.activityInfo.activityId].value = msg.activityInfo.value
|
||||
|
|
@ -533,7 +533,7 @@ function this.RefreshActivityProgressData(msg)
|
|||
if missionInfo.missionId == msg.activityInfo.mission[i].missionId then
|
||||
missionInfo.state = msg.activityInfo.mission[i].state
|
||||
missionInfo.progress = msg.activityInfo.mission[i].progress
|
||||
--Log(msg.activityInfo.activityId.." 刷新活动数据missionId:" .. missionInfo.missionId .. "state:" .. missionInfo.state .. "progress:" .. missionInfo.progress)
|
||||
LogYellow(msg.activityInfo.activityId.." 刷新活动数据missionId:" .. missionInfo.missionId .. "state:" .. missionInfo.state .. "progress:" .. missionInfo.progress)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1356,4 +1356,23 @@ function this.JourneyWithWindCurDayNoOpen()
|
|||
return false
|
||||
end
|
||||
|
||||
function this.CheckRedpointUpperMonthCard(red)
|
||||
local actType
|
||||
if red == RedPointType.jijin128 then
|
||||
actType = 78
|
||||
elseif red == RedPointType.jijin328 then
|
||||
actType = 79
|
||||
end
|
||||
local actInfo = ActivityGiftManager.GetActivityInfoByType(actType)
|
||||
if not actInfo then
|
||||
return false
|
||||
end
|
||||
for i = 1,#actInfo.mission do
|
||||
if actInfo.mission[i].state == 0 and actInfo.mission[i].progress == 1 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -668,7 +668,7 @@ function this:AddListener()
|
|||
Game.GlobalEvent:AddEvent(GameEvent.EightDay.GetRewardSuccess, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.EightDay.FifteenDayGift, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FindFairy.RefreshBuyOpenState, this.RefreshGiftBtnShow)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Activity.OnActivityProgressStateChange, this.RefreshGiftBtnShow)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnShowBattleUpLvTip, this.RefreshBattleUpLvTip)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerGetSuperManReward, this.GetSuperManReward)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.PatFace.RefreshRightUp, this.SetRightBarSize)--刷新右上伸缩条
|
||||
|
|
@ -685,7 +685,7 @@ function this:RemoveListener()
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.EightDay.GetRewardSuccess, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.EightDay.FifteenDayGift, this.RefreshEightGiftPreview)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.FindFairy.RefreshBuyOpenState, this.RefreshGiftBtnShow)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityProgressStateChange, this.RefreshGiftBtnShow)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnShowBattleUpLvTip, this.RefreshBattleUpLvTip)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerGetSuperManReward, this.GetSuperManReward)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.PatFace.RefreshRightUp, this.SetRightBarSize)--刷新右上伸缩条
|
||||
|
|
@ -933,6 +933,8 @@ function this:TabBtnAction(id,actType,data)
|
|||
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
|
||||
elseif id == ActivityTypeDef.TeHuiShenZhuang then
|
||||
UIManager.OpenPanel(UIName.TeHuiShenZhuangPanel)
|
||||
elseif id == 78 then
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel,id )
|
||||
end
|
||||
elseif actType == 2 then
|
||||
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
|
||||
|
|
@ -954,8 +956,6 @@ function this:TabBtnAction(id,actType,data)
|
|||
-- UIManager.OpenPanel(UIName.ArenaTopMatchPanel)
|
||||
elseif id == 93 then
|
||||
UIManager.OpenPanel(UIName.UpGradePackagePanel)
|
||||
elseif id == 94 then
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel,668)
|
||||
elseif id == 95 then
|
||||
UIManager.OpenPanel(UIName.TimeLimitSkinPanel)
|
||||
end
|
||||
|
|
@ -1375,16 +1375,17 @@ end
|
|||
function this.RefreshGiftBtnShow()
|
||||
for k,v in pairs(activitys) do
|
||||
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
||||
if v.ActId == 668 and ishow then
|
||||
-- 加入对月卡的判断
|
||||
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
||||
if v.ActiveType == 78 and ishow then
|
||||
local showTab = activityTabs[k].go.gameObject.activeSelf
|
||||
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
||||
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
||||
showTab = (isOpen_128 or isOpen_328)--isMonthCardActive and
|
||||
local actInfo = ActivityGiftManager.GetActivityInfoByType(v.ActiveType)
|
||||
if actInfo and actInfo.value > 0 then
|
||||
showTab = true
|
||||
end
|
||||
this.RefreshLayer(showTab,k,v)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
--后台推送
|
||||
function this.RefreshActivityBtn(context)
|
||||
|
|
|
|||
|
|
@ -55,32 +55,36 @@ function UpperMonthCard:InitComponent()
|
|||
self.titleDi = Util.GetGameObject(self.middlePart.transform, "titleDi"):GetComponent("Image")
|
||||
self.titleImg = Util.GetGameObject(self.titleDi.transform, "title"):GetComponent("Image")
|
||||
self.infoBg = Util.GetGameObject(self.middlePart.transform, "middle"):GetComponent("Image")
|
||||
self.grid = Util.GetGameObject( self.middlePart.transform, "middle/grid")
|
||||
self.grid = Util.GetGameObject( self.middlePart.transform, "middle/scroller/grid")
|
||||
self.itemPre = Util.GetGameObject(self.middlePart.transform, "middle/itemPre")
|
||||
|
||||
self.btnBuy = Util.GetGameObject(self.middlePart.transform, "btnBuy")
|
||||
self.btnBuyImage = self.btnBuy:GetComponent("Image")
|
||||
self.textBuy = Util.GetGameObject(self.btnBuy, "Text"):GetComponent("Text")
|
||||
self.btnBuyRed = Util.GetGameObject(self.btnBuy, "Red")
|
||||
|
||||
self.btnBuyRed = Util.GetGameObject(self.btnBuy, "red")
|
||||
self.btnHelp = Util.GetGameObject(self.gameObject, "Bg/helpBtn")
|
||||
self.helpPosition = self.btnHelp:GetComponent("RectTransform").localPosition
|
||||
---- 奖励列表
|
||||
self.rewardList = {}
|
||||
self.itemLst = {}
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function ActivityMainPanel:AddListener()
|
||||
function UpperMonthCard:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Activity.OnActivityProgressStateChange,self.RefreshPanel,self)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ActivityMainPanel:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityProgressStateChangeself.RefreshPanel,self)
|
||||
function UpperMonthCard:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityProgressStateChange,self.RefreshPanel,self)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function UpperMonthCard:BindEvent()
|
||||
Util.AddClick(self.btnHelp,function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,self.actConfig.HelpId,self.helpPosition.x,self.helpPosition.y)
|
||||
end)
|
||||
Util.AddOnceClick(self.btnBuy, function()
|
||||
if self.actInfo.value == 0 then
|
||||
if self.actInfo.value == 1 then
|
||||
PayManager.Pay(self.baseType, function(id)
|
||||
self:RechargeSuccessFunc(id)
|
||||
end)
|
||||
|
|
@ -99,7 +103,11 @@ function UpperMonthCard:OnOpen(_activityConfig,_index,parent)
|
|||
self.parent = parent
|
||||
end
|
||||
|
||||
function UpperMonthCard:OnSortingOrderChange()
|
||||
function UpperMonthCard:OnSortingOrderChange(_sortingOrder)
|
||||
-- self.sortingOrder = _sortingOrder
|
||||
-- for k,v in pairs(self.itemLst) do
|
||||
|
||||
-- end
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
|
|
@ -108,7 +116,11 @@ function UpperMonthCard:OnShow(_sortingOrder)
|
|||
self.sortingOrder = _sortingOrder
|
||||
self.actType = self.actConfig.ActiveType
|
||||
self.actInfo = ActivityGiftManager.GetActivityInfoByType(self.actType)
|
||||
self.baseType = globalActivity[self.actInfo.activityId].CanBuyRechargeId
|
||||
if not self.actInfo then
|
||||
self.parent:ClosePanel()
|
||||
return
|
||||
end
|
||||
self.baseType = globalActivity[self.actInfo.activityId].CanBuyRechargeId[1]
|
||||
self:SetPanelType()
|
||||
self:RefreshPanel()
|
||||
end
|
||||
|
|
@ -130,6 +142,8 @@ function UpperMonthCard:SetPanelType()
|
|||
self.titleDi.sprite = self.spLoader:LoadSprite(ImgType[self.actType].rewardPreview)
|
||||
self.titleImg.sprite = self.spLoader:LoadSprite(ImgType[self.actType].rewardPreviewText)
|
||||
self.infoBg.sprite = self.spLoader:LoadSprite(ImgType[self.actType].downBg)
|
||||
|
||||
self.btnHelp.gameObject:SetActive(self.actConfig.HelpId and self.actConfig.HelpId > 0)
|
||||
end
|
||||
|
||||
--- 设置不同界面的奖励信息
|
||||
|
|
@ -152,16 +166,23 @@ function UpperMonthCard:SetRewardInfo()
|
|||
self.itemLst[i].itemPos = Util.GetGameObject(self.itemLst[i].go, "itemPos")
|
||||
self.itemLst[i].itemView = SubUIManager.Open(SubUIConfig.ItemView,self.itemLst[i].itemPos.transform)
|
||||
self.itemLst[i].yiGet = Util.GetGameObject(self.itemLst[i].go, "yilingqu")
|
||||
self.itemLst[i].redPoint = Util.GetGameObject(self.itemLst[i].go, "redPoint")
|
||||
end
|
||||
self.itemLst[i].go.gameObject:SetActive(true)
|
||||
self.itemLst[i].name.text = string.format("第%s天",NumToChinese[i])
|
||||
local reward = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LuxuryFundConfig,"Type",self.baseType,"Day",i)
|
||||
local reward = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LuxuryFundConfig,"Type",self.baseType,"Day",i).reward[1]
|
||||
self.itemLst[i].itemView:OnOpen(false, reward, 1.1, false, false, false, self.sortingOrder)
|
||||
--2 已领取 1可领 0不可领
|
||||
if mission[i].state == 2 then
|
||||
--1 已领取 0 未领
|
||||
if mission[i].state == 1 then
|
||||
self.itemLst[i].yiGet.gameObject:SetActive(true)
|
||||
self.itemLst[i].redPoint.gameObject:SetActive(false)
|
||||
else
|
||||
self.itemLst[i].yiGet.gameObject:SetActive(false)
|
||||
if mission[i].progress == 1 then
|
||||
self.itemLst[i].redPoint.gameObject:SetActive(true)
|
||||
else
|
||||
self.itemLst[i].redPoint.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -171,12 +192,12 @@ end
|
|||
function UpperMonthCard:SetBuyState()
|
||||
if self.actInfo.value == 1 then
|
||||
self.btnBuyImage.sprite = self.spLoader:LoadSprite(state[0].bg)
|
||||
self.textBuy.text = state[0].text
|
||||
self.textBuy.text = MoneyUtil.GetMoneyUnitNameWithMoney(chargeConfig[self.baseType].Price)
|
||||
self.btnBuyRed.gameObject:SetActive(false)
|
||||
else
|
||||
self.isGet = false
|
||||
for i = 1,#self.actInfo.mission do
|
||||
if self.actInfo.mission.state == 1 then
|
||||
if self.actInfo.mission[i].state == 0 and self.actInfo.mission[i].progress == 1 then
|
||||
self.isGet = true
|
||||
break
|
||||
end
|
||||
|
|
|
|||
|
|
@ -539,6 +539,9 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.Practice_upgrade,PracticeManager.PracticeCheckUpgrade,FUNCTION_OPEN_TYPE.PRACTICE)
|
||||
RPData:AddCheckFunc(RedPointType.Practice_imprint,PracticeManager.PracticeCheckImprint,FUNCTION_OPEN_TYPE.PRACTICE)
|
||||
RPData:AddCheckFunc(RedPointType.chaofanrushengRed,ActivityGiftManager.CheckRedPointChaofanRuSheng)
|
||||
|
||||
RPData:AddCheckFunc(RedPointType.jijin128,ActivityGiftManager.CheckRedpointUpperMonthCard)
|
||||
RPData:AddCheckFunc(RedPointType.jijin328,ActivityGiftManager.CheckRedpointUpperMonthCard)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue