Compare commits
8 Commits
1091b0399e
...
2a309a14d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a309a14d0 | |||
| 1f5792aa99 | |||
| 9d42c221fd | |||
| 0d76fd4050 | |||
| 187153ac9e | |||
| f35d755b74 | |||
| b24f0e2afc | |||
| 8fdd9e2c98 |
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 90
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,7 +897,7 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 90
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 8
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 90
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -894,12 +894,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 70
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 70
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -897,12 +897,12 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 100
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.2
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.15
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
100
assets/resources/game/skill/anm/atk_arrow_blue.anim
Normal file
100
assets/resources/game/skill/anm/atk_arrow_blue.anim
Normal file
@@ -0,0 +1,100 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "atk_arrow_blue",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {
|
||||
"embeddedPlayerGroups": []
|
||||
},
|
||||
"_native": "",
|
||||
"sample": 24,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"enableTrsBlending": false,
|
||||
"_duration": 0.16666666666666666,
|
||||
"_hash": 500763545,
|
||||
"_tracks": [
|
||||
{
|
||||
"__id__": 1
|
||||
}
|
||||
],
|
||||
"_exoticAnimation": null,
|
||||
"_events": [],
|
||||
"_embeddedPlayers": [],
|
||||
"_additiveSettings": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_auxiliaryCurveEntries": []
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ObjectTrack",
|
||||
"_binding": {
|
||||
"__type__": "cc.animation.TrackBinding",
|
||||
"path": {
|
||||
"__id__": 2
|
||||
},
|
||||
"proxy": null
|
||||
},
|
||||
"_channel": {
|
||||
"__id__": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.TrackPath",
|
||||
"_paths": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
"spriteFrame"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.HierarchyPath",
|
||||
"path": "E"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ComponentPath",
|
||||
"component": "cc.Sprite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ObjectCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.041666666666666664,
|
||||
0.08333333333333333,
|
||||
0.125
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a4e22",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@2b0ce",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@29738",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@faf10",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.AnimationClipAdditiveSettings",
|
||||
"enabled": false,
|
||||
"refClip": null
|
||||
}
|
||||
]
|
||||
13
assets/resources/game/skill/anm/atk_arrow_blue.anim.meta
Normal file
13
assets/resources/game/skill/anm/atk_arrow_blue.anim.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "2.0.3",
|
||||
"importer": "animation-clip",
|
||||
"imported": true,
|
||||
"uuid": "a6568e30-fa37-4afc-990f-34caeafc39b6",
|
||||
"files": [
|
||||
".cconb"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"name": "atk_arrow_blue"
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,16 @@
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 22
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -172,10 +178,7 @@
|
||||
"b": 255,
|
||||
"a": 119
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@97355",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
@@ -340,7 +343,6 @@
|
||||
"__type__": "57aabs7TE1J5obTAZczc+64",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
@@ -356,6 +358,74 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "35nW0iQNBH2bqkWAr3MVkQ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RigidBody2D",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"enabledContactListener": true,
|
||||
"bullet": false,
|
||||
"awakeOnLoad": true,
|
||||
"_group": 1,
|
||||
"_type": 0,
|
||||
"_allowSleep": false,
|
||||
"_gravityScale": 1,
|
||||
"_linearDamping": 0,
|
||||
"_angularDamping": 0,
|
||||
"_linearVelocity": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_angularVelocity": 0,
|
||||
"_fixedRotation": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "57cr7S0YpK4oEZCavwXtIX"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.BoxCollider2D",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": false,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"tag": 0,
|
||||
"_group": 1,
|
||||
"_density": 1,
|
||||
"_sensor": true,
|
||||
"_friction": 0.2,
|
||||
"_restitution": 0,
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 50,
|
||||
"height": 50
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "ebw5mObxNGGKxnJXDgX5gl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
||||
@@ -172,10 +172,7 @@
|
||||
"b": 255,
|
||||
"a": 170
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@a99aa",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
@@ -340,7 +337,6 @@
|
||||
"__type__": "57aabs7TE1J5obTAZczc+64",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
@@ -350,7 +346,7 @@
|
||||
},
|
||||
"atk_x": 0,
|
||||
"atk_y": 0,
|
||||
"_id": ""
|
||||
"_id": "a1y6MJDfVD1o+ESVz7sAtv"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
||||
@@ -20,19 +20,13 @@
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
@@ -41,10 +35,19 @@
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 20
|
||||
"__id__": 26
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -77,7 +80,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Node",
|
||||
"_name": "E",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@@ -98,8 +101,8 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"x": -16.397,
|
||||
"y": 0.755,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -139,19 +142,19 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 60,
|
||||
"height": 60
|
||||
"width": 74,
|
||||
"height": 64
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.2,
|
||||
"y": 0.2
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "93pNmvtQlLSqtTgIepyEmA"
|
||||
"fileId": "06BuaYuTlH7oarNLUv4Quo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -168,6 +171,142 @@
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a4e22",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "54o3uGyUNODo0HOzGkYqsA"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "5563D/YVpGlqqIyYnHSEwW",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Node",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"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": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 6
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "93pNmvtQlLSqtTgIepyEmA"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
@@ -175,8 +314,11 @@
|
||||
"b": 255,
|
||||
"a": 170
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@0ab4e",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
@@ -221,17 +363,17 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 9
|
||||
"__id__": 15
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 240,
|
||||
"height": 100
|
||||
"width": 40,
|
||||
"height": 10
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@@ -249,13 +391,19 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
"__id__": 17
|
||||
},
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
null
|
||||
{
|
||||
"__uuid__": "a6568e30-fa37-4afc-990f-34caeafc39b6",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": null,
|
||||
"_defaultClip": {
|
||||
"__uuid__": "a6568e30-fa37-4afc-990f-34caeafc39b6",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
@@ -266,13 +414,12 @@
|
||||
"__type__": "57aabs7TE1J5obTAZczc+64",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
"__id__": 19
|
||||
},
|
||||
"atk_x": 0,
|
||||
"atk_y": 0,
|
||||
@@ -292,7 +439,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 15
|
||||
"__id__": 21
|
||||
},
|
||||
"speed": 600,
|
||||
"controlPointSide": 1,
|
||||
@@ -326,7 +473,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
"__id__": 23
|
||||
},
|
||||
"enabledContactListener": true,
|
||||
"bullet": false,
|
||||
@@ -360,7 +507,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
"__id__": 25
|
||||
},
|
||||
"tag": 0,
|
||||
"_group": 1,
|
||||
@@ -370,13 +517,13 @@
|
||||
"_restitution": 0,
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 43.5,
|
||||
"y": 48.5
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 87,
|
||||
"height": 97
|
||||
"width": 40,
|
||||
"height": 10
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -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": ""
|
||||
},
|
||||
{
|
||||
@@ -304,7 +304,7 @@
|
||||
"bullet": false,
|
||||
"awakeOnLoad": true,
|
||||
"_group": 1,
|
||||
"_type": 1,
|
||||
"_type": 0,
|
||||
"_allowSleep": false,
|
||||
"_gravityScale": 1,
|
||||
"_linearDamping": 0,
|
||||
|
||||
@@ -1314,8 +1314,8 @@
|
||||
"rawHeight": 48,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderLeft": 80,
|
||||
"borderRight": 79,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
@@ -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": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 284 KiB |
@@ -12,7 +12,7 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('Main')
|
||||
export class Main extends Root {
|
||||
start() {
|
||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
// |EPhysics2DDrawFlags.Pair
|
||||
// |EPhysics2DDrawFlags.CenterOfMass
|
||||
// |EPhysics2DDrawFlags.Joint
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* @Author: dgflash
|
||||
* @Date: 2021-11-23 15:28:39
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-01-26 16:42:00
|
||||
*/
|
||||
|
||||
/** 碰撞分组 */
|
||||
export enum BoxSet {
|
||||
//物理碰撞tag
|
||||
SKILL_TAG=8,
|
||||
ATK_RANGE = 4,
|
||||
//group
|
||||
DEFAULT = 1,
|
||||
MONSTER = 2,
|
||||
HERO = 4,
|
||||
MONSTER_SKILL = 8,
|
||||
HERO_SKILL = 16,
|
||||
PLAYER=32,
|
||||
BOSS=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,
|
||||
}
|
||||
|
||||
/** 数字格式化工具函数 */
|
||||
export class NumberFormatter {
|
||||
/**
|
||||
* 将数字转换为易读格式
|
||||
* @param num 要转换的数字
|
||||
* @returns 格式化后的字符串
|
||||
* 例如:1234 -> "1.2k", 1234567 -> "1.2M", 1234567890 -> "1.2B"
|
||||
*/
|
||||
static formatNumber(num: number): string {
|
||||
if (num < 1000) {
|
||||
return num.toString();
|
||||
} else if (num < 1000000) {
|
||||
// 5位数用k表示 (1000-999999)
|
||||
return (num / 1000).toFixed(1).replace(/\.0$/, '') + 'k';
|
||||
} else if (num < 1000000000) {
|
||||
// 7位数用M表示 (1000000-999999999)
|
||||
return (num / 1000000).toFixed(1).replace(/\.0$/, '') + 'M';
|
||||
} else if (num < 1000000000000) {
|
||||
// 10位数用B表示 (1000000000-999999999999)
|
||||
return (num / 1000000000).toFixed(1).replace(/\.0$/, '') + 'B';
|
||||
} else {
|
||||
// 更大的数字用T表示
|
||||
return (num / 1000000000000).toFixed(1).replace(/\.0$/, '') + 'T';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将数字转换为中文格式
|
||||
* @param num 要转换的数字
|
||||
* @returns 中文格式的字符串
|
||||
* 例如:1234 -> "1.2千", 1234567 -> "1.2百万"
|
||||
*/
|
||||
static formatNumberChinese(num: number): string {
|
||||
if (num < 10000) {
|
||||
return num.toString();
|
||||
} else if (num < 100000000) {
|
||||
// 万级别
|
||||
return (num / 10000).toFixed(1).replace(/\.0$/, '') + '万';
|
||||
} else if (num < 1000000000000) {
|
||||
// 亿级别
|
||||
return (num / 100000000).toFixed(1).replace(/\.0$/, '') + '亿';
|
||||
} else {
|
||||
// 万亿级别
|
||||
return (num / 1000000000000).toFixed(1).replace(/\.0$/, '') + '万亿';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "28d11009-6d68-462a-9880-8b31cf5975fd",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
153
assets/script/game/common/config/GameSet.ts
Normal file
153
assets/script/game/common/config/GameSet.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* @Author: dgflash
|
||||
* @Date: 2021-11-23 15:28:39
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-01-26 16:42:00
|
||||
*/
|
||||
|
||||
/** 碰撞分组 */
|
||||
export enum BoxSet {
|
||||
//物理碰撞tag
|
||||
SKILL_TAG=8,
|
||||
ATK_RANGE = 4,
|
||||
//group
|
||||
DEFAULT = 1,
|
||||
MONSTER = 2,
|
||||
HERO = 4,
|
||||
// MONSTER_SKILL = 8,
|
||||
// HERO_SKILL = 16,
|
||||
// PLAYER=32,
|
||||
// BOSS=64,
|
||||
|
||||
// BOX_WIDTH = 64,
|
||||
// BOX_HEIGHT = 64,
|
||||
//地图边界
|
||||
LETF_END = -420,
|
||||
RIGHT_END = 420,
|
||||
|
||||
//游戏地平线
|
||||
GAME_LINE = 0,
|
||||
//攻击距离
|
||||
}
|
||||
|
||||
export enum FacSet {
|
||||
HERO=0,
|
||||
MON=1,
|
||||
}
|
||||
|
||||
/** 数字格式化工具函数 */
|
||||
export class NumberFormatter {
|
||||
/**
|
||||
* 将数字转换为易读格式
|
||||
* @param num 要转换的数字
|
||||
* @returns 格式化后的字符串
|
||||
* 例如:1234 -> "1.2k", 1234567 -> "1.2M", 1234567890 -> "1.2B"
|
||||
*/
|
||||
static formatNumber(num: number): string {
|
||||
if (num < 1000) {
|
||||
return num.toString();
|
||||
} else if (num < 1000000) {
|
||||
// 5位数用k表示 (1000-999999)
|
||||
return (num / 1000).toFixed(1).replace(/\.0$/, '') + 'k';
|
||||
} else if (num < 1000000000) {
|
||||
// 7位数用M表示 (1000000-999999999)
|
||||
return (num / 1000000).toFixed(1).replace(/\.0$/, '') + 'M';
|
||||
} else if (num < 1000000000000) {
|
||||
// 10位数用B表示 (1000000000-999999999999)
|
||||
return (num / 1000000000).toFixed(1).replace(/\.0$/, '') + 'B';
|
||||
} else {
|
||||
// 更大的数字用T表示
|
||||
return (num / 1000000000000).toFixed(1).replace(/\.0$/, '') + 'T';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将数字转换为中文格式
|
||||
* @param num 要转换的数字
|
||||
* @returns 中文格式的字符串
|
||||
* 例如:1234 -> "1.2千", 1234567 -> "1.2百万"
|
||||
*/
|
||||
static formatNumberChinese(num: number): string {
|
||||
if (num < 10000) {
|
||||
return num.toString();
|
||||
} else if (num < 100000000) {
|
||||
// 万级别
|
||||
return (num / 10000).toFixed(1).replace(/\.0$/, '') + '万';
|
||||
} else if (num < 1000000000000) {
|
||||
// 亿级别
|
||||
return (num / 100000000).toFixed(1).replace(/\.0$/, '') + '亿';
|
||||
} else {
|
||||
// 万亿级别
|
||||
return (num / 1000000000000).toFixed(1).replace(/\.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 enum IndexSet {
|
||||
/** 英雄基础层级 */
|
||||
HERO = 200,
|
||||
/** 一线怪物基础层级(y=120) - 层级较低,在后面 */
|
||||
MON1 = 100,
|
||||
/** 二线怪物基础层级(y=80) - 层级较高,在前面 */
|
||||
MON2 = 300,
|
||||
/** 每个怪物的层级增量,确保后生成的在前面 */
|
||||
MON_INCREMENT = 1,
|
||||
}
|
||||
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": {}
|
||||
@@ -43,6 +43,8 @@ export enum Attrs {
|
||||
HP_REGEN = 3, // 生命回复
|
||||
MP_REGEN = 4, // 魔法回复
|
||||
HEAL_EFFECT = 5, // 治疗效果
|
||||
POW_MAX = 6, // 最大怒气值
|
||||
POW_REGEN = 7, // 怒气值回复
|
||||
|
||||
// ========== 攻击属性 (10-19) ==========
|
||||
AP = 10, // 攻击力
|
||||
@@ -152,6 +154,8 @@ export const AttrsType: Record<Attrs, BType> = {
|
||||
[Attrs.SHIELD_MAX]: BType.VALUE, // 最大护盾值 - 数值型
|
||||
[Attrs.HP_REGEN]: BType.VALUE, // 生命回复 - 数值型
|
||||
[Attrs.MP_REGEN]: BType.VALUE, // 魔法回复 - 数值型
|
||||
[Attrs.POW_MAX]: BType.VALUE, // 最大怒气值 - 数值型
|
||||
[Attrs.POW_REGEN]: BType.VALUE, // 怒气值回复 - 数值型
|
||||
[Attrs.HEAL_EFFECT]: BType.RATIO, // 治疗效果 - 百分比型
|
||||
|
||||
// ========== 攻击属性(数值型) ==========
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -51,14 +51,14 @@ export const HeroPos={
|
||||
2:{pos:v3(0,100,0)},
|
||||
}
|
||||
export const MonSet = {
|
||||
0:{pos:v3(240,100,0)},
|
||||
1:{pos:v3(320,100,0)},
|
||||
2:{pos:v3(360,100,0)},
|
||||
3:{pos:v3(400,100,0)},
|
||||
4:{pos:v3(440,100,0)},
|
||||
5:{pos:v3(480,100,0)},
|
||||
6:{pos:v3(520,100,0)},
|
||||
7:{pos:v3(560,100,0)},
|
||||
0:{pos:v3(240,110,0)},
|
||||
1:{pos:v3(240,90,0)},
|
||||
2:{pos:v3(320,110,0)},
|
||||
3:{pos:v3(320,90,0)},
|
||||
4:{pos:v3(360,110,0)},
|
||||
5:{pos:v3(360,90,0)},
|
||||
6:{pos:v3(400,110,0)},
|
||||
7:{pos:v3(400,90,0)},
|
||||
}
|
||||
|
||||
export enum HeroConf{
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -28,6 +28,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
// ==================== 动态属性值 ====================
|
||||
hp: number = 100; // 当前血量
|
||||
mp: number = 100; // 当前魔法值
|
||||
pow: number = 0; // 当前怒气值
|
||||
shield: number = 0; // 当前护盾
|
||||
Attrs: any = []; // 最终属性数组(经过Buff计算后)
|
||||
NeAttrs: any = []; // 负面状态数组
|
||||
|
||||
@@ -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,16 +2,17 @@ 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";
|
||||
import { timedCom } from "../skill/timedCom";
|
||||
import { HeroInfo, HType } from "../common/config/heroSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -28,6 +29,8 @@ export class HeroViewComp extends CCComp {
|
||||
status:String = "idle"
|
||||
scale: number = 1; // 显示方向
|
||||
box_group:number = BoxSet.HERO; // 碰撞组
|
||||
usePower:boolean = false;
|
||||
useMp:boolean = false;
|
||||
// ==================== UI 节点引用 ====================
|
||||
private top_node: Node = null!;
|
||||
|
||||
@@ -65,12 +68,15 @@ export class HeroViewComp extends CCComp {
|
||||
/** 方向 */
|
||||
this.node.setScale(this.scale,1);
|
||||
this.top_node.setScale(this.scale,1);
|
||||
if(this.model && this.model.is_boss){
|
||||
this.top_node.position=v3(this.node.position.x,this.node.position.y+100,0)
|
||||
}
|
||||
// if(this.model && this.model.is_boss){
|
||||
// this.top_node.position=v3(this.node.position.x,this.node.position.y+70,0)
|
||||
// }
|
||||
/* 显示角色血*/
|
||||
this.top_node.getChildByName("hp").active = true;
|
||||
this.top_node.getChildByName("pow").active = true;
|
||||
this.usePower=HeroInfo[this.model.hero_uuid].type==HType.warrior||HeroInfo[this.model.hero_uuid].type==HType.assassin;
|
||||
this.useMp=HeroInfo[this.model.hero_uuid].type==HType.mage||HeroInfo[this.model.hero_uuid].type==HType.remote||HeroInfo[this.model.hero_uuid].type==HType.support;
|
||||
this.top_node.getChildByName("pow").active = this.usePower;
|
||||
this.top_node.getChildByName("mp").active = this.useMp;
|
||||
}
|
||||
|
||||
/** 初始化 UI 节点引用 */
|
||||
@@ -98,13 +104,15 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
// ✅ 更新 UI 显示(数据由 HeroAttrSystem 更新)
|
||||
this.hp_show(this.model.hp, this.model.Attrs[Attrs.HP_MAX]);
|
||||
this.mp_show(this.model.mp, this.model.Attrs[Attrs.MP_MAX]);
|
||||
if(this.useMp) this.mp_show(this.model.mp, this.model.Attrs[Attrs.MP_MAX]);
|
||||
if(this.usePower) this.pow_show(this.model.pow, this.model.Attrs[Attrs.POW_MAX]);
|
||||
this.show_shield(this.model.shield, this.model.Attrs[Attrs.SHIELD_MAX]);
|
||||
}
|
||||
|
||||
|
||||
/** 显示护盾 */
|
||||
private show_shield(shield: number = 0, shield_max: number = 0) {
|
||||
if(!this.top_node.active) return
|
||||
let shield_progress = shield / shield_max;
|
||||
this.node.getChildByName("shielded").active = shield > 0;
|
||||
this.top_node.getChildByName("shield").active = shield > 0;
|
||||
@@ -116,6 +124,11 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
/** 显示血量 */
|
||||
private hp_show(hp: number, hp_max: number) {
|
||||
if(hp==hp_max) {
|
||||
this.top_node.active=false;
|
||||
return
|
||||
}
|
||||
this.top_node.active=true
|
||||
let hp_progress = hp / hp_max;
|
||||
this.top_node.getChildByName("hp").getComponent(ProgressBar).progress = hp_progress;
|
||||
this.scheduleOnce(() => {
|
||||
@@ -125,12 +138,19 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
/** 显示魔法值 */
|
||||
private mp_show(mp: number, mp_max: number) {
|
||||
this.top_node.getChildByName("pow").getComponent(ProgressBar).progress = mp / mp_max;
|
||||
if(!this.top_node.active) return
|
||||
this.top_node.getChildByName("mp").getComponent(ProgressBar).progress = mp / mp_max;
|
||||
this.scheduleOnce(() => {
|
||||
this.top_node.getChildByName("pow").getChildByName("mpb").getComponent(ProgressBar).progress = mp / mp_max;
|
||||
this.top_node.getChildByName("mp").getChildByName("mpb").getComponent(ProgressBar).progress = mp / mp_max;
|
||||
}, 0.15);
|
||||
}
|
||||
private pow_show(pow: number, pow_max: number) {
|
||||
if(!this.top_node.active) return
|
||||
this.top_node.getChildByName("pow").getComponent(ProgressBar).progress = pow / pow_max;
|
||||
this.scheduleOnce(() => {
|
||||
this.top_node.getChildByName("pow").getChildByName("mpb").getComponent(ProgressBar).progress = pow / pow_max;
|
||||
}, 0.15);
|
||||
}
|
||||
|
||||
/** 升级特效 */
|
||||
private lv_up() {
|
||||
var path = "game/skill/buff/buff_lvup";
|
||||
@@ -199,10 +219,10 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
|
||||
/** 血量提示(伤害数字) */
|
||||
private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 90) {
|
||||
private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 100) {
|
||||
let tip = ecs.getEntity<Tooltip>(Tooltip);
|
||||
let x = this.node.position.x;
|
||||
let ny = this.node.getComponent(UITransform).height + 60;
|
||||
let ny = this.node.getComponent(UITransform).height + y;
|
||||
let pos = v3(x, ny, 0);
|
||||
tip.load(pos, type, value, s_uuid, this.node.parent);
|
||||
}
|
||||
@@ -290,15 +310,16 @@ export class HeroViewComp extends CCComp {
|
||||
//后退
|
||||
back(){
|
||||
if(this.model.fac==FacSet.MON) {
|
||||
let tx=this.node.position.x+5
|
||||
let tx=this.node.position.x+30
|
||||
if(tx > 320) tx=320
|
||||
tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start()
|
||||
}
|
||||
if(this.model.fac==FacSet.HERO) {
|
||||
let tx=this.node.position.x-5
|
||||
if(tx < -320) tx=-320
|
||||
tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start()
|
||||
}
|
||||
//英雄不再后退
|
||||
// if(this.model.fac==FacSet.HERO) {
|
||||
// let tx=this.node.position.x-30
|
||||
// if(tx < -320) tx=-320
|
||||
// tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start()
|
||||
// }
|
||||
}
|
||||
// 伤害计算和战斗逻辑已迁移到 HeroBattleSystem
|
||||
|
||||
|
||||
@@ -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";
|
||||
@@ -35,7 +35,7 @@ export class Monster extends ecs.Entity {
|
||||
}
|
||||
|
||||
/** 加载角色 */
|
||||
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,lv:number=1,monType:MonType=MonType.NORMAL, buffs: BuffConf[] = [],is_call=false) {
|
||||
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,lv:number=1,monType:MonType=MonType.NORMAL, buffs: BuffConf[] = [],is_call=false, lane: number = 0, spawnOrder: number = 0) {
|
||||
scale=-1
|
||||
var scene = smc.map.MapView.scene;
|
||||
var path = "game/heros/"+HeroInfo[uuid].path;
|
||||
@@ -86,10 +86,12 @@ export class Monster extends ecs.Entity {
|
||||
this.add(view);
|
||||
oops.message.dispatchEvent("monster_load",this)
|
||||
|
||||
// 初始化移动参数
|
||||
// 初始化移动参数,包括线路和生成顺序
|
||||
const move = this.get(MonMoveComp);
|
||||
move.direction = -1; // 向左移动
|
||||
move.targetX = -800; // 左边界
|
||||
move.lane = lane; // 设置线路标识
|
||||
move.spawnOrder = spawnOrder; // 设置生成顺序
|
||||
smc.vmdata.mission_data.mon_num++
|
||||
}
|
||||
|
||||
|
||||
@@ -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, IndexSet } from "../common/config/GameSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
|
||||
/** 怪物移动组件 */
|
||||
@@ -14,11 +14,17 @@ export class MonMoveComp extends ecs.Comp {
|
||||
targetX: number = 0;
|
||||
/** 是否处于移动状态 */
|
||||
moving: boolean = true;
|
||||
/** 线路标识:0=一线(y=120),1=二线(y=80) */
|
||||
lane: number = 0;
|
||||
/** 生成顺序:用于同线路内的层级排序,数值越大越晚生成,层级越前 */
|
||||
spawnOrder: number = 0;
|
||||
|
||||
reset() {
|
||||
this.direction = 1;
|
||||
this.targetX = 0;
|
||||
this.moving = true;
|
||||
this.lane = 0;
|
||||
this.spawnOrder = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,31 +140,55 @@ export class MonMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
|
||||
|
||||
/** 更新渲染层级 */
|
||||
private updateRenderOrder(entity: ecs.Entity) {
|
||||
const currentView = entity.get(HeroViewComp);
|
||||
const currentModel = entity.get(HeroAttrsComp);
|
||||
// 直接调用全局更新方法,避免重复计算
|
||||
this.updateAllUnitsRenderOrder();
|
||||
}
|
||||
|
||||
// 查找所有怪物单位
|
||||
const allUnits = ecs.query(ecs.allOf(HeroAttrsComp, HeroViewComp))
|
||||
.filter(e => {
|
||||
const otherModel = e.get(HeroAttrsComp);
|
||||
return otherModel.fac === currentModel.fac; // 按阵营分组
|
||||
})
|
||||
.map(e => e);
|
||||
/** 更新所有单位的渲染层级 */
|
||||
private updateAllUnitsRenderOrder() {
|
||||
// 获取所有单位
|
||||
const allUnits = ecs.query(ecs.allOf(HeroAttrsComp, HeroViewComp));
|
||||
|
||||
// 按x坐标排序:x坐标越大(越前面)的显示在上层
|
||||
const sortedUnits = allUnits.sort((a, b) => {
|
||||
const viewA = a.get(HeroViewComp);
|
||||
const viewB = b.get(HeroViewComp);
|
||||
if (!viewA || !viewA.node || !viewB || !viewB.node) return 0;
|
||||
const posA = viewA.node.position.x;
|
||||
const posB = viewB.node.position.x;
|
||||
return posA - posB; // x坐标从小到大排序
|
||||
// 创建单位数组,包含层级信息
|
||||
const unitsWithOrder: Array<{
|
||||
entity: ecs.Entity,
|
||||
view: HeroViewComp,
|
||||
order: number
|
||||
}> = [];
|
||||
|
||||
allUnits.forEach(e => {
|
||||
const model = e.get(HeroAttrsComp);
|
||||
const view = e.get(HeroViewComp);
|
||||
|
||||
if (!view || !view.node || !model) return;
|
||||
|
||||
let order = 0;
|
||||
|
||||
if (model.fac === FacSet.HERO) {
|
||||
// 英雄层级:基础层级 + y轴位置影响
|
||||
order = IndexSet.HERO + Math.floor(view.node.position.y);
|
||||
} else if (model.fac === FacSet.MON) {
|
||||
const move = e.get(MonMoveComp);
|
||||
if (move) {
|
||||
// 怪物层级:基于线路和生成顺序
|
||||
const baseLane = move.lane === 0 ? IndexSet.MON1 : IndexSet.MON2;
|
||||
order = baseLane + (move.spawnOrder * IndexSet.MON_INCREMENT);
|
||||
}
|
||||
}
|
||||
|
||||
unitsWithOrder.push({
|
||||
entity: e,
|
||||
view: view,
|
||||
order: order
|
||||
});
|
||||
});
|
||||
|
||||
// 设置渲染顺序:x坐标越大的显示在上层(index越大,层级越高)
|
||||
sortedUnits.forEach((unit, index) => {
|
||||
const model = unit.get(HeroViewComp);
|
||||
model.node.setSiblingIndex(index); // 直接使用index,x坐标大的index大,层级高
|
||||
// 按层级排序:order值小的在后面(siblingIndex小),order值大的在前面(siblingIndex大)
|
||||
unitsWithOrder.sort((a, b) => a.order - b.order);
|
||||
|
||||
// 设置 siblingIndex
|
||||
unitsWithOrder.forEach((unit, index) => {
|
||||
unit.view.node.setSiblingIndex(index);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -166,8 +166,8 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
|
||||
// 这里可以调用 SkillConComp 的目标选择逻辑
|
||||
// 暂时返回默认位置
|
||||
if (caster==null ) return
|
||||
if(caster.ent == null) return
|
||||
if (caster == null) return targets;
|
||||
if (caster.ent == null) return targets;
|
||||
const heroAttrs = caster.ent.get(HeroAttrsComp);
|
||||
const fac = heroAttrs?.fac ?? 0;
|
||||
const defaultX = fac === 0 ? 400 : -400;
|
||||
|
||||
@@ -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 监听刷怪
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { GameEvent } from "../common/config/GameEvent";
|
||||
// 导入肉鸽配置
|
||||
import { MonType, EventType, getStageMonConfigs} from "./RogueConfig";
|
||||
import { BuffConf } from "../common/config/SkillSet";
|
||||
import { IndexSet } from "../common/config/GameSet";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -30,6 +31,8 @@ export class MissionMonCompComp extends CCComp {
|
||||
private isPausing: boolean = false; // 是否正在暂停
|
||||
private currentEvent: EventType | null = null; // 当前关卡的随机事件
|
||||
private eventProcessed: boolean = false; // 事件是否已处理
|
||||
/** 全局生成顺序计数器,用于层级管理 */
|
||||
private globalSpawnOrder: number = 0;
|
||||
|
||||
|
||||
onLoad(){
|
||||
@@ -46,6 +49,8 @@ export class MissionMonCompComp extends CCComp {
|
||||
fight_ready(){
|
||||
// console.log("[MissionMonComp]:fight_ready")
|
||||
smc.vmdata.mission_data.mon_num=0
|
||||
// 重置生成顺序计数器
|
||||
this.globalSpawnOrder = 0
|
||||
this.do_mon_wave()
|
||||
}
|
||||
|
||||
@@ -185,8 +190,14 @@ export class MissionMonCompComp extends CCComp {
|
||||
let scale = -1;
|
||||
let pos: Vec3 = v3(MonSet[i].pos);
|
||||
|
||||
// 生成怪物
|
||||
mon.load(pos,scale,uuid,lv,monType,buffs);
|
||||
// 根据位置判断线路:y=110为一线(lane=0),y=80为二线(lane=1)
|
||||
const lane = pos.y === 110 ? 0 : 1;
|
||||
|
||||
// 递增全局生成顺序
|
||||
this.globalSpawnOrder++;
|
||||
|
||||
// 生成怪物,传递线路和生成顺序
|
||||
mon.load(pos, scale, uuid, lv, monType, buffs, false, lane, this.globalSpawnOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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";
|
||||
@@ -29,6 +29,8 @@ export class SkillView extends CCComp {
|
||||
SConf:SkillConfig=null;
|
||||
sData:SDataCom=null;
|
||||
s_uuid:number=1001
|
||||
// 已命中目标追踪,防止重复伤害
|
||||
private hitTargets: Set<string> = new Set();
|
||||
start() {
|
||||
this.SConf = SkillSet[this.s_uuid]
|
||||
this.sData=this.ent.get(SDataCom)
|
||||
@@ -47,15 +49,23 @@ export class SkillView extends CCComp {
|
||||
|
||||
}
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
if(oCol.group==this.group) return
|
||||
if (!this.SConf) return;
|
||||
if(this.SConf.EType!=EType.collision) return
|
||||
const targetId = oCol.uuid;
|
||||
if(this.hitTargets.has(targetId)) return; // 已经命中过,跳过
|
||||
// 记录命中目标
|
||||
|
||||
// if (!this.SConf) return;
|
||||
// if(this.SConf.EType!=EType.collision) return
|
||||
if(oCol.group == seCol.group) return
|
||||
let target = oCol.getComponent(HeroViewComp)
|
||||
if(target == null) return;
|
||||
let model=target.ent.get(HeroAttrsComp)
|
||||
if(!model) return
|
||||
console.log(`[skillView] 碰撞3`,oCol.group,seCol.group,model);
|
||||
if(model == null) return
|
||||
if(model.is_dead) return
|
||||
// console.log(`[skillView] 碰撞5[${this.sData.caster.box_group}][${this.sData.caster.ent.get(HeroAttrsComp).hero_name}][${this.sData.caster.ent.eid}]的[${this.group}] [${this.SConf.name}]碰撞了 [${oCol.group}][ ${oCol.getComponent(HeroViewComp).ent.get(HeroAttrsComp).hero_name}][${oCol.getComponent(HeroViewComp).ent.eid}]`);
|
||||
if(this.sData.fac == model.fac) return;
|
||||
// 检查是否已经命中过这个目标
|
||||
console.log(`[skillView] 碰撞5[${this.sData.caster.box_group}][${this.sData.caster.ent.get(HeroAttrsComp).hero_name}][${this.sData.caster.ent.eid}]的[${this.group}] [${this.SConf.name}]碰撞了 [${oCol.group}][ ${oCol.getComponent(HeroViewComp).ent.get(HeroAttrsComp).hero_name}][${oCol.getComponent(HeroViewComp).ent.eid}]`);
|
||||
this.hitTargets.add(targetId);
|
||||
this.apply_damage(target)
|
||||
}
|
||||
|
||||
@@ -115,6 +125,18 @@ export class SkillView extends CCComp {
|
||||
apply_damage(target:HeroViewComp,is_range:boolean=false){
|
||||
if(target == null) return;
|
||||
if (!this.SConf) return;
|
||||
|
||||
// 检查是否已经命中过这个目标(除非是范围伤害)
|
||||
const targetId = target.node.uuid;
|
||||
if(!is_range && this.hitTargets.has(targetId)) {
|
||||
return; // 已经命中过,跳过
|
||||
}
|
||||
|
||||
// 记录命中目标(除非是范围伤害)
|
||||
if(!is_range) {
|
||||
this.hitTargets.add(targetId);
|
||||
}
|
||||
|
||||
console.log(`[skillView] 伤害 [${this.group}][${this.sData.caster.ent.get(HeroAttrsComp).hero_name}][${this.sData.caster.ent.eid}]的 [${this.SConf.name}]对 [${target.box_group}][ ${target.ent.get(HeroAttrsComp).hero_name}][${target.ent.eid}]`);
|
||||
// if(this.sData.hit_count > this.SConf.hit_num) return 不能超出 最大伤害数量
|
||||
// 使用伤害队列系统处理伤害
|
||||
|
||||
@@ -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