yangqiwen 2 months ago
parent cd5f5a0ad5
commit c7a9a8da6f
  1. 1
      assets/FrameWork/Event/EventEnum.ts
  2. 18
      assets/JieDao.meta
  3. 29
      assets/JieDao/prefab/JieDao.prefab
  4. 479
      assets/JieDao/prefab/JieDaoItemNode.prefab
  5. 8
      assets/JieDao/res/加成框.png.meta
  6. 2
      assets/MainHall/prefab/MainHall.prefab
  7. 88
      assets/Scripts/JieDao/JieDao.ts
  8. 86
      assets/Scripts/JieDao/JieDaoItemNode.ts
  9. 2
      assets/Scripts/MainHall/MainHallBtn.ts
  10. 48
      assets/Scripts/Manager/JieDaoManager.ts
  11. 4
      assets/Scripts/PrefabManager/PrefabManage.ts

@ -382,6 +382,7 @@ export enum ryw_Event {
reborn = 4321, reborn = 4321,
updateZuanShi = 4322, updateZuanShi = 4322,
freshGuanQiaProgress = 4323, freshGuanQiaProgress = 4323,
RefreshJieDao = 4324,
//找茬1209密码 //找茬1209密码
Check1209Mima = 9004, Check1209Mima = 9004,
Check1303Mima = 9005, Check1303Mima = 9005,

@ -2,12 +2,20 @@
"ver": "1.1.3", "ver": "1.1.3",
"uuid": "5e067ac9-939d-42e6-8aeb-82b30837f088", "uuid": "5e067ac9-939d-42e6-8aeb-82b30837f088",
"importer": "folder", "importer": "folder",
"isBundle": false, "isBundle": true,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
"compressionType": {}, "compressionType": {
"optimizeHotUpdate": {}, "bytedance": "zip"
"inlineSpriteFrames": {}, },
"isRemoteBundle": {}, "optimizeHotUpdate": {
"bytedance": false
},
"inlineSpriteFrames": {
"bytedance": false
},
"isRemoteBundle": {
"bytedance": true
},
"subMetas": {} "subMetas": {}
} }

@ -867,8 +867,12 @@
"__id__": 14 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": {
"_grayMaterial": null, "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": {
"__uuid__": "3a7bb79f-32fd-422e-ada2-96f518fed422"
},
"duration": 0.1, "duration": 0.1,
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
@ -877,7 +881,7 @@
} }
], ],
"_N$interactable": true, "_N$interactable": true,
"_N$enableAutoGrayEffect": false, "_N$enableAutoGrayEffect": true,
"_N$transition": 0, "_N$transition": 0,
"transition": 0, "transition": 0,
"_N$normalColor": { "_N$normalColor": {
@ -991,14 +995,14 @@
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0.5,
"y": 1 "y": 1
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-215.6, 0,
354.843, 354.843,
0, 0,
0, 0,
@ -1059,7 +1063,7 @@
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0.5,
"y": 1 "y": 1
}, },
"_trs": { "_trs": {
@ -1119,11 +1123,11 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 430, "width": 430,
"height": 120 "height": 300
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0.5,
"y": 1 "y": 1
}, },
"_trs": { "_trs": {
@ -1166,7 +1170,7 @@
"_layoutSize": { "_layoutSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 430, "width": 430,
"height": 120 "height": 300
}, },
"_resize": 1, "_resize": 1,
"_N$layoutType": 2, "_N$layoutType": 2,
@ -1264,7 +1268,7 @@
"templateType": 2, "templateType": 2,
"tmpNode": null, "tmpNode": null,
"tmpPrefab": { "tmpPrefab": {
"__uuid__": "3a9f2446-bae7-4177-baa4-caea4f8e179c" "__uuid__": "25c9e667-0138-4193-896b-52781ac0466e"
}, },
"_slideMode": 1, "_slideMode": 1,
"pageDistance": 0.3, "pageDistance": 0.3,
@ -1301,7 +1305,7 @@
"__id__": 1 "__id__": 1
}, },
"component": "", "component": "",
"_componentId": "75c5b49oGhDFr34RZFvQCFc", "_componentId": "056b2mudoVAGLwO/JMSOJuR",
"handler": "onListMGridRender", "handler": "onListMGridRender",
"customEventData": "" "customEventData": ""
}, },
@ -1382,6 +1386,9 @@
"item": { "item": {
"__uuid__": "25c9e667-0138-4193-896b-52781ac0466e" "__uuid__": "25c9e667-0138-4193-896b-52781ac0466e"
}, },
"levelUpMoney": {
"__id__": 19
},
"listCJ": { "listCJ": {
"__id__": 34 "__id__": 34
}, },

@ -24,29 +24,32 @@
"__id__": 5 "__id__": 5
}, },
{ {
"__id__": 8 "__id__": 11
}, },
{ {
"__id__": 11 "__id__": 14
}, },
{ {
"__id__": 18 "__id__": 22
}, },
{ {
"__id__": 24 "__id__": 29
}, },
{ {
"__id__": 27 "__id__": 32
},
{
"__id__": 37
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 30 "__id__": 40
} }
], ],
"_prefab": { "_prefab": {
"__id__": 31 "__id__": 41
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -70,8 +73,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
300, 0,
-60, 0,
0, 0,
0, 0,
0, 0,
@ -209,15 +212,19 @@
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [
{
"__id__": 6
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 6 "__id__": 9
} }
], ],
"_prefab": { "_prefab": {
"__id__": 7 "__id__": 10
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -266,6 +273,113 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.Node",
"_name": "图片遮罩",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 7
}
],
"_prefab": {
"__id__": 8
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 403,
"height": 177
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88e91414-87d7-4b8f-83fa-33ce2e10e7d8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "50257hsCNBcqQ6ZyXu6jzC",
"sync": false
},
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
@ -320,11 +434,11 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 12
} }
], ],
"_prefab": { "_prefab": {
"__id__": 10 "__id__": 13
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -378,7 +492,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 11
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -426,17 +540,20 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 12 "__id__": 15
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 16 "__id__": 19
},
{
"__id__": 20
} }
], ],
"_prefab": { "_prefab": {
"__id__": 17 "__id__": 21
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -490,20 +607,20 @@
"_name": "beishu", "_name": "beishu",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 11 "__id__": 14
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 13 "__id__": 16
}, },
{ {
"__id__": 14 "__id__": 17
} }
], ],
"_prefab": { "_prefab": {
"__id__": 15 "__id__": 18
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -515,8 +632,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 77, "width": 68,
"height": 33.5 "height": 29.72
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -557,7 +674,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 15
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -569,8 +686,8 @@
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "无加成", "_string": "无加成",
"_N$string": "无加成", "_N$string": "无加成",
"_fontSize": 25, "_fontSize": 22,
"_lineHeight": 25, "_lineHeight": 22,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": null, "_N$file": null,
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
@ -590,7 +707,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 15
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
@ -619,7 +736,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -632,8 +749,8 @@
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "a4bc6cfa-ebdd-4822-8a87-48a83fcd8ee6" "__uuid__": "a4bc6cfa-ebdd-4822-8a87-48a83fcd8ee6"
}, },
"_type": 0, "_type": 1,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -646,6 +763,33 @@
"_atlas": null, "_atlas": null,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": 23.52799999999999,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@ -659,24 +803,27 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "加成框", "_name": "加成框",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [ "_children": [
{ {
"__id__": 19 "__id__": 23
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 22 "__id__": 26
},
{
"__id__": 27
} }
], ],
"_prefab": { "_prefab": {
"__id__": 23 "__id__": 28
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -730,17 +877,17 @@
"_name": "New RichText", "_name": "New RichText",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 18 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 20 "__id__": 24
} }
], ],
"_prefab": { "_prefab": {
"__id__": 21 "__id__": 25
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -752,7 +899,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 135.15, "width": 148.27,
"height": 25.2 "height": 25.2
}, },
"_anchorPoint": { "_anchorPoint": {
@ -794,14 +941,14 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
"_N$string": "<color=#ffffff><outline color=#3677A2 width=1><bold>点击加成</c><color=#FFF669><outline color=#3677A2 width=1>200%<bold></color>", "_N$string": "<color=#ffffff><outline color=#3677A2 width=1><bold>点击加成</c><color=#FFF669><outline color=#3677A2 width=1>200%<bold></color>",
"_N$horizontalAlign": 0, "_N$horizontalAlign": 0,
"_N$fontSize": 20, "_N$fontSize": 22,
"_N$font": null, "_N$font": null,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_N$maxWidth": 0, "_N$maxWidth": 0,
@ -826,7 +973,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 18 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -853,6 +1000,33 @@
"_atlas": null, "_atlas": null,
"_id": "" "_id": ""
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": 24.236999999999995,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@ -866,7 +1040,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "按钮使用中", "_name": "使用中",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
@ -875,11 +1049,11 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 30
} }
], ],
"_prefab": { "_prefab": {
"__id__": 26 "__id__": 31
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -903,8 +1077,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
118.301, 118,
-34.962, -35,
0, 0,
0, 0,
0, 0,
@ -933,7 +1107,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 29
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -971,6 +1145,198 @@
"fileId": "36KYFdCB5HCbbKXjo8Lod8", "fileId": "36KYFdCB5HCbbKXjo8Lod8",
"sync": false "sync": false
}, },
{
"__type__": "cc.Node",
"_name": "切换",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
},
{
"__id__": 34
}
],
"_prefab": {
"__id__": 36
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 157,
"height": 66
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
118,
-35,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b86612aa-9804-4a79-93d8-a71ed6f78da4"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 35
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "c4adfhZEEZPZY9YclMBngLh",
"handler": "onTouchQieHuan",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "2e6GvR1IFM/7a1qCR+okZ0",
"sync": false
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "下滑箭头", "_name": "下滑箭头",
@ -982,11 +1348,11 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 28 "__id__": 38
} }
], ],
"_prefab": { "_prefab": {
"__id__": 29 "__id__": 39
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
@ -1040,7 +1406,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 27 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
@ -1087,12 +1453,17 @@
}, },
"_enabled": true, "_enabled": true,
"icon": { "icon": {
"__id__": 6 "__id__": 9
}, },
"title_str": { "title_str": {
"__id__": 9 "__id__": 12
},
"lockBeiShu": {
"__id__": 24
},
"unlockBeiShu": {
"__id__": 16
}, },
"beishu": null,
"_id": "" "_id": ""
}, },
{ {

@ -28,10 +28,10 @@
"height": 36, "height": 36,
"rawWidth": 115, "rawWidth": 115,
"rawHeight": 36, "rawHeight": 36,
"borderTop": 0, "borderTop": 12,
"borderBottom": 0, "borderBottom": 11,
"borderLeft": 0, "borderLeft": 22,
"borderRight": 0, "borderRight": 22,
"subMetas": {} "subMetas": {}
} }
} }

@ -3850,7 +3850,7 @@
"__id__": 105 "__id__": 105
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 108 "__id__": 108

@ -12,7 +12,8 @@ import Common5 from "../../Platform/th/Common5";
import List from "../../Platform/th/List"; import List from "../../Platform/th/List";
import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager"; import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager";
import FangChanManager from "../Manager/FangChanManager"; import FangChanManager from "../Manager/FangChanManager";
import ZiChanManager from "../Manager/ZiChanManager"; import JieDaoManager from "../Manager/JieDaoManager";
import PrefabManage from "../PrefabManager/PrefabManage";
import JieDaoItemNode from "./JieDaoItemNode"; import JieDaoItemNode from "./JieDaoItemNode";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ -23,11 +24,14 @@ export default class JieDao extends cc.Component {
@property(cc.Prefab) @property(cc.Prefab)
item: cc.Prefab = null; item: cc.Prefab = null;
@property(cc.Label)
levelUpMoney: cc.Label = null;
@property(List) @property(List)
listCJ: List = null; listCJ: List = null;
dataListCJ: any[]; dataListCJ: any[];
Config: { level: number; icon: string; isNeedAd: boolean; name: string; descLab: string; miaozhuan: number; jiesuoMoney: number; jiesuoBeiShu: number; }[];
Config: { configId: number; icon: string; isNeedAd: boolean; descLab: string; shuliang: number; miaozhuan: number[]; jiesuoMoney: number[]; jiesuoBeiShu: number[]; str1: string; str2: string; unLockNum: number; unLockLevel: number; }[];
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
@ -39,36 +43,40 @@ export default class JieDao extends cc.Component {
this.scheduleOnce(() => { this.scheduleOnce(() => {
this.setList() this.setList()
}, 0.01) }, 0.01)
EventMgr.onEvent_custom(ryw_Event.RefreshZiChan, () => {
this.init()
}, this)
cc.sys.localStorage.setItem("资产引导", '1')
} }
init() { init() {
this.Config = ZiChanManager.getManagerConfigs() this.refreshLevelUpMoney()
let ziChanData = User.getZiChanData() // let ziChanData = User.getZiChanData()
// this.curshouyi.string = `当前收益:${ziChanData.curshouyi}` // // this.curshouyi.string = `当前收益:${ziChanData.curshouyi}`
let getnum = 0 // let getnum = 0
let allnum = 0 // let allnum = 0
let beishu = 0 // let beishu = 0
let iconIndex = 0 // let iconIndex = 0
for (let i = 0; i < ziChanData.unLockNum.length; i++) { // for (let i = 0; i < ziChanData.unLockNum.length; i++) {
if (ziChanData.unLockNum[i] > 0) { // if (ziChanData.unLockNum[i] > 0) {
getnum += ziChanData.unLockNum[i] // getnum += ziChanData.unLockNum[i]
beishu += this.Config[i].jiesuoBeiShu[ziChanData.unLockNum[i] - 1] // beishu += this.Config[i].jiesuoBeiShu[ziChanData.unLockNum[i] - 1]
iconIndex = i // iconIndex = i
} // }
} // }
for (let i = 0; i < this.Config.length; i++) { // for (let i = 0; i < this.Config.length; i++) {
allnum += this.Config[i].shuliang // allnum += this.Config[i].shuliang
} // }
// let arr = [2, 3, 4, 4] // let arr = [2, 3, 4, 4]
// Common5.getSpriteFrameFromBundle("ZiChan", `res/big/${arr[iconIndex]}`, this.icon) // Common5.getSpriteFrameFromBundle("ZiChan", `res/big/${arr[iconIndex]}`, this.icon)
} }
setList() { setList() {
let array = this.Config this.Config = JieDaoManager.getManagerConfigs()
let level = JieDaoManager.getJieDaoLevel()
let haveConfig = []
for (let i = 0; i < this.Config.length; i++) {
if (i <= level) {
haveConfig.push(this.Config[i])
}
}
let array = haveConfig
this.dataListCJ = [] this.dataListCJ = []
for (let n = 0; n < array.length; n++) { for (let n = 0; n < array.length; n++) {
this.dataListCJ.push(array[n]); this.dataListCJ.push(array[n]);
@ -87,16 +95,38 @@ export default class JieDao extends cc.Component {
} }
onTouchClose() { onTouchClose() {
if (TaskManager.getCurUnLockMainTaskId() == MainTaskIdEnum.MainTask_514_2 && !cc.sys.localStorage.getItem("房产引导") && FangChanManager.getRoomState(3) != 1) { // if (TaskManager.getCurUnLockMainTaskId() == MainTaskIdEnum.MainTask_514_2 && !cc.sys.localStorage.getItem("房产引导") && FangChanManager.getRoomState(3) != 1) {
User.setFirstStepIndex(1102) // User.setFirstStepIndex(1102)
EventMgr.emitEvent_custom(ryw_Event.My_Guide) // EventMgr.emitEvent_custom(ryw_Event.My_Guide)
} // }
this.node.removeFromParent() this.node.removeFromParent()
this.node.destroy() this.node.destroy()
} }
onTouchShengJi(){ onTouchShengJi() {
Common5.playRemoteAudioEffect('sound/diandiandian/升级音效')
let money = User.getMoney()
let getJieDaoLevel = JieDaoManager.getJieDaoLevel() + 1
let getJieDaoConfigByLevel = JieDaoManager.getJieDaoConfigByLevel(getJieDaoLevel)
if (money >= getJieDaoConfigByLevel.jiesuoMoney) {
JieDaoManager.setJieDaoLevel(getJieDaoLevel)
getJieDaoConfigByLevel = JieDaoManager.getJieDaoConfigByLevel(getJieDaoLevel)
this.dataListCJ.push(getJieDaoConfigByLevel);
this.listCJ.numItems = this.dataListCJ.length;
this.refreshLevelUpMoney()
} else {
PrefabManage.showTextTips("先去赚钱吧")
}
}
refreshLevelUpMoney() {
let getJieDaoLevel = JieDaoManager.getJieDaoLevel() + 1
if (getJieDaoLevel >= JieDaoManager.getManagerConfigs().length) {
this.levelUpMoney.node.parent.getComponent(cc.Button).interactable = false
return
}
let getJieDaoConfigByLevel = JieDaoManager.getJieDaoConfigByLevel(getJieDaoLevel)
this.levelUpMoney.string = `${Common5.getNumberChangeHanzi(getJieDaoConfigByLevel.jiesuoMoney)}`
} }
// update (dt) {} // update (dt) {}

@ -11,6 +11,7 @@ import User from "../../FrameWork/User/User";
import Common5 from "../../Platform/th/Common5"; import Common5 from "../../Platform/th/Common5";
import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager"; import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager";
import BagManager from "../Manager/BagManager"; import BagManager from "../Manager/BagManager";
import JieDaoManager from "../Manager/JieDaoManager";
import LevelUpManager from "../Manager/LevelUpManager"; import LevelUpManager from "../Manager/LevelUpManager";
import ShipuManager from "../Manager/ShipuManager"; import ShipuManager from "../Manager/ShipuManager";
import UserManager from "../Manager/UserManager"; import UserManager from "../Manager/UserManager";
@ -27,8 +28,11 @@ export default class JieDaoItemNode extends cc.Component {
@property(cc.Label) @property(cc.Label)
title_str: cc.Label = null; title_str: cc.Label = null;
@property(cc.RichText)
lockBeiShu: cc.RichText = null;
@property(cc.Label) @property(cc.Label)
beishu: cc.Label = null; unlockBeiShu: cc.Label = null;
config: any; config: any;
@ -37,71 +41,45 @@ export default class JieDaoItemNode extends cc.Component {
// onLoad () {} // onLoad () {}
start() { start() {
EventMgr.onEvent_custom(ryw_Event.RefreshJieDao, () => {
this.refreshState()
}, this)
} }
init(data) { init(data) {
this.config = data this.config = data
Common5.getSpriteFrameFromBundle("JieDao", this.config.icon, this.icon)
// Common5.addUrlSprite_custom(this.config.icon, this.icon) // Common5.addUrlSprite_custom(this.config.icon, this.icon)
Common5.getSpriteFrameFromBundle("ZiChan", this.config.icon, this.icon)
this.title_str.string = data.descLab
let ziChanData = User.getZiChanData()
let level = User.getMyLevel()
//是否满足解锁条件
if (ziChanData.unLockNum[this.config.configId] == -1 && ShipuManager.getShipuUnLockNum() >= this.config.unLockNum && level >= this.config.unLockLevel) {
ziChanData.unLockNum[this.config.configId] = 0
}
if (ziChanData.unLockNum[this.config.configId] == -1 && ShipuManager.getShipuUnLockNum() >= this.config.unLockNum) {
// 变棕色
// this.str1.node.color = cc.color(33, 152, 0)
}
if (ziChanData.unLockNum[this.config.configId] == -1 && level >= this.config.unLockLevel) {
// 变棕色
// this.str2.node.color = cc.color(33, 152, 0)
}
let unLockNum = ziChanData.unLockNum[this.config.configId] <= 0 ? 0 : ziChanData.unLockNum[this.config.configId]
if (unLockNum > 0) {
this.beishu.string = `秒赚倍数:${this.config.miaozhuan[unLockNum - 1]}`
} else {
this.beishu.string = `秒赚倍数:${0}`
}
if (unLockNum >= 0) {
}
this.refreshState() this.refreshState()
} }
refreshState() { onTouchQieHuan() {
let ziChanData = User.getZiChanData() JieDaoManager.setJieDaoInUse(this.config.level)
if (ziChanData.unLockNum[this.config.configId] == -1) { EventMgr.emitEvent_custom(ryw_Event.RefreshJieDao)
} else if (ziChanData.unLockNum[this.config.configId] < this.config.shuliang) {
} else {
if (this.config.name == '镇中心门店' && TaskManager.getCurUnLockMainTaskId() >= MainTaskIdEnum.MainTask_516_1 && TaskManager.getCurUnLockMainTaskId() <= MainTaskIdEnum.MainTask_517) {
}else{
}
}
} }
onTouchShop() { refreshState() {
// //Common5.playEffect("sound/按键点击") this.title_str.string = this.config.descLab
Common5.playRemoteAudioEffect('sound/diandiandian/升级音效') let inUse = JieDaoManager.getJieDaoInUse()
let ziChanData = User.getZiChanData() if (inUse == this.config.level) {
//是否满足解锁条件 this.icon.node.getChildByName("图片遮罩").active = false
if (ziChanData.unLockNum[this.config.configId] == -1 && ShipuManager.getShipuUnLockNum() >= this.config.unLockNum) { this.node.getChildByName("使用中").active = true
ziChanData.unLockNum[this.config.configId] = 0 this.node.getChildByName("切换").active = false
} this.node.getChildByName("加成框").active = true
UserManager.subMoney(this.config.jiesuoMoney[ziChanData.unLockNum[this.config.configId]]) this.node.getChildByName("加成框锁").active = false
this.unlockBeiShu.string = this.config.jiesuoBeiShu == 1 ? '无加成' : `单价加成${this.config.jiesuoBeiShu * 100}%`
// ziChanData = {curshouyi:0,getnum:0,shouyi:0,unLockNum:[-1,-1,-1,-1]} this.unlockBeiShu["_forceUpdateRenderData"](true);
if (ziChanData.unLockNum[this.config.configId] == -1) { this.unlockBeiShu.node.parent.setContentSize(cc.size(this.lockBeiShu.node.getContentSize().width + 30, this.lockBeiShu.node.parent.getContentSize().height))
ziChanData.unLockNum[this.config.configId] = 1
} else { } else {
ziChanData.unLockNum[this.config.configId] += 1 this.icon.node.getChildByName("图片遮罩").active = true
this.node.getChildByName("切换").active = true
this.node.getChildByName("使用中").active = false
this.node.getChildByName("加成框").active = false
this.node.getChildByName("加成框锁").active = true
let str1 = `<color=#ffffff><outline color=#3677A2 width=1><bold>无加成</color>`
let str2 = `<color=#ffffff><outline color=#3677A2 width=1><bold>单价加成</c><color=#FFF669><outline color=#3677A2 width=1>${this.config.jiesuoBeiShu * 100}%<bold></color>`
this.lockBeiShu.string = this.config.jiesuoBeiShu == 1 ? str1 : str2
} }
User.setZiChanData(ziChanData)
this.init(this.config)
EventMgr.emitEvent_custom(ryw_Event.RefreshZiChan)
this.checkTask()
} }
checkTask() { checkTask() {

@ -1256,7 +1256,7 @@ export default class MainHallBtn extends cc.Component {
} }
ziChanClickEvent() { ziChanClickEvent() {
//Common5.playEffect("sound/按键点击") //Common5.playEffect("sound/按键点击")
PrefabManage.loadPrefabByType(GameType.ZiChan) PrefabManage.loadPrefabByType(GameType.JieDao)
} }
refreshShengJi() { refreshShengJi() {

@ -9,10 +9,10 @@ import User from "../../FrameWork/User/User";
import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager"; import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager";
let Config = [ let Config = [
{ configId: 0, icon: 'res/2', isNeedAd: false, name: '镇中心门店', descLab: '镇中心门店', shuliang: 1, miaozhuan: [5], jiesuoMoney: [3000000000], jiesuoBeiShu: [5], str1: "开通3个面点", str2: "人物等级:350级", unLockNum: 3, unLockLevel: 350 }, { level: 0, icon: 'res/图片1', isNeedAd: false, name: '解放路', descLab: '解放路', miaozhuan: 1, jiesuoMoney: 1, jiesuoBeiShu: 1 },
{ configId: 1, icon: 'res/3', isNeedAd: false, name: '市区门店', descLab: '市区门店', shuliang: 1, miaozhuan: [10], jiesuoMoney: [100000000000000], jiesuoBeiShu: [10], str1: "开通9个面点", str2: "人物等级:700级", unLockNum: 9, unLockLevel: 700 }, { level: 1, icon: 'res/图片2', isNeedAd: false, name: '朝阳路', descLab: '朝阳路', miaozhuan: 2, jiesuoMoney: 2, jiesuoBeiShu: 2 },
{ configId: 2, icon: 'res/4', isNeedAd: false, name: '省城门店', descLab: '省城门店', shuliang: 1, miaozhuan: [15], jiesuoMoney: [10000000000000000000], jiesuoBeiShu: [15], str1: "开通15个面点", str2: "人物等级:1100级", unLockNum: 15, unLockLevel: 1100 }, { level: 2, icon: 'res/图片2', isNeedAd: false, name: '太平路', descLab: '太平路', miaozhuan: 3, jiesuoMoney: 3, jiesuoBeiShu: 3 },
{ configId: 3, icon: 'res/4', isNeedAd: false, name: '省城美食街', descLab: '省城美食街', shuliang: 1, miaozhuan: [20], jiesuoMoney: [1000000000000000000000], jiesuoBeiShu: [20], str1: "开通21个面点", str2: "人物等级:1300级", unLockNum: 21, unLockLevel: 1300 }, { level: 3, icon: 'res/图片2', isNeedAd: false, name: '劳动路', descLab: '劳动路', miaozhuan: 4, jiesuoMoney: 4, jiesuoBeiShu: 4 },
] ]
export default class JieDaoManager { export default class JieDaoManager {
@ -21,26 +21,40 @@ export default class JieDaoManager {
return Config return Config
} }
public static getZiChanBeiShu() { public static getJieDaoLevel() {
let ziChanData = User.getZiChanData() let level = User.getStatistics("JieDao-Level")
let beishu = 0 return level
for (let i = 0; i < ziChanData.unLockNum.length; i++) { }
if (ziChanData.unLockNum[i] > 0) {
if ( i == 0 && TaskManager.getCurUnLockMainTaskId() >= MainTaskIdEnum.MainTask_516_1 && TaskManager.getCurUnLockMainTaskId() <= MainTaskIdEnum.MainTask_517) {
console.log("当前镇中心门店被封,没有倍数加成了")
}else{
beishu += Config[i].jiesuoBeiShu[ziChanData.unLockNum[i] - 1]
}
}
}
public static setJieDaoLevel(level) {
User.setStatistics("JieDao-Level", level)
}
public static getJieDaoInUse() {
let inUse = User.getStatistics("JieDao-InUse")
return inUse
}
public static setJieDaoInUse(level) {
User.setStatistics("JieDao-InUse", level)
}
public static getJieDaoBeiShu() {
let level = this.getJieDaoInUse()
let beishu = 0
beishu = Config[level].jiesuoBeiShu
if (beishu == 0) { if (beishu == 0) {
beishu = 1 //0倍就是*1 beishu = 1 //0倍就是*1
} }
return beishu return beishu
} }
public static getZiChanConfigByName(name) { public static getJieDaoConfigByLevel(level) {
let config = Config[level]
return config
}
public static getJieDaoConfigByName(name) {
let _config let _config
for (let i = 0; i < Config.length; i++) { for (let i = 0; i < Config.length; i++) {
if (Config[i].name == name) { if (Config[i].name == name) {

@ -218,6 +218,8 @@ export enum GameType {
ShouHuoji, ShouHuoji,
TaskResult, TaskResult,
JieDao,
} }
// 子游戏命名 // 子游戏命名
@ -462,6 +464,8 @@ let AllPrefabConfig = [
{ desc: "售货机", gameType: GameType.ShouHuoji, bundleName: "shouhuoji", prefabUrl: "prefab/ShouHuoJiGai", dadianTag: '售货机-进入', wanJiaDaDianTag: "售货机-玩家", isNeedLoading: true }, { desc: "售货机", gameType: GameType.ShouHuoji, bundleName: "shouhuoji", prefabUrl: "prefab/ShouHuoJiGai", dadianTag: '售货机-进入', wanJiaDaDianTag: "售货机-玩家", isNeedLoading: true },
{ desc: "剧情任务结果", gameType: GameType.TaskResult, bundleName: "MainPrefab", prefabUrl: "prefab/taskResult", dadianTag: '剧情任务结果-进入', wanJiaDaDianTag: "剧情任务结果-玩家", isNeedLoading: false }, { desc: "剧情任务结果", gameType: GameType.TaskResult, bundleName: "MainPrefab", prefabUrl: "prefab/taskResult", dadianTag: '剧情任务结果-进入', wanJiaDaDianTag: "剧情任务结果-玩家", isNeedLoading: false },
{ desc: "街道", gameType: GameType.JieDao, bundleName: "JieDao", prefabUrl: "prefab/JieDao", dadianTag: '街道-进入', wanJiaDaDianTag: "街道-玩家", isNeedLoading: true },
] ]

Loading…
Cancel
Save