整合,清理掉很多冗余的东西
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0.7,
|
||||
"y": 0.7,
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -281,7 +281,7 @@
|
||||
"__id__": 13
|
||||
},
|
||||
"atk_x": 0,
|
||||
"atk_y": 0,
|
||||
"atk_y": 15,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,789 +0,0 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "guide_step",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "guide_step",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 30
|
||||
},
|
||||
{
|
||||
"__id__": 32
|
||||
},
|
||||
{
|
||||
"__id__": 42
|
||||
},
|
||||
{
|
||||
"__id__": 44
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 46
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -360,
|
||||
"y": -640,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 3
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 2
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "1c7a67cd-0d50-4b26-ae0f-8bbe3ec1a3a3",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "4fJlP7AItEGL6+yc5TgOyj",
|
||||
"instance": {
|
||||
"__id__": 4
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "dfsrjvivZM9pHvAo2xwcW7",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "guide_hand"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"4fJlP7AItEGL6+yc5TgOyj"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 320,
|
||||
"y": 650,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_layer"
|
||||
],
|
||||
"value": 33554432
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 12
|
||||
},
|
||||
"propertyPath": [
|
||||
"_layer"
|
||||
],
|
||||
"value": 33554432
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"0658nQXq9N0oQ+gWV86dic"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 14
|
||||
},
|
||||
"propertyPath": [
|
||||
"_anchorPoint"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"2dOsoG349BmaSplRClOk+M"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 16
|
||||
},
|
||||
"propertyPath": [
|
||||
"_contentSize"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 82,
|
||||
"height": 90
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"f7LAwbuhlD/7QxqfBwELww"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 17
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "427187e5-0310-47d0-a5a1-a71397f17545",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "20nBFDj4RJF52sWGsX/uRA",
|
||||
"instance": {
|
||||
"__id__": 19
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "e7jZoqK6dKYLaOgseFE1rC",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 27
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 21
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "tip"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"20nBFDj4RJF52sWGsX/uRA"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 21
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 780,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 21
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 21
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 26
|
||||
},
|
||||
"propertyPath": [
|
||||
"_alignFlags"
|
||||
],
|
||||
"value": 41
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"504Z4v5h5KYJa+ZDZKTfRk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 26
|
||||
},
|
||||
"propertyPath": [
|
||||
"_bottom"
|
||||
],
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 26
|
||||
},
|
||||
"propertyPath": [
|
||||
"_top"
|
||||
],
|
||||
"value": 300
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 26
|
||||
},
|
||||
"propertyPath": [
|
||||
"_originalHeight"
|
||||
],
|
||||
"value": 200
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 31
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "10c7J1HktJdrahzSEG9neh"
|
||||
},
|
||||
{
|
||||
"__type__": "afbf4drt3tMqZefraBzQRxy",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 33
|
||||
},
|
||||
"tipLabel": {
|
||||
"__id__": 34
|
||||
},
|
||||
"tipNode": {
|
||||
"__id__": 17
|
||||
},
|
||||
"handNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"skipButton": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "0338Ve5PxPlbFiaOsSQVJN"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 35
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 41
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "伟大的勇者,欢迎来到 『像素大陆』",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 30,
|
||||
"_fontSize": 30,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 35,
|
||||
"_overflow": 3,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 1,
|
||||
"_enableOutline": true,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "tip_label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 36
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
},
|
||||
{
|
||||
"__id__": 38
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 40
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 360,
|
||||
"y": 100,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 35
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 37
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 620,
|
||||
"height": 48.1
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1aSIaqAV1MEp8ApxTDY/eA"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 35
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 39
|
||||
},
|
||||
"_alignFlags": 42,
|
||||
"_target": null,
|
||||
"_left": 50,
|
||||
"_right": 50,
|
||||
"_top": 106.3,
|
||||
"_bottom": 39.3,
|
||||
"_horizontalCenter": 100,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 420,
|
||||
"_originalHeight": 54.4,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "73m5GoISlKD5yVNtnnfbIp"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "79YIQDtXNBi4+Fe9c3EQNE",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bfG4t/2QdEK7+2XVJTDwYr"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 43
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 720,
|
||||
"_originalHeight": 400,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bdPGnTA9hF+Jzb4IFEIHaL"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.BlockInputEvents",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 45
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "deGEZNg0hH6IltNWOlcrPD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "f5mwvp5Y5BbrckCUmimySi",
|
||||
"instance": null,
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 47
|
||||
}
|
||||
],
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": {
|
||||
"__id__": 32
|
||||
},
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"tipLabel"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 17
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"bfG4t/2QdEK7+2XVJTDwYr"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "9e230ba1-8f43-4370-989d-ca35558ebdd3",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "guide_step"
|
||||
}
|
||||
}
|
||||
@@ -41,13 +41,10 @@
|
||||
},
|
||||
{
|
||||
"__id__": 523
|
||||
},
|
||||
{
|
||||
"__id__": 525
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 527
|
||||
"__id__": 525
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -11306,24 +11303,6 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e4xMGk4GFKMItlvPLEwF7G"
|
||||
},
|
||||
{
|
||||
"__type__": "1e280wxpBZCyII59/Z4K5BL",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": false,
|
||||
"__prefab": {
|
||||
"__id__": 526
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f0AxzzjcNGMrArJUyI2isJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "28d11009-6d68-462a-9880-8b31cf5975fd",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -14,46 +14,22 @@ export enum BoxSet {
|
||||
DEFAULT = 1,
|
||||
MONSTER = 2,
|
||||
HERO = 4,
|
||||
MONSTER_SKILL = 8,
|
||||
HERO_SKILL = 16,
|
||||
PLAYER=32,
|
||||
BOSS=64,
|
||||
// MONSTER_SKILL = 8,
|
||||
// HERO_SKILL = 16,
|
||||
// PLAYER=32,
|
||||
// BOSS=64,
|
||||
|
||||
BOX_WIDTH = 64,
|
||||
BOX_HEIGHT = 64,
|
||||
// BOX_WIDTH = 64,
|
||||
// BOX_HEIGHT = 64,
|
||||
//地图边界
|
||||
LETF_END = -420,
|
||||
RIGHT_END = 420,
|
||||
HERO_START = -360,
|
||||
MONSTER_START = 360,
|
||||
END_POINT = 360,
|
||||
|
||||
//游戏地平线
|
||||
GAME_LINE = 0,
|
||||
CSKILL_X = 320,
|
||||
CSKILL_Y = 400,
|
||||
//攻击距离
|
||||
ATK_RANGE_X = 150,
|
||||
MOVE_RANGE_X = 20,
|
||||
MAX_SKILL_SY = 50,
|
||||
MAX_SKILL_BY = 80,
|
||||
ATK_Y = 40,
|
||||
ATK_X = 10,
|
||||
}
|
||||
export enum GameSet {
|
||||
ATK_TO_ATK_RATIO=0.1,
|
||||
ATK_TO_HP_RATIO=0.2,
|
||||
ATK_TO_SHIELD_RATIO=2,
|
||||
|
||||
ATK_LINES = 3, //英雄数
|
||||
MON_GOLD_ADD =2,
|
||||
MON_COIN_ADD=2,
|
||||
COIN_ADD=1,
|
||||
DEF_RATE=0.7,
|
||||
DODGE_MAX=70,
|
||||
HERO_NUM=3,
|
||||
AP_UPDATE_RATE=120,
|
||||
AP_CHANGE_RATE=100,
|
||||
}
|
||||
export enum FacSet {
|
||||
HERO=0,
|
||||
MON=1,
|
||||
@@ -106,3 +82,63 @@ export class NumberFormatter {
|
||||
}
|
||||
}
|
||||
}
|
||||
export enum FightSet {
|
||||
FRIEND_WAVE_UP=3, //伙伴登场波次
|
||||
BOSS_WAVE_UP_1=3, //boss登场波次
|
||||
BOSS_WAVE_UP_2=5, //boss登场波次
|
||||
BOSS_WAVE_UP_3=7, //boss登场波次
|
||||
EQUIP_WAVE_UP_1=4, //装备登场波次
|
||||
EQUIP_WAVE_UP_2=6, //装备登场波次
|
||||
EQUIP_WAVE_UP_3=8, //装备登场波次
|
||||
SKILL_WAVE_UP_1=2, //技能登场波次
|
||||
SKILL_WAVE_UP_2=5, //技能登场波次
|
||||
SKILL_WAVE_UP_3=7, //技能登场波次
|
||||
MON_WAVE_TIME=10,//怪物波次时间
|
||||
ATK_ADD_COUNT=4,//伙伴攻击力增加
|
||||
ATK_ADD_GLOD=1,//金币增加
|
||||
CRIT_DAMAGE=50,//暴击伤害
|
||||
DOUBLE_ATK_RATE=100,//额外攻击默认概率
|
||||
GREEN_GOLD=1,//绿色金币
|
||||
BLUE_GOLD=2,//蓝色金币
|
||||
PURPLE_GOLD=3,//紫色金币
|
||||
ORANGE_GOLD=4,//橙色金币
|
||||
BURN_COUNT=5,//默认易伤次数 5秒
|
||||
STUN_TIME=0.5,//默认晕时间
|
||||
WEAPON_LV=2,//武器等级
|
||||
SHIELD_LV=3,//护盾等级
|
||||
ARMOR_LV=4,//防具等级
|
||||
ACCESSORY_LV=5,//饰品等级
|
||||
ATKED_TO_POWER=15,//被攻击涨能量
|
||||
ATK_TO_POWER=10,//攻击涨能量
|
||||
CRIT_TO_POWER=15,//暴击涨能量
|
||||
DODGE_TO_POWER=15,//闪避涨能量
|
||||
ONE_WAVE_TIME=30,//单波时间
|
||||
DOWN_TIME=5,//倒计时时间
|
||||
MORE_RC=10,//更多次数 广告获取的次数
|
||||
TAL_NUM=3,//天赋数量
|
||||
HEARTPOS=-320,//基地位置
|
||||
HERO_MAX_NUM=3,//英雄最大数量
|
||||
// ATK_TO_ATK_RATIO=0.1,
|
||||
// ATK_TO_HP_RATIO=0.2,
|
||||
// ATK_TO_SHIELD_RATIO=2,
|
||||
// ATK_LINES = 3, //英雄数
|
||||
// MON_GOLD_ADD =2,
|
||||
// MON_COIN_ADD=2,
|
||||
// COIN_ADD=1,
|
||||
// DEF_RATE=0.7,
|
||||
// DODGE_MAX=70,
|
||||
// HERO_NUM=3,
|
||||
// AP_UPDATE_RATE=100,
|
||||
// AP_CHANGE_RATE=0,
|
||||
}
|
||||
|
||||
export const TooltipTypes = {
|
||||
life:1,
|
||||
health:2,
|
||||
skill:3,
|
||||
crit:4,
|
||||
uskill:5,
|
||||
lvup:6,
|
||||
apup:7,
|
||||
hpup:8,
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "2a50d441-0bd3-4762-bd48-0f3007ad829f",
|
||||
"uuid": "ec307471-71c8-4cf5-ad7f-066bc2c12b72",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
@@ -10,27 +10,17 @@ import { LayerType, UIConfig } from "../../../../../extensions/oops-plugin-frame
|
||||
export enum UIID {
|
||||
/** 资源加载界面 */
|
||||
Loading = 1,
|
||||
/** 弹窗界面 */
|
||||
// Window,
|
||||
/** 加载与延时提示界面 */
|
||||
Netinstable,
|
||||
/** 角色控制 */
|
||||
Role_Controller,
|
||||
Victory,
|
||||
Guide=1001,
|
||||
// Shop_Page,
|
||||
// Hero_Page,
|
||||
}
|
||||
|
||||
/** 打开界面方式的配置数据 */
|
||||
export var UIConfigData: { [key: number]: UIConfig } = {
|
||||
[UIID.Loading]: { layer: LayerType.UI, prefab: "loading/prefab/loading", bundle: "resources" },
|
||||
[UIID.Netinstable]: { layer: LayerType.PopUp, prefab: "common/prefab/netinstable" },
|
||||
// [UIID.Window]: { layer: LayerType.Dialog, prefab: "common/prefab/window" },
|
||||
[UIID.Role_Controller]: { layer: LayerType.UI, prefab: "gui/role_controller" },
|
||||
[UIID.Victory]: { layer: LayerType.UI, prefab: "gui/element/victory" },
|
||||
[UIID.Guide]: { layer: LayerType.UI, prefab: "gui/element/guide_step" },
|
||||
// [UIID.Shop_Page]: { layer: LayerType.UI, prefab: "gui/shop_page" },
|
||||
// [UIID.Hero_Page]: { layer: LayerType.UI, prefab: "gui/heros_page" },
|
||||
// [UIID.Toast]: { layer: LayerType.PopUp, prefab: "common/prefab/toast" },
|
||||
}
|
||||
@@ -1,283 +0,0 @@
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { smc } from "../SingletonModuleComp";
|
||||
import { GameEvent } from "./GameEvent";
|
||||
import { UIID } from "./GameUIConfig";
|
||||
|
||||
/** 引导步骤类型枚举 */
|
||||
export enum GuideStepType {
|
||||
/** 点击操作 */
|
||||
CLICK = "click",
|
||||
/** 拖拽操作 */
|
||||
DRAG = "drag",
|
||||
/** 显示提示 */
|
||||
TIP = "tip",
|
||||
/** 等待操作 */
|
||||
WAIT = "wait",
|
||||
}
|
||||
export const finishCurrGuide=(key:number)=>{
|
||||
if(key==0){
|
||||
oops.message.dispatchEvent(GameEvent.GuideEnd,key)
|
||||
}else{
|
||||
if(smc.guides[key-1]===1&&smc.guides[key]===0){
|
||||
oops.message.dispatchEvent(GameEvent.GuideEnd,key)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const startGuide=(key:number)=>{
|
||||
if(smc.guides[key-1]===1&&smc.guides[key]===0){
|
||||
oops.message.dispatchEvent(GameEvent.GuideStart,key)
|
||||
}
|
||||
}
|
||||
/** 引导步骤配置接口 */
|
||||
export interface IGuideStep {
|
||||
/** 步骤ID */
|
||||
id: string;
|
||||
/** 步骤类型 */
|
||||
type: GuideStepType;
|
||||
/** 目标节点路径(用于查找目标节点) */
|
||||
key: number;
|
||||
targetPath?: string;
|
||||
tipParent?: string;
|
||||
/** 提示文本 */
|
||||
tipText?: string;
|
||||
/** 提示文本偏移 */
|
||||
tipOffset?: { x: number, y: number };
|
||||
/** 手指动画位置偏移 */
|
||||
handOffset?: { x: number, y: number };
|
||||
/** 下一步骤ID */
|
||||
nextStep?: string;
|
||||
/** 是否可跳过 */
|
||||
skippable?: boolean;
|
||||
/** 触发条件 */
|
||||
condition?: () => boolean;
|
||||
/** 对应的UI界面ID */
|
||||
uiId?: UIID;
|
||||
/** 等待时间 */
|
||||
waitTime?: number;
|
||||
/** 结束事件 */
|
||||
end_event?: string;
|
||||
/** 是否禁用输入 */
|
||||
noInput?: boolean;
|
||||
}
|
||||
|
||||
/** 引导配置数据 */
|
||||
export const GuideConfig: { [key: number]: IGuideStep } = {
|
||||
0: {
|
||||
id: "welcome", type: GuideStepType.WAIT,key:0,
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/start/name",
|
||||
tipText: "伟大的勇者,欢迎来到 『像素模拟战』",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
nextStep: "start_battle", waitTime: 5, end_event: "click", noInput: true,
|
||||
},
|
||||
1: {
|
||||
id: "start_battle", type: GuideStepType.CLICK,key:1,
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/start/name",
|
||||
tipText: "请带领您的英雄抵御兽人的入侵吧!",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
// 42 45是手指的偏移量 0 0是提示的偏移量
|
||||
},
|
||||
2: {
|
||||
id: "hero_page", type: GuideStepType.CLICK,key:2,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/btns/heros",
|
||||
tipText: "在酒馆招募更多英雄增强队伍",
|
||||
handOffset: { x: 42, y: -45 }, tipOffset: { x: 0, y: 600 },
|
||||
},
|
||||
3: {
|
||||
id: "to_hero_info", type: GuideStepType.CLICK,key:3,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/heros_page",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
4: {
|
||||
id: "do_hero_info", type: GuideStepType.CLICK,key:4,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/Hinfo/unLock",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
5: {
|
||||
id: "up_lv_hero", type: GuideStepType.CLICK,key:5,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/Hinfo/upBtn",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
6: {
|
||||
id: "close_hinfo", type: GuideStepType.CLICK,key:6,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/Hinfo/back",
|
||||
handOffset: { x: 42, y: -45 }
|
||||
},
|
||||
7: {
|
||||
id: "to_mission", type: GuideStepType.CLICK,key:7,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/btns/fight",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
8: {
|
||||
id: "to_add_hero", type: GuideStepType.CLICK,key:8,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/readyheros/hero3",
|
||||
tipText: "可以随时调整上阵英雄",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
9: {
|
||||
id: "to_hero_select", type: GuideStepType.CLICK,key:9,
|
||||
// 使用相对路径,从场景根节点开始查找
|
||||
targetPath: "root/gui/LayerUI/hero_select/main/view/heros/hero2",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
},
|
||||
10: {
|
||||
id: "start_battle", type: GuideStepType.CLICK,key:10,
|
||||
targetPath: "root/gui/LayerUI/role_controller/mission_home/start/name",
|
||||
tipText: "享受战斗的乐趣吧!",
|
||||
handOffset: { x: 42, y: -45 },
|
||||
// 42 45是手指的偏移量 0 0是提示的偏移量
|
||||
},
|
||||
};
|
||||
|
||||
/** 引导配置数组(用于兼容性) */
|
||||
export const GuideConfigArray: IGuideStep[] = Object.values(GuideConfig);
|
||||
|
||||
/** 结束事件到引导索引的映射 */
|
||||
export const EndEventToKey: { [key: string]: number[] } = {
|
||||
[GameEvent.UpdateFightHero]: [4],
|
||||
[GameEvent.MonDead]: [1],
|
||||
[GameEvent.HeroLvUp]: [5],
|
||||
// 示例:一个事件对应多个引导步骤
|
||||
// [GameEvent.BattleStart]: [2, 3, 4], // 战斗开始时触发多个引导
|
||||
// [GameEvent.LevelUp]: [5, 6, 7], // 升级时触发多个引导
|
||||
// [GameEvent.HeroUnlock]: [8, 9], // 解锁英雄时触发多个引导
|
||||
// [GameEvent.MissionComplete]: [10, 11, 12], // 任务完成时触发多个引导
|
||||
}
|
||||
|
||||
/** 通过 end_event 查找引导索引数组 */
|
||||
export function findGuidesByEndEvent(event: string): number[] {
|
||||
return EndEventToKey[event] || [];
|
||||
}
|
||||
|
||||
/** 通过 end_event 查找引导索引(保持向后兼容) */
|
||||
export function findGuideByEndEvent(event: string): number | undefined {
|
||||
const guides = EndEventToKey[event];
|
||||
return guides && guides.length > 0 ? guides[0] : undefined;
|
||||
}
|
||||
|
||||
/** 通过引导ID查找引导索引 */
|
||||
export function findGuideIndexById(guideId: string): number {
|
||||
for (const [key, guide] of Object.entries(GuideConfig)) {
|
||||
if (guide.id === guideId) {
|
||||
return parseInt(key);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/** 通过引导ID查找引导配置 */
|
||||
export function findGuideById(guideId: string): IGuideStep | undefined {
|
||||
for (const guide of Object.values(GuideConfig)) {
|
||||
if (guide.id === guideId) {
|
||||
return guide;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/** 通过数字ID查找引导配置 */
|
||||
export function findGuideByNumberId(numberId: number): IGuideStep | undefined {
|
||||
return GuideConfig[numberId];
|
||||
}
|
||||
|
||||
/** 获取所有引导ID列表 */
|
||||
export function getAllGuideIds(): number[] {
|
||||
return Object.keys(GuideConfig).map(key => parseInt(key));
|
||||
}
|
||||
|
||||
/** 获取引导配置总数 */
|
||||
export function getGuideConfigCount(): number {
|
||||
return Object.keys(GuideConfig).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用示例:如何使用新的数字ID配置格式
|
||||
*
|
||||
* 1. 配置格式:
|
||||
* export const GuideConfig: { [key: number]: IGuideStep } = {
|
||||
* 0: { id: "welcome", ... },
|
||||
* 1: { id: "start_battle", ... },
|
||||
* 2: { id: "hero_page", ... },
|
||||
* }
|
||||
*
|
||||
* 2. 通过数字ID查找引导:
|
||||
* const guide = findGuideByNumberId(0); // 直接通过数字ID查找
|
||||
*
|
||||
* 3. 通过字符串ID查找引导:
|
||||
* const guide = findGuideById("welcome"); // 通过字符串ID查找
|
||||
*
|
||||
* 4. 获取引导的数字索引:
|
||||
* const index = findGuideIndexById("welcome"); // 返回 0
|
||||
*
|
||||
* 5. 事件映射配置:
|
||||
* export const EndEventToKey: { [key: string]: number[] } = {
|
||||
* [GameEvent.BattleStart]: [2, 3, 4], // 一个事件对应多个引导
|
||||
* }
|
||||
*
|
||||
* 6. 启动引导:
|
||||
* oops.message.dispatchEvent(GameEvent.GuideStart, 0); // 启动ID为0的引导
|
||||
*
|
||||
* 7. 优势:
|
||||
* - 数字ID与 smc.guides 数组索引完全对应
|
||||
* - 支持一个事件触发多个引导
|
||||
* - 向后兼容,现有代码无需大幅修改
|
||||
* - 便于扩展新的引导步骤
|
||||
* - 数组索引从0开始,符合编程习惯
|
||||
*/
|
||||
|
||||
/** 引导管理器配置 */
|
||||
export interface IGuideManagerConfig {
|
||||
/** 是否启用引导 */
|
||||
enabled: boolean;
|
||||
/** 引导配置文件路径 */
|
||||
configPath: string;
|
||||
/** 引导进度保存键 */
|
||||
progressKey: string;
|
||||
/** 默认引导ID */
|
||||
defaultGuideId: string;
|
||||
/** 引导层优先级 */
|
||||
layerPriority: number;
|
||||
}
|
||||
|
||||
/** 默认引导管理器配置 */
|
||||
export const DefaultGuideConfig: IGuideManagerConfig = {
|
||||
enabled: true,
|
||||
configPath: "config/Guide",
|
||||
progressKey: "guide_progress",
|
||||
defaultGuideId: "welcome",
|
||||
layerPriority: 1000
|
||||
};
|
||||
|
||||
/** 引导事件类型 */
|
||||
export enum GuideEventType {
|
||||
/** 引导开始 */
|
||||
GUIDE_START = "guide_start",
|
||||
/** 引导步骤完成 */
|
||||
STEP_COMPLETE = "step_complete",
|
||||
/** 引导跳过 */
|
||||
GUIDE_SKIP = "guide_skip",
|
||||
/** 引导完成 */
|
||||
GUIDE_COMPLETE = "guide_complete",
|
||||
/** 引导错误 */
|
||||
GUIDE_ERROR = "guide_error"
|
||||
}
|
||||
|
||||
/** 引导步骤状态 */
|
||||
export enum GuideStepStatus {
|
||||
/** 未开始 */
|
||||
NOT_STARTED = "not_started",
|
||||
/** 进行中 */
|
||||
IN_PROGRESS = "in_progress",
|
||||
/** 已完成 */
|
||||
COMPLETED = "completed",
|
||||
/** 已跳过 */
|
||||
SKIPPED = "skipped"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "8668f7df-174a-4b7a-9c82-370e572d0d35",
|
||||
"uuid": "45be33eb-bf68-484f-80d7-117b2532ec7f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
@@ -1,60 +0,0 @@
|
||||
export enum FightSet {
|
||||
FRIEND_WAVE_UP=3, //伙伴登场波次
|
||||
BOSS_WAVE_UP_1=3, //boss登场波次
|
||||
BOSS_WAVE_UP_2=5, //boss登场波次
|
||||
BOSS_WAVE_UP_3=7, //boss登场波次
|
||||
EQUIP_WAVE_UP_1=4, //装备登场波次
|
||||
EQUIP_WAVE_UP_2=6, //装备登场波次
|
||||
EQUIP_WAVE_UP_3=8, //装备登场波次
|
||||
SKILL_WAVE_UP_1=2, //技能登场波次
|
||||
SKILL_WAVE_UP_2=5, //技能登场波次
|
||||
SKILL_WAVE_UP_3=7, //技能登场波次
|
||||
MON_WAVE_TIME=10,//怪物波次时间
|
||||
ATK_ADD_COUNT=4,//伙伴攻击力增加
|
||||
ATK_ADD_GLOD=1,//金币增加
|
||||
CRIT_DAMAGE=50,//暴击伤害
|
||||
DOUBLE_ATK_RATE=100,//额外攻击默认概率
|
||||
GREEN_GOLD=1,//绿色金币
|
||||
BLUE_GOLD=2,//蓝色金币
|
||||
PURPLE_GOLD=3,//紫色金币
|
||||
ORANGE_GOLD=4,//橙色金币
|
||||
BURN_COUNT=5,//默认易伤次数 5秒
|
||||
STUN_TIME=0.5,//默认晕时间
|
||||
WEAPON_LV=2,//武器等级
|
||||
SHIELD_LV=3,//护盾等级
|
||||
ARMOR_LV=4,//防具等级
|
||||
ACCESSORY_LV=5,//饰品等级
|
||||
ATKED_TO_POWER=15,//被攻击涨能量
|
||||
ATK_TO_POWER=10,//攻击涨能量
|
||||
CRIT_TO_POWER=15,//暴击涨能量
|
||||
DODGE_TO_POWER=15,//闪避涨能量
|
||||
ONE_WAVE_TIME=30,//单波时间
|
||||
DOWN_TIME=5,//倒计时时间
|
||||
MORE_RC=10,//更多次数 广告获取的次数
|
||||
TAL_NUM=3,//天赋数量
|
||||
HEARTPOS=-320,//基地位置
|
||||
HERO_MAX_NUM=3,//英雄最大数量
|
||||
// ATK_TO_ATK_RATIO=0.1,
|
||||
// ATK_TO_HP_RATIO=0.2,
|
||||
// ATK_TO_SHIELD_RATIO=2,
|
||||
// ATK_LINES = 3, //英雄数
|
||||
// MON_GOLD_ADD =2,
|
||||
// MON_COIN_ADD=2,
|
||||
// COIN_ADD=1,
|
||||
// DEF_RATE=0.7,
|
||||
// DODGE_MAX=70,
|
||||
// HERO_NUM=3,
|
||||
// AP_UPDATE_RATE=100,
|
||||
// AP_CHANGE_RATE=0,
|
||||
}
|
||||
|
||||
export const TooltipTypes = {
|
||||
life:1,
|
||||
health:2,
|
||||
skill:3,
|
||||
crit:4,
|
||||
uskill:5,
|
||||
lvup:6,
|
||||
apup:7,
|
||||
hpup:8,
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "26aee2e6-ab33-4155-a0aa-221c6be8d030",
|
||||
"uuid": "c61d2d53-67ba-4933-8139-25a6bc271b8a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v3 } from "cc"
|
||||
import { FacSet } from "./BoxSet"
|
||||
import { FacSet } from "./GameSet"
|
||||
import { smc } from "../SingletonModuleComp"
|
||||
import { BuffConf } from "./SkillSet"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { BoxSet, FacSet } from "../common/config/GameSet";
|
||||
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { _decorator, Animation, AnimationState, CCClass, Component, } from "cc";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { FacSet } from "../common/config/BoxSet";
|
||||
import { FacSet } from "../common/config/GameSet";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HeroAnmComp')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { FacSet } from "../common/config/BoxSet";
|
||||
import { FacSet } from "../common/config/GameSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { FightSet } from "../common/config/GameSet";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { FacSet } from "../common/config/BoxSet";
|
||||
import { FacSet } from "../common/config/GameSet";
|
||||
import { HType } from "../common/config/heroSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@ import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,insta
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroSpine } from "./HeroSpine";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { BoxSet, FacSet } from "../common/config/GameSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { EAnmConf, SkillSet,} from "../common/config/SkillSet";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { TooltipTypes } from "../common/config/Mission";
|
||||
import { TooltipTypes } from "../common/config/GameSet";
|
||||
import { Attrs, } from "../common/config/HeroAttrs";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { Tooltip } from "../skill/Tooltip";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { instantiate, Node, Prefab, Vec3 ,v3,resources,SpriteFrame,Sprite,Sprite
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { BoxSet, FacSet } from "../common/config/GameSet";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { BuffConf, SkillSet } from "../common/config/SkillSet";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { FacSet } from "../common/config/BoxSet";
|
||||
import { FacSet } from "../common/config/GameSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
|
||||
/** 怪物移动组件 */
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "c7b87b89-72d6-4bf8-9ed2-ead66b613984",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,220 +0,0 @@
|
||||
import { _decorator, director, Node } from "cc";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GuideConfig, GuideConfigArray, GuideStepType, IGuideStep, findGuideByEndEvent, findGuideById, findGuideIndexById, findGuideByNumberId, finishCurrGuide, startGuide } from "../common/config/Guide";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
const { ccclass } = _decorator;
|
||||
|
||||
/** 新手引导组件 */
|
||||
@ccclass('GuideConComp')
|
||||
export class GuideConComp extends CCComp {
|
||||
|
||||
/** Cocos Creator 组件生命周期方法 */
|
||||
onLoad() {
|
||||
console.log("[GuideConComp] onLoad 被调用");
|
||||
this.on(GameEvent.GuideStart, this.GuideStart, this);
|
||||
this.on(GameEvent.GuideEnd, this.GuideEnd, this);
|
||||
}
|
||||
|
||||
start() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
/** 初始化引导管理器 */
|
||||
init() {
|
||||
console.log("[GuideConComp] init");
|
||||
this.initializeGuideProgress();
|
||||
// 移除自动启动第一个引导,所有引导都变成触发式
|
||||
// this.checkFirstGuide();
|
||||
}
|
||||
|
||||
/** 初始化引导进度数组 */
|
||||
private initializeGuideProgress() {
|
||||
// 确保 smc.guides 存在且长度匹配
|
||||
if (!smc.guides || smc.guides.length !== GuideConfigArray.length) {
|
||||
smc.guides = new Array(GuideConfigArray.length).fill(0);
|
||||
smc.syncGuide()
|
||||
console.log("[GuideCon] 初始化 smc.guides 为全0");
|
||||
}
|
||||
}
|
||||
GuideStart(e: any, data: any) {
|
||||
console.log("[GuideCon] 监听到开始引导 key: ", data);
|
||||
smc.current_guide=data
|
||||
if(this.isAllGuidesCompleted()) return
|
||||
const guide = findGuideByNumberId(data);
|
||||
if (guide) this.displayStep(guide);
|
||||
|
||||
}
|
||||
GuideEnd(e: any, data: any) {
|
||||
console.log("[GuideCon] 监听到结束引导 key: ", data);
|
||||
this.completeGuide(data)
|
||||
}
|
||||
|
||||
/** 显示引导步骤 */
|
||||
private displayStep(step: IGuideStep) {
|
||||
console.log("[Tutorial] 根据step类型显示引导", step);
|
||||
switch (step.type) {
|
||||
case GuideStepType.TIP:
|
||||
this.showTip(step);
|
||||
break;
|
||||
case GuideStepType.CLICK:
|
||||
this.showClickGuide(step);
|
||||
break;
|
||||
case GuideStepType.DRAG:
|
||||
this.showDragGuide(step);
|
||||
break;
|
||||
case GuideStepType.WAIT:
|
||||
this.showWaitGuide(step);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** 信息引导 */
|
||||
private showTip(step: IGuideStep) {
|
||||
this.showGuideStepUI(step);
|
||||
this.scheduleOnce(() => {
|
||||
this.onStepCompleted(step);
|
||||
}, step.waitTime ?? 2000);
|
||||
}
|
||||
|
||||
/** 点击引导 */
|
||||
private showClickGuide(step: IGuideStep) {
|
||||
console.log("[Tutorial] 显示点击引导", step);
|
||||
// if (!step.targetPath) {
|
||||
// console.error("[Tutorial] 点击引导缺少目标路径");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// const targetNode = this.findTargetNode(step.targetPath);
|
||||
// if (!targetNode) {
|
||||
// console.error(`[Tutorial] 找不到目标节点: ${step.targetPath}`);
|
||||
// return;
|
||||
// }
|
||||
// let tipParent:Node|null=null;
|
||||
// if(step.tipParent){
|
||||
// tipParent = this.findTargetNode(step.tipParent);
|
||||
// }else{
|
||||
// tipParent=targetNode;
|
||||
// }
|
||||
// console.log("[Tutorial] 开始点击引导UI", step.targetPath);
|
||||
this.showGuideStepUI(step);
|
||||
}
|
||||
|
||||
/** 显示拖拽引导 */
|
||||
private showDragGuide(step: IGuideStep) {
|
||||
console.log("[Tutorial] 显示拖拽引导:", step.id);
|
||||
this.showGuideStepUI(step);
|
||||
}
|
||||
/** 显示等待引导 */
|
||||
private showWaitGuide(step: IGuideStep) {
|
||||
console.log("[Tutorial] 显示等待引导:", step.id);
|
||||
this.showGuideStepUI(step);
|
||||
this.scheduleOnce(() => {
|
||||
this.onStepCompleted(step);
|
||||
}, step.waitTime ?? 2);
|
||||
|
||||
// 触摸监听器现在由 GuideSetpComp 管理
|
||||
}
|
||||
|
||||
/** 步骤完成回调 */
|
||||
private onStepCompleted(step: IGuideStep) {
|
||||
console.log(`[Tutorial] 步骤完成: ${step.id}`);
|
||||
// 检查是否有下一个引导
|
||||
if (step.nextStep && step.nextStep.trim() !== "") {
|
||||
const nextGuide = findGuideById(step.nextStep);
|
||||
if (nextGuide && !this.isGuideCompleted(nextGuide.id)) {
|
||||
console.log(`[GuideCon] 自动开始下一个引导: ${nextGuide.id}`);
|
||||
startGuide(nextGuide.key)
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 引导完成,关闭UI
|
||||
this.closeGuideStepUI();
|
||||
}
|
||||
|
||||
private completeAllGuide(){
|
||||
smc.guides = new Array(GuideConfigArray.length).fill(1);
|
||||
smc.syncGuide()
|
||||
}
|
||||
/** 完成指定引导 */
|
||||
private completeGuide(key:any) {
|
||||
smc.finishGuide(key);
|
||||
this.closeGuideStepUI()
|
||||
console.log(`[GuideCon] 引导 ${key} 已完成,进度数组: ${JSON.stringify(smc.guides)}`);
|
||||
}
|
||||
|
||||
/** 判断指定引导是否已完成 */
|
||||
private isGuideCompleted(guideId: string): boolean {
|
||||
const guideIndex = findGuideIndexById(guideId);
|
||||
if (guideIndex !== -1 && guideIndex < GuideConfigArray.length) {
|
||||
return smc.guides[guideIndex] === 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** 判断所有引导是否已完成 */
|
||||
private isAllGuidesCompleted(): boolean {
|
||||
return smc.guides.every(stepStatus => stepStatus === 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 打开引导UI */
|
||||
private showGuideStepUI(step: IGuideStep) {
|
||||
console.log(`[GuideCon] 开始打开UI: ${step.id}, uiId: ${UIID.Guide}`);
|
||||
|
||||
// 关闭之前的引导UI
|
||||
if (oops.gui.has(UIID.Guide)) {
|
||||
oops.gui.remove(UIID.Guide);
|
||||
console.log("[Tutorial] 关闭之前的引导UI", UIID.Guide);
|
||||
}
|
||||
|
||||
this.doOpenGuideStepUI(step);
|
||||
}
|
||||
|
||||
doOpenGuideStepUI(step: IGuideStep) {
|
||||
try {
|
||||
console.log("[Tutorial] 打开新的引导UI", UIID.Guide);
|
||||
oops.gui.open(UIID.Guide, {
|
||||
step: step,
|
||||
stepIndex: 0,
|
||||
totalSteps: 1,
|
||||
callbacks: {
|
||||
onStepComplete: this.onStepCompleted.bind(this),
|
||||
onComplete: this.completeAllGuide.bind(this)
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`[GuideCon] 成功打开引导步骤UI: ${UIID.Guide}`);
|
||||
} catch (error) {
|
||||
console.error(`[GuideCon] 打开引导步骤UI失败: ${UIID.Guide}`, error);
|
||||
oops.gui.toast(step.tipText );
|
||||
}
|
||||
}
|
||||
|
||||
/** 关闭引导步骤UI */
|
||||
private closeGuideStepUI() {
|
||||
console.log("[GuideCon] 关闭引导步骤UI", UIID.Guide);
|
||||
oops.gui.remove(UIID.Guide);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 重置引导 */
|
||||
resetGuide() {
|
||||
// 重置进度数组为全0
|
||||
smc.guides = new Array(GuideConfigArray.length).fill(0);
|
||||
smc.syncGuide()
|
||||
console.log("[GuideCon] 重置引导,进度数组重置为:", JSON.stringify(smc.guides));
|
||||
}
|
||||
|
||||
|
||||
/** 组件销毁时清理 */
|
||||
reset() {
|
||||
// this.guideProgress = []; // This line is removed
|
||||
oops.gui.remove(UIID.Guide);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "1e280c31-a416-42c8-8239-f7f6782b904b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,268 +0,0 @@
|
||||
import { _decorator, BlockInputEvents, Button, director, Label, Node, UITransform, Vec3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { IGuideStep, GuideStepType } from "../common/config/Guide";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 引导步骤UI组件 - 完整的引导UI容器 */
|
||||
@ccclass('GuideSetpComp')
|
||||
@ecs.register('GuideSetp', false)
|
||||
export class GuideSetpComp extends CCComp {
|
||||
|
||||
@property(Label)
|
||||
private tipLabel: Label = null!;
|
||||
|
||||
@property(Node)
|
||||
private tipNode: Node = null!;
|
||||
|
||||
@property(Node)
|
||||
private handNode: Node = null!;
|
||||
|
||||
@property(Button)
|
||||
private skipButton: Button = null!;
|
||||
|
||||
/** 当前引导步骤数据 */
|
||||
private currentStep: IGuideStep | null = null;
|
||||
|
||||
/** 当前步骤索引 */
|
||||
private currentStepIndex: number = 0;
|
||||
|
||||
/** 总步骤数 */
|
||||
private totalSteps: number = 0;
|
||||
/** 目标节点 */
|
||||
private _targetNode: Node | null = null;
|
||||
/** 提示父节点 */
|
||||
private _tipParent: Node | null = null;
|
||||
private _showTip: boolean = false;
|
||||
private _showHand: boolean = false;
|
||||
private _callback: any = null;
|
||||
private _noInput: any = null;
|
||||
/** 触摸监听器标志位 */
|
||||
private _hasTouchListener: boolean = false;
|
||||
|
||||
/** 添加触摸监听器 */
|
||||
private addTouchListener() {
|
||||
// 如果已经有监听器,不要重复添加
|
||||
if (this._hasTouchListener) {
|
||||
console.log("[GuideSetpComp] 触摸监听器已存在,跳过添加");
|
||||
return;
|
||||
}
|
||||
|
||||
// 直接监听当前节点的触摸事件
|
||||
this.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
|
||||
this._hasTouchListener = true;
|
||||
console.log("[GuideSetpComp] 已添加触摸监听器到当前节点,等待用户点击");
|
||||
}
|
||||
|
||||
/** 触摸开始事件处理 */
|
||||
private onTouchStart(event: any) {
|
||||
// 检查是否当前有等待引导在运行
|
||||
if (!this.currentStep || this.currentStep.type !== GuideStepType.WAIT) {
|
||||
return; // 如果没有等待引导,不处理触摸事件
|
||||
}
|
||||
|
||||
console.log("[GuideSetpComp] 检测到触摸事件,完成等待引导");
|
||||
|
||||
// 移除触摸监听器
|
||||
this.removeTouchListener();
|
||||
|
||||
// 完成当前引导
|
||||
if (this._callback && this._callback.onStepComplete) {
|
||||
this._callback.onStepComplete(this.currentStep);
|
||||
}
|
||||
}
|
||||
|
||||
/** 移除触摸监听器 */
|
||||
private removeTouchListener() {
|
||||
// 如果没有监听器,直接返回
|
||||
if (!this._hasTouchListener) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 直接从当前节点移除触摸事件监听
|
||||
this.node.off(Node.EventType.TOUCH_START, this.onTouchStart, this);
|
||||
this._hasTouchListener = false;
|
||||
console.log("[GuideSetpComp] 已移除触摸监听器");
|
||||
}
|
||||
|
||||
/** 组件初始化 */
|
||||
start() {
|
||||
console.log("[GuideSetpComp] start", this.node);
|
||||
}
|
||||
onAdded(args: any) {
|
||||
console.log("[GuideSetpComp] onAdded", this.node);
|
||||
this.initUI();
|
||||
this._noInput=this.node.getComponent(BlockInputEvents);
|
||||
this._noInput.enabled=false;
|
||||
// 如有传入的参数,直接处理
|
||||
if (args && args.step) {
|
||||
this.handleStepInfo(args);
|
||||
}
|
||||
}
|
||||
protected onEnable(): void {
|
||||
console.log("[GuideSetpComp] onEnable", this.node);
|
||||
}
|
||||
/** 处理步骤信息 */
|
||||
private handleStepInfo(data: any) {
|
||||
const { step, stepIndex, totalSteps,callbacks } = data;
|
||||
const targetNode=this.findTargetNode(step.targetPath);
|
||||
this._noInput.enabled=step.noInput??false;
|
||||
this._callback=callbacks;
|
||||
if(targetNode){
|
||||
this._targetNode=targetNode;
|
||||
this._showTip=true;
|
||||
this._showHand=true;
|
||||
}else{
|
||||
this._targetNode=this.node;
|
||||
this._showTip=true;
|
||||
this._showHand=false;
|
||||
}
|
||||
if(step.tipParent){
|
||||
this._tipParent=this.findTargetNode(step.tipParent);
|
||||
}else{
|
||||
this._tipParent=this._targetNode;
|
||||
}
|
||||
console.log("[GuideSetpComp] 处理步骤信息:", step);
|
||||
|
||||
// 显示步骤
|
||||
this.showStep(step, stepIndex, totalSteps,targetNode,this._tipParent);
|
||||
// 如果有手指位置,直接设置
|
||||
// this.setHandPosition(this._targetNode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 初始化UI */
|
||||
private initUI() {
|
||||
// 设置初始状态
|
||||
this.node.active = false;
|
||||
this.node.setSiblingIndex(1000);
|
||||
this.tipNode.active = false;
|
||||
this.handNode.active = false;
|
||||
}
|
||||
|
||||
/** 显示引导步骤 */
|
||||
showStep(step: IGuideStep, stepIndex: number, totalSteps: number,targetNode: Node,tipParent: Node) {
|
||||
this.currentStep = step;
|
||||
this.currentStepIndex = stepIndex;
|
||||
this.totalSteps = totalSteps;
|
||||
// 将handNode和tipNode从当前父节点移除
|
||||
this.handNode.parent=this._targetNode;
|
||||
// if(this._tipParent){
|
||||
// this.tipNode.parent=this._tipParent;
|
||||
// }else{
|
||||
// this.tipNode.parent=this._targetNode;
|
||||
// }
|
||||
this.handNode.setPosition(this.currentStep?.handOffset?.x || 0, this.currentStep?.handOffset?.y || 0);
|
||||
// this.tipNode.setPosition(this.currentStep?.tipOffset?.x || 0, this.currentStep?.tipOffset?.y || 0);
|
||||
// 设置setSiblingIndex最大
|
||||
this.handNode.setSiblingIndex(this._targetNode.children.length - 1);
|
||||
// this.tipNode.setSiblingIndex(this._targetNode.children.length - 1);
|
||||
// 更新UI内容
|
||||
this.updateStepContent()
|
||||
// 显示组件
|
||||
this.show();
|
||||
|
||||
// 如果是等待引导,添加触摸监听器
|
||||
if (step.type === GuideStepType.WAIT) {
|
||||
this.addTouchListener();
|
||||
}
|
||||
}
|
||||
|
||||
/** 更新步骤内容 */
|
||||
private updateStepContent() {
|
||||
if (!this.currentStep || !this._targetNode) return;
|
||||
// 根据目标节点调整tipNode的位置
|
||||
// 假设tipNode相对于目标节点是固定的偏移
|
||||
|
||||
// 更新提示文本
|
||||
if (this.tipLabel) {
|
||||
this.tipLabel.string = this.currentStep.tipText ||"";
|
||||
}
|
||||
// 控制跳过按钮显示
|
||||
|
||||
}
|
||||
|
||||
/** 显示组件 */
|
||||
private show() {
|
||||
this.node.active = true;
|
||||
if (this.tipLabel.string!="") {
|
||||
this.tipNode.active = true;
|
||||
}
|
||||
if (this.handNode) {
|
||||
this.handNode.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查找目标节点 */
|
||||
private findTargetNode(path: string): Node | null {
|
||||
console.log(`[GuideCon] 开始查找目标节点: ${path}`);
|
||||
|
||||
const pathParts = path.split('/');
|
||||
let currentNode: any = director.getScene();
|
||||
|
||||
for (const part of pathParts) {
|
||||
if (!currentNode || !currentNode.getChildByName) {
|
||||
console.error(`[GuideCon] 节点 ${part} 不存在或没有getChildByName方法`);
|
||||
break;
|
||||
}
|
||||
|
||||
const childNode = currentNode.getChildByName(part);
|
||||
if (!childNode) {
|
||||
console.error(`[GuideCon] 找不到子节点: ${part}`);
|
||||
console.log(`[GuideCon] 当前节点 ${currentNode.name} 的子节点:`, currentNode.children.map(c => c.name));
|
||||
break;
|
||||
}
|
||||
|
||||
currentNode = childNode;
|
||||
console.log("[GuideCon] 当前节点:", currentNode)
|
||||
}
|
||||
|
||||
if (currentNode) {
|
||||
console.log(`[GuideCon] 目标节点查找成功:`, currentNode.position, currentNode.getWorldPosition());
|
||||
return currentNode as Node;
|
||||
} else {
|
||||
console.error(`[GuideCon] 目标节点查找失败: ${path}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 跳过按钮点击事件 */
|
||||
private onSkipButtonClick() {
|
||||
console.log("[GuideSetpComp] 跳过按钮点击事件");
|
||||
this.tipNode.destroy();
|
||||
this.handNode.destroy();
|
||||
// oops.gui.removeByNode(this.node);
|
||||
this._callback.onComplete();
|
||||
}
|
||||
|
||||
/** 清理资源 */
|
||||
private cleanup() {
|
||||
// 移除触摸监听器
|
||||
this.removeTouchListener();
|
||||
|
||||
this.currentStep = null;
|
||||
this.currentStepIndex = 0;
|
||||
this.totalSteps = 0;
|
||||
|
||||
}
|
||||
|
||||
/** 组件销毁时清理 */
|
||||
reset() {
|
||||
this.cleanup();
|
||||
this.node.active = false;
|
||||
}
|
||||
|
||||
/** 组件销毁时清理 */
|
||||
onDestroy() {
|
||||
// 清理资源
|
||||
this.removeTouchListener();
|
||||
this.tipNode.destroy();
|
||||
this.handNode.destroy();
|
||||
console.log("[GuideSetpComp] 监听onDestroy", this.node);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "afbf476b-b77b-4ca9-979f-ada073411c72",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
// 开始战斗
|
||||
function startBattle() {
|
||||
const battle = new BattleManager();
|
||||
battle.add(BattleManagerComp);
|
||||
oops.message.dispatchEvent("BattleStart");
|
||||
}
|
||||
|
||||
// 结束战斗
|
||||
function endBattle() {
|
||||
const battle = ecs.query(ecs.allOf(BattleManager))[0];
|
||||
if (battle) {
|
||||
battle.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// 点击开始战斗按钮
|
||||
function onBattleStartClick(missionId: number) {
|
||||
BattleManager.instance.startBattle(missionId);
|
||||
}
|
||||
|
||||
// 角色死亡时检测
|
||||
function checkHeroDeath() {
|
||||
if (heroView.hp <= 0) {
|
||||
BattleManager.instance.endBattle();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3748c53e-6b9b-479f-aba0-87fc123ce161",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { FightSet} from "../common/config/Mission";
|
||||
import { FightSet} from "../common/config/GameSet";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
@@ -99,7 +99,7 @@ export class MissionComp extends CCComp {
|
||||
|
||||
to_fight(){
|
||||
smc.mission.in_fight=true
|
||||
oops.message.dispatchEvent(GameEvent.FightStart) //MissionMonComp 监听刷怪
|
||||
oops.message.dispatchEvent(GameEvent.FightStart) //GameSetMonComp 监听刷怪
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { _decorator, Component, Label, Node, tween, v3 } from 'cc';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { BoxSet, NumberFormatter } from '../common/config/BoxSet';
|
||||
import { BoxSet, NumberFormatter } from '../common/config/GameSet';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { ItemComp } from "./ItemComp";
|
||||
import { startGuide } from "../common/config/Guide";
|
||||
import { it } from "node:test";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { v3, Vec3, _decorator ,Prefab,instantiate,JsonAsset} from "cc";
|
||||
import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { smc } from "../../common/SingletonModuleComp";
|
||||
import { BoxSet } from "../../common/config/BoxSet";
|
||||
import { BoxSet } from "../../common/config/GameSet";
|
||||
import { MapViewScene } from "./MapViewScene";
|
||||
import { Timer } from "../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { oops } from "../../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { Component, Node, Prefab, _decorator ,instantiate} from 'cc';
|
||||
import { Timer } from '../../../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer';
|
||||
import {oops} from "../../../../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { BoxSet } from '../../../../common/config/BoxSet';
|
||||
import { BoxSet } from '../../../../common/config/GameSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { BoxSet } from "../common/config/GameSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
|
||||
/** 业务层对象 */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Vec3, v3, Node } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { RType, EType, SkillSet } from "../common/config/SkillSet";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { BoxSet } from "../common/config/GameSet";
|
||||
import { SkillView } from "./SkillView";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
@@ -95,7 +95,7 @@ export class SMoveDataComp extends ecs.Comp {
|
||||
}
|
||||
|
||||
// 对于直线运动,只在x轴方向延长,y轴保持不变
|
||||
const originalTarget = v3(this.targetPos.x, this.targetPos.y + BoxSet.ATK_Y);
|
||||
const originalTarget = v3(this.targetPos.x, this.targetPos.y);
|
||||
|
||||
// 计算x轴方向
|
||||
const xDirection = originalTarget.x > originalStart.x ? 1 : -1;
|
||||
|
||||
@@ -62,7 +62,8 @@ export class Skill extends ecs.Entity {
|
||||
SView.group= caster.box_group
|
||||
|
||||
this.add(SView);
|
||||
|
||||
startPos.x=startPos.x+SView.atk_x
|
||||
startPos.y=startPos.y+SView.atk_y
|
||||
// 初始化移动组件 - 从SkillView获取移动参数
|
||||
const sMoveCom = this.get(SMoveDataComp);
|
||||
sMoveCom.startPos.set(startPos);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { DTType, EType, RType, SkillConfig, SkillSet } from "../common/config/SkillSet";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { BoxSet, FacSet } from "../common/config/GameSet";
|
||||
import { SDataCom } from "./SDataCom";
|
||||
import { SMoveDataComp } from "./SMoveComp";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { BoxSet } from "../common/config/GameSet";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { TooltipCom } from "./TooltipCom";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween,
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { TooltipTypes } from "../common/config/Mission";
|
||||
import { TooltipTypes } from "../common/config/GameSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"designResolution": {
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
}
|
||||
},
|
||||
"downloadMaxConcurrency": 30
|
||||
},
|
||||
"fbx": {
|
||||
"legacyFbxImporter": {
|
||||
|
||||
Reference in New Issue
Block a user