【限时神装】界面基本完成,差拍脸
parent
166f47f658
commit
d7f4ad06ba
|
@ -171,8 +171,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: -21.3, y: -86}
|
||||
m_SizeDelta: {x: 500, y: 50}
|
||||
m_AnchoredPosition: {x: 5, y: -70}
|
||||
m_SizeDelta: {x: 720, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9137462790466722241
|
||||
CanvasRenderer:
|
||||
|
@ -204,7 +204,7 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 35
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
|
@ -212,7 +212,7 @@ MonoBehaviour:
|
|||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u76AE\u80A4\u7684\u5C5E\u6027:\u5DF4\u62C9\u5DF4\u62C9\u7684"
|
||||
|
@ -257,80 +257,6 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: -489}
|
||||
m_SizeDelta: {x: 800, y: 800}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2172367683625968399
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2866014513312595790}
|
||||
- component: {fileID: 7741364740880716878}
|
||||
- component: {fileID: 8553795198741371134}
|
||||
m_Layer: 5
|
||||
m_Name: item (4)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2866014513312595790
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2172367683625968399}
|
||||
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: 6231850540444929965}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 150, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7741364740880716878
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2172367683625968399}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8553795198741371134
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2172367683625968399}
|
||||
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: 0}
|
||||
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 &2552273611709113648
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -574,11 +500,7 @@ RectTransform:
|
|||
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: 6869740572520954201}
|
||||
- {fileID: 4454848462305242000}
|
||||
- {fileID: 6379980727073845537}
|
||||
- {fileID: 2866014513312595790}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4168792694004356739}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -610,80 +532,6 @@ MonoBehaviour:
|
|||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
--- !u!1 &4606900757496203479
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4454848462305242000}
|
||||
- component: {fileID: 1422714614218264951}
|
||||
- component: {fileID: 8551629391933563505}
|
||||
m_Layer: 5
|
||||
m_Name: item (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4454848462305242000
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4606900757496203479}
|
||||
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: 6231850540444929965}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 150, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1422714614218264951
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4606900757496203479}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8551629391933563505
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4606900757496203479}
|
||||
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: 0}
|
||||
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 &6372519556189277661
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1430,154 +1278,6 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &8996067585444737547
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6379980727073845537}
|
||||
- component: {fileID: 1182882160887898018}
|
||||
- component: {fileID: 7757619907843597401}
|
||||
m_Layer: 5
|
||||
m_Name: item (3)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6379980727073845537
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8996067585444737547}
|
||||
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: 6231850540444929965}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 150, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1182882160887898018
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8996067585444737547}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7757619907843597401
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8996067585444737547}
|
||||
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: 0}
|
||||
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 &9198160628299423225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6869740572520954201}
|
||||
- component: {fileID: 8118684126811254091}
|
||||
- component: {fileID: 3517985486059502491}
|
||||
m_Layer: 5
|
||||
m_Name: item (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6869740572520954201
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9198160628299423225}
|
||||
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: 6231850540444929965}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 150, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8118684126811254091
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9198160628299423225}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &3517985486059502491
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9198160628299423225}
|
||||
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: 0}
|
||||
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!1001 &2528039619821164537
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1098,7 +1098,6 @@ ActivityTypeDef = {
|
|||
OpenSeverWelfare=55,--开服福利
|
||||
EightDayGift = 56,--八日登陆
|
||||
SignInfo = 57,--三日七日签到
|
||||
TimeLimitSkin = 99,--显示神装
|
||||
|
||||
--主题活动
|
||||
ShengXingYouLi=50,--升星有礼(指定猎妖师进阶)
|
||||
|
|
|
@ -1442,7 +1442,7 @@ function this.TimeFormat()
|
|||
|
||||
--限时折扣
|
||||
local giftList = {}
|
||||
giftList = this:GetInfoList()
|
||||
giftList = OperatingManager.GetInfoList()
|
||||
if #giftList > 0 then
|
||||
this.upGradePackageBtn:SetActive(true)
|
||||
this.upGradePackageTime.text = TimeToHMS(giftList[1].endTime-GetTimeStamp())
|
||||
|
@ -1606,58 +1606,20 @@ function this.TimeFormat()
|
|||
end
|
||||
|
||||
--限时神装
|
||||
local TimeLimitSkin = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TimeLimitSkin)
|
||||
if not TimeLimitSkin then
|
||||
this.btnTimeLimitSkin:SetActive(false)
|
||||
else
|
||||
local TimeLimitSkinEndTime = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.TimeLimitSkin).endTime
|
||||
local time = TimeLimitSkinEndTime - GetTimeStamp()
|
||||
if time > 0 then
|
||||
local limitSkinGift = {}
|
||||
limitSkinGift = OperatingManager.GetTimeLimitSkinInfoList()
|
||||
if limitSkinGift and limitSkinGift.goodsId then
|
||||
this.btnTimeLimitSkin:SetActive(true)
|
||||
this.DemonSlayerTime.text = TimeToFelaxible(time)
|
||||
this.TimeLimitSkinTime.text = TimeToHMS(limitSkinGift.endTime-GetTimeStamp())
|
||||
if limitSkinGift.endTime-GetTimeStamp() < 1 then
|
||||
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, limitSkinGift.goodsId)
|
||||
end
|
||||
else
|
||||
this.btnTimeLimitSkin:SetActive(false)
|
||||
end
|
||||
this.btnTimeLimitSkin:SetActive(true)
|
||||
end
|
||||
|
||||
end
|
||||
--为限时折扣写的
|
||||
function this:GetInfoList()
|
||||
local giftList={}
|
||||
local infoList = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift)--拿取所有类型5礼包信息(包含需要的礼包)
|
||||
local infoList2 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",21)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList2 do
|
||||
if infoList2[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList3 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",8)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList3 do
|
||||
if infoList3[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList4 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",25)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList4 do
|
||||
if infoList4[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList5 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",26)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList5 do
|
||||
if infoList5[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
return giftList
|
||||
end
|
||||
|
||||
-- function this:OnCloseBefore(action)
|
||||
-- PlayUIAnimBacks(this.gameObject, action)
|
||||
-- end
|
||||
|
|
|
@ -912,4 +912,54 @@ function this.CheckMonthGiftPageRedPoint()
|
|||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--为限时神装写的(只有一个)
|
||||
function this.GetTimeLimitSkinInfoList()
|
||||
local infoList = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift)--拿取所有类型5礼包信息(包含需要的礼包)
|
||||
local infoList2 = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",29)
|
||||
for index, value in pairs(infoList) do
|
||||
if infoList2.Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
return value
|
||||
end
|
||||
end
|
||||
end
|
||||
--为限时折扣写的(含有多个)
|
||||
function this.GetInfoList()
|
||||
local giftList={}
|
||||
local infoList = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift)--拿取所有类型5礼包信息(包含需要的礼包)
|
||||
local infoList2 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",21)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList2 do
|
||||
if infoList2[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList3 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",8)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList3 do
|
||||
if infoList3[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList4 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",25)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList4 do
|
||||
if infoList4[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local infoList5 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",26)
|
||||
for index, value in pairs(infoList) do
|
||||
for i = 1, #infoList5 do
|
||||
if infoList5[i].Id == value.goodsId and value.dynamicBuyTimes > 0 then
|
||||
table.insert(giftList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
return giftList
|
||||
end
|
||||
|
||||
return this
|
|
@ -41,6 +41,7 @@ function this.Pay(id, func)
|
|||
-- end
|
||||
this.EventTrigger[id] = func
|
||||
LogError("发起购买商品的请求,商品id = "..id)
|
||||
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包的红点检测
|
||||
--直购商品
|
||||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, id)
|
||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||
|
|
|
@ -3,10 +3,18 @@ local TimeLimitSkin = Inherit(BasePanel)
|
|||
local this = TimeLimitSkin
|
||||
|
||||
local _sortingOrder = 0
|
||||
local gift={}
|
||||
local _ItemViewList = {}
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function TimeLimitSkin:InitComponent()
|
||||
this.backBtn = Util.GetGameObject(self.gameObject,"backBtn")
|
||||
this.time = Util.GetGameObject(self.gameObject,"show/time"):GetComponent("Text")
|
||||
this.previewBtn = Util.GetGameObject(self.gameObject,"show/previewBtn")
|
||||
this.attri = Util.GetGameObject(self.gameObject,"show/attribute"):GetComponent("Text")
|
||||
this.buyBtn = Util.GetGameObject(self.gameObject,"show/buyBtn")
|
||||
this.reward = Util.GetGameObject(self.gameObject,"show/reward")
|
||||
this.buyBtnText = Util.GetGameObject(self.gameObject,"show/buyBtn/Text"):GetComponent("Text")
|
||||
this.effect = Util.GetGameObject(self.gameObject,"UI_Effect_TeHuiShenZhuang")
|
||||
end
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -14,6 +22,29 @@ function TimeLimitSkin:BindEvent()
|
|||
Util.AddClick(this.backBtn,function ()
|
||||
this:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(this.previewBtn,function ()
|
||||
local battleId = 1006
|
||||
local fdata, fseed = BattleManager.GetFakeBattleData(battleId)
|
||||
local testFightData = {
|
||||
fightData = fdata,
|
||||
fightSeed = fseed,
|
||||
fightType = 0,
|
||||
maxRound = 20
|
||||
}
|
||||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function ()
|
||||
Timer.New(function ()
|
||||
this:Refresh()
|
||||
end,3):Start()
|
||||
end)
|
||||
end)
|
||||
Util.AddClick(this.buyBtn,function ()
|
||||
PayManager.Pay(gift.goodsId, function(id)
|
||||
FirstRechargeManager.RefreshAccumRechargeValue(gift.goodsId)
|
||||
OperatingManager.SetHadBuyGoodsId({gift.goodsId})
|
||||
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, gift.goodsId)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -36,20 +67,85 @@ end
|
|||
|
||||
-- 打开,重新打开时回调
|
||||
function TimeLimitSkin:OnShow()
|
||||
|
||||
gift = {}
|
||||
TimeLimitSkin:RefreshData()
|
||||
end
|
||||
|
||||
function TimeLimitSkin:RefreshData()
|
||||
gift = OperatingManager.GetTimeLimitSkinInfoList()
|
||||
local gifts = OperatingManager.GetInfoList()--需要删除的
|
||||
gift = gifts[1]--需要删除的
|
||||
gift.goodsId = 10001--需要删除的
|
||||
TimeLimitSkin:SetReward()
|
||||
TimeLimitSkin:SetTime()
|
||||
TimeLimitSkin:SetAttri()
|
||||
end
|
||||
|
||||
function TimeLimitSkin:SetReward()
|
||||
for k,v in pairs(_ItemViewList) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
local rewards = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig,"Id",gift.goodsId).RewardShow
|
||||
for i=1, #rewards do
|
||||
if not _ItemViewList[i] then
|
||||
local view = SubUIManager.Open(SubUIConfig.ItemView,this.reward.transform)
|
||||
_ItemViewList[i] = view
|
||||
end
|
||||
_ItemViewList[i]:OnOpen(false,rewards[i],1.1,false)
|
||||
_ItemViewList[i].gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
|
||||
function TimeLimitSkin:SetTime()
|
||||
local time = gift.endTime
|
||||
this.time.text = Language[11496]..TimeToFelaxible(time-GetTimeStamp())
|
||||
if this.localTimer then
|
||||
this.localTimer:Stop()
|
||||
this.localTimer = nil
|
||||
end
|
||||
local lefttime = time-GetTimeStamp()
|
||||
this.localTimer = Timer.New(function()
|
||||
if lefttime < 0 then
|
||||
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, gift.goodsId)
|
||||
self:ClosePanel()
|
||||
end
|
||||
this.time.text = Language[11496]..TimeToFelaxible(lefttime)
|
||||
lefttime = lefttime - 1
|
||||
end,1,-1,true)
|
||||
this.localTimer:Start()
|
||||
end
|
||||
|
||||
function TimeLimitSkin:SetAttri()
|
||||
local reward = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig,"Id",gift.goodsId).RewardShow[4][1]
|
||||
local rg = ConfigManager.GetConfigDataByKey(ConfigName.ItemConfig,"Id",reward).RewardGroup
|
||||
local skins = ConfigManager.GetConfigDataByKey(ConfigName.RewardGroup,"Id",rg[1]).ShowItem
|
||||
local attris = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Id",skins[1][1]).MonomerProperty--所有皮肤加属性相同就用了第一个
|
||||
local str = "属性加成:"
|
||||
for i = 1, #attris do
|
||||
local attriData = ConfigManager.GetConfigData(ConfigName.PropertyConfig,attris[i][1])
|
||||
local attriName = attriData.Info
|
||||
local num
|
||||
if attriData.Style == 1 then
|
||||
num = tostring(attris[i][2])
|
||||
elseif attriData.Style == 2 then
|
||||
num = tostring(attris[i][2]/100).."% "
|
||||
end
|
||||
str = str..attriName.."+"..num
|
||||
end
|
||||
this.attri.text = str
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function TimeLimitSkin:OnClose()
|
||||
|
||||
if this.localTimer then
|
||||
this.localTimer:Stop()
|
||||
this.localTimer = nil
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function TimeLimitSkin:OnDestroy()
|
||||
|
||||
_sortingOrder = 0
|
||||
_ItemViewList = {}
|
||||
end
|
||||
return TimeLimitSkin
|
Loading…
Reference in New Issue