清理之前文件 + 再次取消碰撞检测
This commit is contained in:
@@ -59,16 +59,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 89
|
"__id__": 89
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 91
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 93
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 95
|
"__id__": 91
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1409,74 +1403,6 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "654wWWbWpMeYe/ywRBGTMP"
|
"fileId": "654wWWbWpMeYe/ywRBGTMP"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "cc.RigidBody2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 92
|
|
||||||
},
|
|
||||||
"enabledContactListener": true,
|
|
||||||
"bullet": false,
|
|
||||||
"awakeOnLoad": true,
|
|
||||||
"_group": 4,
|
|
||||||
"_type": 3,
|
|
||||||
"_allowSleep": true,
|
|
||||||
"_gravityScale": 1,
|
|
||||||
"_linearDamping": 0,
|
|
||||||
"_angularDamping": 0,
|
|
||||||
"_linearVelocity": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"_angularVelocity": 0,
|
|
||||||
"_fixedRotation": false,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "4a5pvY6p9MZIAimZnbetm5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.BoxCollider2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 94
|
|
||||||
},
|
|
||||||
"tag": 0,
|
|
||||||
"_group": 4,
|
|
||||||
"_density": 1,
|
|
||||||
"_sensor": true,
|
|
||||||
"_friction": 0.2,
|
|
||||||
"_restitution": 0,
|
|
||||||
"_offset": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 1.1,
|
|
||||||
"y": 40
|
|
||||||
},
|
|
||||||
"_size": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 81.4,
|
|
||||||
"height": 80
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "ed4vkOAiZMzZOeFjz61GZe"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
|
|||||||
@@ -59,16 +59,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 89
|
"__id__": 89
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 91
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 93
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 95
|
"__id__": 91
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1409,74 +1403,6 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "2elZ4bl4FIB4b+pDLWapI5"
|
"fileId": "2elZ4bl4FIB4b+pDLWapI5"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "cc.RigidBody2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 92
|
|
||||||
},
|
|
||||||
"enabledContactListener": true,
|
|
||||||
"bullet": false,
|
|
||||||
"awakeOnLoad": true,
|
|
||||||
"_group": 2,
|
|
||||||
"_type": 3,
|
|
||||||
"_allowSleep": true,
|
|
||||||
"_gravityScale": 1,
|
|
||||||
"_linearDamping": 0,
|
|
||||||
"_angularDamping": 0,
|
|
||||||
"_linearVelocity": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"_angularVelocity": 0,
|
|
||||||
"_fixedRotation": false,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "e9/VwY2DBFMIaPEC/Xp2io"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.BoxCollider2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 94
|
|
||||||
},
|
|
||||||
"tag": 0,
|
|
||||||
"_group": 2,
|
|
||||||
"_density": 1,
|
|
||||||
"_sensor": true,
|
|
||||||
"_friction": 0.2,
|
|
||||||
"_restitution": 0,
|
|
||||||
"_offset": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": -1.3,
|
|
||||||
"y": 40
|
|
||||||
},
|
|
||||||
"_size": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 82.2,
|
|
||||||
"height": 80
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "a80TNh7SBM941MDY4xS3RY"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
|
|||||||
@@ -27,18 +27,18 @@
|
|||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 96
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 98
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__id__": 100
|
"__id__": 100
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 102
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 104
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 106
|
"__id__": 102
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -196,18 +196,18 @@
|
|||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 89
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 91
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__id__": 93
|
"__id__": 93
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 95
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 97
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 99
|
"__id__": 95
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -250,24 +250,24 @@
|
|||||||
{
|
{
|
||||||
"__id__": 8
|
"__id__": 8
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__id__": 70
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__id__": 74
|
"__id__": 74
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 78
|
"__id__": 80
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 84
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 90
|
"__id__": 86
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 92
|
"__id__": 88
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -318,16 +318,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 67
|
"__id__": 67
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 69
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 71
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 73
|
"__id__": 69
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1651,46 +1645,6 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "463tPWLuVLS5+4BU5ZkZyJ"
|
"fileId": "463tPWLuVLS5+4BU5ZkZyJ"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "b7739lRGUtNE4v/zX96Czu/",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 8
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 70
|
|
||||||
},
|
|
||||||
"light": {
|
|
||||||
"__uuid__": "319c7eb8-9826-48b6-81e4-82559dbf82a8",
|
|
||||||
"__expectedType__": "cc.Prefab"
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "abjw1QslRMoJXlFkOcM3tw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "c0f2fdqfBtOjKCjsgH1qG9+",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 8
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 72
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "32/wDIt+VCGpWZs7dgIh/W"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
@@ -1716,11 +1670,102 @@
|
|||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 75
|
"__id__": 71
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 77
|
"__id__": 73
|
||||||
|
},
|
||||||
|
"_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": 1,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 70
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 72
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 100,
|
||||||
|
"height": 100
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "31oHtMbJVMArMbwqigKTMo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "dcwiHpOeZB4rB8JR5Z9iTM",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "EntityLayer",
|
||||||
|
"_objFlags": 512,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 7
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 75
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 77
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 79
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1775,97 +1820,6 @@
|
|||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "31oHtMbJVMArMbwqigKTMo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "dcwiHpOeZB4rB8JR5Z9iTM",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "EntityLayer",
|
|
||||||
"_objFlags": 512,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 7
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 79
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 81
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 83
|
|
||||||
},
|
|
||||||
"_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": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 78
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 80
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 100,
|
|
||||||
"height": 100
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "f91Y4OCX1NFKfSWOAvmdSa"
|
"fileId": "f91Y4OCX1NFKfSWOAvmdSa"
|
||||||
@@ -1876,11 +1830,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 78
|
"__id__": 74
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 82
|
"__id__": 78
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -1913,14 +1867,14 @@
|
|||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 85
|
"__id__": 81
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 87
|
"__id__": 83
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 89
|
"__id__": 85
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -1957,11 +1911,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 84
|
"__id__": 80
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 86
|
"__id__": 82
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -1985,11 +1939,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 84
|
"__id__": 80
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 88
|
"__id__": 84
|
||||||
},
|
},
|
||||||
"light": {
|
"light": {
|
||||||
"__uuid__": "319c7eb8-9826-48b6-81e4-82559dbf82a8",
|
"__uuid__": "319c7eb8-9826-48b6-81e4-82559dbf82a8",
|
||||||
@@ -2024,7 +1978,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 91
|
"__id__": 87
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -2065,7 +2019,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 94
|
"__id__": 90
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -2093,7 +2047,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 96
|
"__id__": 92
|
||||||
},
|
},
|
||||||
"camera": {
|
"camera": {
|
||||||
"__id__": 3
|
"__id__": 3
|
||||||
@@ -2105,13 +2059,13 @@
|
|||||||
"__id__": 67
|
"__id__": 67
|
||||||
},
|
},
|
||||||
"floorLayer": {
|
"floorLayer": {
|
||||||
"__id__": 74
|
"__id__": 70
|
||||||
},
|
},
|
||||||
"entityLayer": {
|
"entityLayer": {
|
||||||
"__id__": 81
|
"__id__": 77
|
||||||
},
|
},
|
||||||
"SkillLayer": {
|
"SkillLayer": {
|
||||||
"__id__": 87
|
"__id__": 83
|
||||||
},
|
},
|
||||||
"isFollowPlayer": true,
|
"isFollowPlayer": true,
|
||||||
"_id": ""
|
"_id": ""
|
||||||
@@ -2130,7 +2084,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 98
|
"__id__": 94
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -2161,7 +2115,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 101
|
"__id__": 97
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -2189,7 +2143,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 103
|
"__id__": 99
|
||||||
},
|
},
|
||||||
"_cameraComponent": {
|
"_cameraComponent": {
|
||||||
"__id__": 3
|
"__id__": 3
|
||||||
@@ -2211,7 +2165,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 105
|
"__id__": 101
|
||||||
},
|
},
|
||||||
"_alignFlags": 45,
|
"_alignFlags": 45,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
|
|||||||
@@ -32,16 +32,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 12
|
"__id__": 12
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 16
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 18
|
"__id__": 14
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -283,74 +277,6 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "0cIZpMAklNUpGWSkPm4J6y"
|
"fileId": "0cIZpMAklNUpGWSkPm4J6y"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "cc.RigidBody2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 15
|
|
||||||
},
|
|
||||||
"enabledContactListener": true,
|
|
||||||
"bullet": false,
|
|
||||||
"awakeOnLoad": true,
|
|
||||||
"_group": 4,
|
|
||||||
"_type": 3,
|
|
||||||
"_allowSleep": true,
|
|
||||||
"_gravityScale": 1,
|
|
||||||
"_linearDamping": 0,
|
|
||||||
"_angularDamping": 0,
|
|
||||||
"_linearVelocity": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"_angularVelocity": 0,
|
|
||||||
"_fixedRotation": false,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "ccPNQAiCJDoqdJPvSfaTSM"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.BoxCollider2D",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 17
|
|
||||||
},
|
|
||||||
"tag": 0,
|
|
||||||
"_group": 4,
|
|
||||||
"_density": 1,
|
|
||||||
"_sensor": true,
|
|
||||||
"_friction": 0.2,
|
|
||||||
"_restitution": 0,
|
|
||||||
"_offset": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.7,
|
|
||||||
"y": -0.8
|
|
||||||
},
|
|
||||||
"_size": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 18.9,
|
|
||||||
"height": 17.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "05cKFJkU1GF6qeXylYGSZ2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
|
|||||||
@@ -14,11 +14,7 @@ const { ccclass, property } = _decorator;
|
|||||||
@ccclass('Main')
|
@ccclass('Main')
|
||||||
export class Main extends Root {
|
export class Main extends Root {
|
||||||
start() {
|
start() {
|
||||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb |
|
|
||||||
EPhysics2DDrawFlags.Pair |
|
|
||||||
EPhysics2DDrawFlags.CenterOfMass |
|
|
||||||
EPhysics2DDrawFlags.Joint |
|
|
||||||
EPhysics2DDrawFlags.Shape;
|
|
||||||
}
|
}
|
||||||
protected async run() {
|
protected async run() {
|
||||||
smc.initialize = ecs.getEntity<Initialize>(Initialize);
|
smc.initialize = ecs.getEntity<Initialize>(Initialize);
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ export enum endType {
|
|||||||
animationEnd = 0,
|
animationEnd = 0,
|
||||||
timeEnd = 1,
|
timeEnd = 1,
|
||||||
distanceEnd = 2,
|
distanceEnd = 2,
|
||||||
|
collision = 3,
|
||||||
|
countEnd = 4,
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
path: 图片地址
|
path: 图片地址
|
||||||
@@ -76,16 +78,16 @@ info:技能描述
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
export const SkillSet = {
|
export const SkillSet = {
|
||||||
6001:{uuid:6001,name:"凛冬之触",sp_name:"ball_blue",path:"6001",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
|
6001:{uuid:6001,name:"凛冬之触",sp_name:"ball_blue",path:"6001",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
|
||||||
6002:{uuid:6002,name:"烈焰之怒",sp_name:"ball_blue",path:"6002",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放火焰弹,造成100%攻击的伤害"},
|
6002:{uuid:6002,name:"烈焰之怒",sp_name:"ball_red",path:"6002",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放火焰弹,造成100%攻击的伤害"},
|
||||||
6003:{uuid:6003,name:"奥术冲击",sp_name:"ball_blue",path:"6003",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放魔法弹,造成100%攻击的伤害"},
|
6003:{uuid:6003,name:"奥术冲击",sp_name:"ball_green",path:"6003",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放魔法弹,造成100%攻击的伤害"},
|
||||||
6004:{uuid:6004,name:"神圣裁决",sp_name:"ball_blue",path:"6004",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放圣光弹,造成100%攻击的伤害"},
|
6004:{uuid:6004,name:"神圣裁决",sp_name:"ball_yellow",path:"6004",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放圣光弹,造成100%攻击的伤害"},
|
||||||
6005:{uuid:6005,name:"破空斩击",sp_name:"ball_blue",path:"6005",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"攻击前方直线100码内的敌人造成50%伤害"},
|
6005:{uuid:6005,name:"破空斩击",sp_name:"patk",path:"6005",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"攻击前方直线100码内的敌人造成50%伤害"},
|
||||||
6006:{uuid:6006,name:"穿心箭矢",sp_name:"ball_blue",path:"6006",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
|
6006:{uuid:6006,name:"穿心箭矢",sp_name:"arrow",path:"6006",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
|
||||||
6007:{uuid:6007,name:"铁斧打击",sp_name:"ball_blue",path:"6007",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
6007:{uuid:6007,name:"铁斧打击",sp_name:"mon_ft",path:"6007",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||||||
6008:{uuid:6008,name:"木棍打击",sp_name:"ball_blue",path:"6008",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
|
6008:{uuid:6008,name:"木棍打击",sp_name:"mon_ly",path:"6008",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
|
||||||
6009:{uuid:6009,name:"飞刀打击",sp_name:"ball_blue",path:"6009",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
|
6009:{uuid:6009,name:"飞刀打击",sp_name:"mon_xd",path:"6009",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
|
||||||
6010:{uuid:6010,name:"石斧打击",sp_name:"ball_blue",path:"6010",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:2,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
6010:{uuid:6010,name:"石斧打击",sp_name:"mon_sf",path:"6010",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:0,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||||
6011:{uuid:6011,name:"烈火呼吸",sp_name:"firequan",path:"6011",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:0,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"召唤烈焰攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
|
6011:{uuid:6011,name:"烈火呼吸",sp_name:"firequan",path:"6011",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:0,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"召唤烈焰攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
|
||||||
6012:{uuid:6012,name:"大火球" ,sp_name:"fire",path:"6012",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:0,endType:1,fname:"max",flash:false,with:50,debuff:2,depb:20,debtime:2,derate:100,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
|
6012:{uuid:6012,name:"大火球" ,sp_name:"fire",path:"6012",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:0,endType:1,fname:"max",flash:false,with:50,debuff:2,depb:20,debtime:2,derate:100,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
|
||||||
6013:{uuid:6013,name:"火墙", sp_name:"firewall",path:"6013",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:10,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
|
6013:{uuid:6013,name:"火墙", sp_name:"firewall",path:"6013",TargetType:1,TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:10,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:300,sonsk:0,hero:0,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
|
|||||||
if (!move.moving) return;
|
if (!move.moving) return;
|
||||||
// 检测攻击范围内是否有敌人
|
// 检测攻击范围内是否有敌人
|
||||||
// 检测友方碰撞和敌方攻击范围
|
// 检测友方碰撞和敌方攻击范围
|
||||||
const alliesStop = this.checkAlliesInProximity(e);
|
// const alliesStop = this.checkAlliesInProximity(e);
|
||||||
const enemiesStop = this.checkEnemiesInRange(e, view.dis);
|
const enemiesStop = this.checkEnemiesInRange(e, view.dis);
|
||||||
const shouldStop = alliesStop || enemiesStop;
|
const shouldStop = enemiesStop;
|
||||||
view.is_atking = shouldStop;
|
view.is_atking = shouldStop;
|
||||||
|
|
||||||
// 同步状态
|
// 同步状态
|
||||||
@@ -96,15 +96,15 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取前一个单位(uuid比当前小的最近单位)
|
// 获取前一个单位(uuid比当前小的最近单位)
|
||||||
const prevUnit = sortedAllies[currentIndex - 1];
|
// const prevUnit = sortedAllies[currentIndex - 1];
|
||||||
const prevView = prevUnit.get(HeroViewComp);
|
// const prevView = prevUnit.get(HeroViewComp);
|
||||||
const distToPrev = Math.abs(currentPos.x - prevView.node.position.x);
|
// const distToPrev = Math.abs(currentPos.x - prevView.node.position.x);
|
||||||
|
|
||||||
// 如果与前一个单位距离小于安全距离,则停止
|
// 如果与前一个单位距离小于安全距离,则停止
|
||||||
if (distToPrev < SAFE_DISTANCE) {
|
// if (distToPrev < SAFE_DISTANCE) {
|
||||||
current.is_stop_temp = true;
|
// current.is_stop_temp = true;
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 如果与前一个单位距离大于安全距离,则移动
|
// 如果与前一个单位距离大于安全距离,则移动
|
||||||
current.is_stop_temp = false;
|
current.is_stop_temp = false;
|
||||||
|
|||||||
@@ -91,29 +91,29 @@ export class HeroViewComp extends CCComp {
|
|||||||
this.as = this.getComponent(HeroSpine);
|
this.as = this.getComponent(HeroSpine);
|
||||||
// 注册单个碰撞体的回调函数
|
// 注册单个碰撞体的回调函数
|
||||||
|
|
||||||
let collider = this.getComponent(Collider2D);
|
// let collider = this.getComponent(Collider2D);
|
||||||
collider.group = this.box_group;
|
// collider.group = this.box_group;
|
||||||
// console.log("hero collider ",this.scale,collider);
|
// // console.log("hero collider ",this.scale,collider);
|
||||||
if (collider) {
|
// if (collider) {
|
||||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
// collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||||
// collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
// // collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||||
collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
|
// collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
|
||||||
// collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
// // collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||||
}
|
// }
|
||||||
this.rigid = this.getComponent(RigidBody2D);
|
// this.rigid = this.getComponent(RigidBody2D);
|
||||||
if(this.rigid.sleep){
|
// if(this.rigid.sleep){
|
||||||
console.log("hero rigid sleep ",this.scale,this.rigid);
|
// console.log("hero rigid sleep ",this.scale,this.rigid);
|
||||||
this.rigid.wakeUp();
|
// this.rigid.wakeUp();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
// onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||||
console.log("碰撞开始 ",this.scale,seCol,oCol);
|
// console.log("碰撞开始 ",this.scale,seCol,oCol);
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
onEndContact (seCol: Collider2D, oCol: Collider2D) { console.log("碰撞结束 ",this.scale,seCol,oCol);}
|
// onEndContact (seCol: Collider2D, oCol: Collider2D) { console.log("碰撞结束 ",this.scale,seCol,oCol);}
|
||||||
onPreSolve (seCol: Collider2D, oCol: Collider2D) {console.log("碰撞预处理 ",this.scale,seCol,oCol);}
|
// onPreSolve (seCol: Collider2D, oCol: Collider2D) {console.log("碰撞预处理 ",this.scale,seCol,oCol);}
|
||||||
onPostSolve (seCol: Collider2D, oCol: Collider2D) {console.log("碰撞后处理 ",this.scale,seCol,oCol); }
|
// onPostSolve (seCol: Collider2D, oCol: Collider2D) {console.log("碰撞后处理 ",this.scale,seCol,oCol); }
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
/** 视图层逻辑代码分离演示 */
|
||||||
start () {
|
start () {
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
import { _decorator,NodeEventType,EventTouch } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { UIID } from "../common/config/GameUIConfig";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('CsuoComp')
|
|
||||||
@ecs.register('Csuo', false)
|
|
||||||
export class CsuoComp extends CCComp {
|
|
||||||
|
|
||||||
protected onLoad() {
|
|
||||||
// this.node.on(NodeEventType.TOUCH_START, this.onTouch, this);
|
|
||||||
|
|
||||||
}
|
|
||||||
onTouch() {
|
|
||||||
|
|
||||||
}
|
|
||||||
onOk(){
|
|
||||||
this.node.active=false;
|
|
||||||
}
|
|
||||||
oncancel(){
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "bcd8a069-5208-4be1-8c8e-2cedddb3860a",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
import { _decorator,Button,color,EventHandler,EventTouch,instantiate,Label,NodeEventType,Prefab,ProgressBar,resources,Sprite,SpriteAtlas,tween,UITransform,v3 } 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 { HeroInfo, HeroList } from "../common/config/heroSet";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
import { UIID } from "../common/config/GameUIConfig";
|
|
||||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { SkillSet } from "../common/config/SkillSet";
|
|
||||||
import { getUpChipByLv, getUpGoldByRange, LvUp, SlvUp, UpGold } from "../common/config/RoleSet";
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('HeroHomeComp')
|
|
||||||
@ecs.register('HeroHome', false)
|
|
||||||
export class HeroHomeComp extends CCComp {
|
|
||||||
h_uuid:number=0
|
|
||||||
role:any=null
|
|
||||||
hero:any=null
|
|
||||||
gold_need:number=9999
|
|
||||||
chip_need:number=9999
|
|
||||||
slv:number=0
|
|
||||||
protected onLoad(): void {
|
|
||||||
|
|
||||||
}
|
|
||||||
start() {
|
|
||||||
// this.load_talents()
|
|
||||||
console.log("hero_home start")
|
|
||||||
// this.h_uuid=5001
|
|
||||||
// this.hero_show(this.h_uuid)
|
|
||||||
this.loads()
|
|
||||||
this.node.getChildByName("show").active=false
|
|
||||||
}
|
|
||||||
loads(){
|
|
||||||
let hc:number =HeroList.length
|
|
||||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
|
||||||
|
|
||||||
parent.getComponent(UITransform).setContentSize(hc*185,230)
|
|
||||||
// console.log("hc",hc,parent.getComponent(UITransform))
|
|
||||||
console.log("parent",parent)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
hero_show(uuid:number) {
|
|
||||||
this.node.getChildByName("show").active=true
|
|
||||||
this.h_uuid=uuid
|
|
||||||
this.hero=HeroInfo[uuid]
|
|
||||||
console.log("hero_show",uuid)
|
|
||||||
// let skill1 = SkillSet[this.hero.skill[0]]
|
|
||||||
// let skill2 = SkillSet[this.hero.skill[1]]
|
|
||||||
// var sk_path = "game/skills/skill_icon"
|
|
||||||
// var icon_path = "game/heros/herois"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let content=this.node.getChildByName("show").getChildByName("content")
|
|
||||||
content.getChildByName("name").getChildByName("value").getComponent(Label).string=this.hero.name
|
|
||||||
content.getChildByName("name").getChildByName("g1").active=HeroInfo[uuid].quality==1
|
|
||||||
content.getChildByName("name").getChildByName("g2").active=HeroInfo[uuid].quality==2
|
|
||||||
content.getChildByName("name").getChildByName("g3").active=HeroInfo[uuid].quality==3
|
|
||||||
this.clear_hero()
|
|
||||||
this.call_hero(uuid)
|
|
||||||
// resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
// const sprite = content.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
|
|
||||||
// sprite.spriteFrame = atlas.getSpriteFrame(this.hero.path);
|
|
||||||
// });
|
|
||||||
// resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
// const sprite = content.getChildByName("bottom").getChildByName("sk").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
|
|
||||||
// sprite.spriteFrame = atlas.getSpriteFrame(skill1.path);
|
|
||||||
// });
|
|
||||||
// content.getChildByName("bottom").getChildByName("sk").getChildByName("name").getComponent(Label).string = skill1.name;
|
|
||||||
// content.getChildByName("bottom").getChildByName("sk").getChildByName("info").getComponent(Label).string = skill1.info;
|
|
||||||
// resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
// const sprite = content.getChildByName("bottom").getChildByName("sk2").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
|
|
||||||
// sprite.spriteFrame = atlas.getSpriteFrame(skill2.path);
|
|
||||||
// });
|
|
||||||
// content.getChildByName("bottom").getChildByName("sk2").getChildByName("name").getComponent(Label).string = skill2.name;
|
|
||||||
// content.getChildByName("bottom").getChildByName("sk2").getChildByName("info").getComponent(Label).string = skill2.info;
|
|
||||||
|
|
||||||
// tal.getChildByName("slv1").getChildByName("val").getComponent(Label).string = this.hero.tals[0]
|
|
||||||
// tal.getChildByName("slv2").getChildByName("val").getComponent(Label).string = this.hero.tals[1]
|
|
||||||
// tal.getChildByName("slv3").getChildByName("val").getComponent(Label).string = this.hero.tals[2]
|
|
||||||
// tal.getChildByName("slv4").getChildByName("val").getComponent(Label).string = this.hero.tals[3]
|
|
||||||
// tal.getChildByName("slv5").getChildByName("val").getComponent(Label).string = this.hero.tals[4]
|
|
||||||
this.update_data()
|
|
||||||
}
|
|
||||||
update_data(){
|
|
||||||
let content=this.node.getChildByName("show").getChildByName("content")
|
|
||||||
// let slv_node=content.getChildByName("name").getChildByName("slv");
|
|
||||||
// let slvup=content.getChildByName("slvup");
|
|
||||||
let attr = content.getChildByName("attr");
|
|
||||||
// slv_node.getChildByName("slv").getComponent(Label).string = smc.heros[uuid].slv.toString();
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("q1").active = this.hero.quality == 1;
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("q2").active = this.hero.quality == 2;
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("q3").active = this.hero.quality == 3;
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("k1").active = this.hero.kind == 1;
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("k2").active = this.hero.kind == 2;
|
|
||||||
// content.getChildByName("name").getChildByName("quality").getChildByName("k3").active = this.hero.kind == 3;
|
|
||||||
// lvup.getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.LvUp*smc.heros[uuid].lv).toString()
|
|
||||||
attr.getChildByName("ap").getChildByName("val").getComponent(Label).string = this.hero.ap.toFixed(0).toString()
|
|
||||||
attr.getChildByName("hp").getChildByName("val").getComponent(Label).string = this.hero.hp.toFixed(0).toString()
|
|
||||||
attr.getChildByName("acd").getChildByName("val").getComponent(Label).string = this.hero.a_cd
|
|
||||||
attr.getChildByName("speed").getChildByName("val").getComponent(Label).string = this.hero.speed
|
|
||||||
attr.getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oops.message.dispatchEvent("hero_card_update_info",{uuid:this.h_uuid})
|
|
||||||
}
|
|
||||||
lv_selcet(e:any,val:any){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
call_hero(uuid:number){
|
|
||||||
var path = "game/heros/uiheros/"+HeroInfo[uuid].path;
|
|
||||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
|
||||||
var node = instantiate(prefab);
|
|
||||||
node.parent = this.node.getChildByName("show").getChildByName("content").getChildByName("hero").getChildByName("node")
|
|
||||||
}
|
|
||||||
clear_hero(){
|
|
||||||
this.node.getChildByName("show").getChildByName("content").getChildByName("hero").getChildByName("node").destroyAllChildren()
|
|
||||||
}
|
|
||||||
pre_hero(){
|
|
||||||
let hi= HeroList.indexOf(this.h_uuid)
|
|
||||||
if(hi==0){
|
|
||||||
oops.gui.toast("已经是第一个英雄");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.h_uuid=HeroList[hi-1]
|
|
||||||
this.hero_show(this.h_uuid)
|
|
||||||
}
|
|
||||||
next_hero(){
|
|
||||||
let hi= HeroList.indexOf(this.h_uuid)
|
|
||||||
if(hi==HeroList.length-1){
|
|
||||||
oops.gui.toast("已经是最后一个英雄");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.h_uuid=HeroList[hi+1]
|
|
||||||
this.hero_show(this.h_uuid)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
item_show(e:any,val:any){
|
|
||||||
oops.gui.open(UIID.ItemInfo, {uuid:val,type:0});
|
|
||||||
}
|
|
||||||
close_show(){
|
|
||||||
this.node.getChildByName("show").active=false
|
|
||||||
}
|
|
||||||
close(){
|
|
||||||
this.node.active=false
|
|
||||||
}
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"f830455e-1cb8-4379-b382-6de74c383166","files":[],"subMetas":{},"userData":{}}
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
import { _decorator, instantiate, Prefab ,Node, Label, Sprite, resources, SpriteAtlas, v3} 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
import { Item } from "./Item";
|
|
||||||
import { Items } from "../common/config/Items";
|
|
||||||
import { HChipComp } from "../hero/HChipComp";
|
|
||||||
import { BoxDrop } from "../common/config/RewardSet";
|
|
||||||
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
|
||||||
import { SChipComp } from "../hero/SChipComp";
|
|
||||||
import { ItemComp } from "./ItemComp";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('LuckHomeCompComp')
|
|
||||||
@ecs.register('LuckHomeComp', false)
|
|
||||||
export class LuckHomeCompComp extends CCComp {
|
|
||||||
@property({ type: Node })
|
|
||||||
sbn: Node = null;
|
|
||||||
@property({ type: Node })
|
|
||||||
mbn: Node | null = null;
|
|
||||||
@property({ type: Node })
|
|
||||||
lbn: Node | null = null;
|
|
||||||
@property({ type: Node })
|
|
||||||
btnno: Node | null = null;
|
|
||||||
@property({ type: Node })
|
|
||||||
itmes: Node | null = null;
|
|
||||||
selected: string = "";
|
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
// this.frist();
|
|
||||||
}
|
|
||||||
frist(){
|
|
||||||
this.colse_reward()
|
|
||||||
}
|
|
||||||
|
|
||||||
open_sb() {
|
|
||||||
smc.vmdata.box.num--;
|
|
||||||
this.open_reward()
|
|
||||||
this.get_reward(1)
|
|
||||||
}
|
|
||||||
open_mb() {
|
|
||||||
if (smc.vmdata.box.num < 5) {oops.gui.toast("宝箱数量不足");return;}
|
|
||||||
smc.vmdata.box.num=smc.vmdata.box.num-5;
|
|
||||||
this.open_reward()
|
|
||||||
for (let x = 0; x < 5; x++) {
|
|
||||||
this.get_reward(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
open_lb() {
|
|
||||||
if (smc.vmdata.box.num < 15) {oops.gui.toast("宝箱数量不足");return;}
|
|
||||||
smc.vmdata.box.num=smc.vmdata.box.num-15;
|
|
||||||
this.open_reward()
|
|
||||||
for (let x = 0; x < 15; x++) {
|
|
||||||
this.get_reward(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
colse_reward() {
|
|
||||||
this.node.getChildByName("reward").setScale(0,0,0);
|
|
||||||
this.node.getChildByName("reward").getChildByName("items").removeAllChildren();
|
|
||||||
}
|
|
||||||
open_reward() {
|
|
||||||
this.node.getChildByName("reward").setScale(1,1,1);
|
|
||||||
}
|
|
||||||
get_reward(reward:number){
|
|
||||||
console.log("get_reward",reward)
|
|
||||||
let list =BoxDrop[reward];
|
|
||||||
let uuid= 0
|
|
||||||
let num =1
|
|
||||||
let i=0
|
|
||||||
while (uuid==0) {
|
|
||||||
for (let x = 0; x < list.length; x++) {
|
|
||||||
let rate = Math.random()*100
|
|
||||||
if(rate < list[x].dropRate){
|
|
||||||
uuid=list[x].uuid;
|
|
||||||
num =RandomManager.instance.getRandomInt(list[x].num_max/2,list[x].num_max);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
switch(reward){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
show_hero_chip(uuid:number,num:number){
|
|
||||||
console.log("show_hero_chip",uuid,num)
|
|
||||||
let path = "game/gui/hchip";
|
|
||||||
let prefab: Prefab = oops.res.get(path, Prefab)!;
|
|
||||||
let node = instantiate(prefab);
|
|
||||||
let hc= node.getComponent(HChipComp)
|
|
||||||
hc.update_data(uuid,num)
|
|
||||||
node.parent = this.node.getChildByName("reward").getChildByName("items");
|
|
||||||
}
|
|
||||||
show_item(uuid:number,num:number){
|
|
||||||
var path = "game/gui/item";
|
|
||||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
|
||||||
var node = instantiate(prefab);
|
|
||||||
let ic= node.getComponent(ItemComp)
|
|
||||||
ic.update_data(uuid,num)
|
|
||||||
node.parent = this.node.getChildByName("reward").getChildByName("items");
|
|
||||||
|
|
||||||
}
|
|
||||||
show_skill_chip(uuid:number,num:number){
|
|
||||||
let path = "game/gui/schip";
|
|
||||||
let prefab: Prefab = oops.res.get(path, Prefab)!;
|
|
||||||
let node = instantiate(prefab);
|
|
||||||
let sc= node.getComponent(SChipComp)
|
|
||||||
sc.update_data(uuid,num)
|
|
||||||
node.parent = this.node.getChildByName("reward").getChildByName("items");
|
|
||||||
}
|
|
||||||
show_bbox() {
|
|
||||||
var parent = this.node.getChildByName("bbox")
|
|
||||||
var path = "game/gui/bbox";
|
|
||||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
|
||||||
let box = instantiate(prefab);
|
|
||||||
box.parent = parent;
|
|
||||||
parent.getChildByName("light").active = true;
|
|
||||||
this.scheduleOnce(()=>{
|
|
||||||
parent.getChildByName("light").active = false;
|
|
||||||
}, 0.5)
|
|
||||||
this.scheduleOnce(()=>{
|
|
||||||
box.destroy();
|
|
||||||
}, 0.7)
|
|
||||||
}
|
|
||||||
to_open(){
|
|
||||||
if(this.selected==""){return;}
|
|
||||||
switch(this.selected){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "461697d5-ffa2-4577-8e33-2c329f3410b5",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import { _decorator ,Vec3,v3, Prefab, instantiate,Node} 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 { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
|
||||||
import { BoxSet, GameSet } from "../common/config/BoxSet";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { MapViewScene } from "./view/MapViewScene";
|
|
||||||
import { MissionSet,MissionNum,MonsetList, BossList } from "../common/config/MissionSet";
|
|
||||||
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
|
|
||||||
import { Hero } from "../hero/Hero";
|
|
||||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
|
||||||
import { Boss} from "../Boss/Boss";
|
|
||||||
import { UIID } from "../common/config/GameUIConfig";
|
|
||||||
import { Talents } from "../common/config/TalentSet";
|
|
||||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
|
||||||
import { HeroSet } from "../common/config/heroSet";
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('MapMonsterComp')
|
|
||||||
@ecs.register('MapMonster', false)
|
|
||||||
export class MapMonsterComp extends CCComp {
|
|
||||||
|
|
||||||
|
|
||||||
onLoad(){
|
|
||||||
// 监听全局事件
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected update(dt: number): void {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "c0f2f76a-7c1b-4e8c-a0a3-b201f5a86f7e",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
import { _decorator ,v3,Prefab,instantiate,Node} 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { BoxSet } from "../common/config/BoxSet";
|
|
||||||
import { MapViewScene } from "./view/MapViewScene";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('MapSkillComp')
|
|
||||||
@ecs.register('MapSkill', false)
|
|
||||||
export class MapSkillComp extends CCComp {
|
|
||||||
// scene: MapViewScene = null;
|
|
||||||
@property(Prefab)
|
|
||||||
light: Prefab = null;
|
|
||||||
onLoad(){
|
|
||||||
oops.message.on("monster_load", this.doMonsterLoad, this);
|
|
||||||
oops.message.on("hero_load", this.doHeroLoad, this);
|
|
||||||
oops.message.on("do_use_skill", this.doSkill, this);
|
|
||||||
oops.message.on("do_use_item", this.useItem, this);
|
|
||||||
}
|
|
||||||
doSkill(event: string, args: any){
|
|
||||||
this.addCSkill(args.uuid);
|
|
||||||
}
|
|
||||||
addSkill(){
|
|
||||||
|
|
||||||
}
|
|
||||||
addCSkill(uuid:number=1001,args:any=null){
|
|
||||||
|
|
||||||
}
|
|
||||||
doMonsterLoad(){
|
|
||||||
// const light = instantiate(this.light);
|
|
||||||
// light.setPosition(BoxSet.MONSTER_START,BoxSet.GAME_LINE);
|
|
||||||
// this.node.addChild(light);
|
|
||||||
}
|
|
||||||
doHeroLoad(){
|
|
||||||
// const light = instantiate(this.light);
|
|
||||||
// light.setPosition(BoxSet.HERO_START,BoxSet.GAME_LINE,0);
|
|
||||||
// this.node.addChild(light);
|
|
||||||
}
|
|
||||||
useItem(event: string, args: any){
|
|
||||||
console.log("useItem");
|
|
||||||
|
|
||||||
}
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "b7739951-194b-4d13-8bff-cd7f7a0b3bbf",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -17,10 +17,10 @@ const { ccclass, property } = _decorator;
|
|||||||
export class MissionHeroCompComp extends CCComp {
|
export class MissionHeroCompComp extends CCComp {
|
||||||
timer:Timer=new Timer(2)
|
timer:Timer=new Timer(2)
|
||||||
onLoad(){
|
onLoad(){
|
||||||
// this.on(GameEvent.UserHeroCard,this.call_hero,this)
|
this.on(GameEvent.UserHeroCard,this.call_hero,this)
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
this.test_call()
|
// this.test_call()
|
||||||
}
|
}
|
||||||
protected update(dt: number): void {
|
protected update(dt: number): void {
|
||||||
if(smc.mission.status != 1) return
|
if(smc.mission.status != 1) return
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { HeroSet } from "../common/config/heroSet";
|
|||||||
import { Missions } from "../common/config/MissionSet";
|
import { Missions } from "../common/config/MissionSet";
|
||||||
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
||||||
import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
||||||
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@@ -19,12 +20,14 @@ export class MissionMonCompComp extends CCComp {
|
|||||||
start() {
|
start() {
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||||
this.test_call()
|
// this.test_call()
|
||||||
}
|
}
|
||||||
protected update(dt: number): void {
|
protected update(dt: number): void {
|
||||||
// if(this.timer.update(dt)){
|
if(!smc.mission.play||smc.mission.pause) return
|
||||||
// this.mon_refresh()
|
if(this.timer.update(dt)){
|
||||||
// }
|
this.mon_refresh()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
test_call(){
|
test_call(){
|
||||||
this.addMonster(5202,0,true)
|
this.addMonster(5202,0,true)
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
import { _decorator } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('RewardsComp')
|
|
||||||
@ecs.register('Rewards', false)
|
|
||||||
export class RewardsComp extends CCComp {
|
|
||||||
reward_lv = 1;
|
|
||||||
onLoad(){
|
|
||||||
// 监听全局事件
|
|
||||||
oops.message.on("do_reward", this.do_reward, this);
|
|
||||||
}
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
do_reward(){
|
|
||||||
this.node.active = true;
|
|
||||||
}
|
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "df8725c7-a5e8-4dfd-b357-59fb88b68283",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { _decorator, instantiate, Prefab, UITransform } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { UIID } from "../common/config/GameUIConfig";
|
|
||||||
import { Items } from "../common/config/Items";
|
|
||||||
import { Item } from "./Item";
|
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
import { RewardComp } from "./RewardComp";
|
|
||||||
import { SChipComp } from "../hero/SChipComp";
|
|
||||||
import { HChipComp } from "../hero/HChipComp";
|
|
||||||
import { Goods } from "./Goods";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('ShopHomeComp')
|
|
||||||
@ecs.register('ShopHomeComp', false)
|
|
||||||
export class ShopHomeComp extends CCComp {
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
this.get_items();
|
|
||||||
}
|
|
||||||
get_items(){
|
|
||||||
let goodsnode = this.node.getChildByName("goods").getChildByName("view").getChildByName("content")
|
|
||||||
|
|
||||||
}
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "08123a0b-18dd-4dcb-8f8b-17664ff1ec67",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import { _decorator, UITransform } 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 { MSklist } from "../common/config/SkillSet";
|
|
||||||
import { MSCard } from "./MSCard";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('SkillHomeComp')
|
|
||||||
@ecs.register('SkillHome', false)
|
|
||||||
export class SkillHomeComp extends CCComp {
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
this.load_skill_card()
|
|
||||||
}
|
|
||||||
|
|
||||||
load_skill_card(){
|
|
||||||
let ms_num:number =MSklist.length
|
|
||||||
let parent= this.node.getChildByName("skills").getChildByName("view").getChildByName("content")
|
|
||||||
let height=ms_num*135
|
|
||||||
parent.getComponent(UITransform).height=height
|
|
||||||
for (let i = 0; i < ms_num; i++) {
|
|
||||||
let msc =ecs.getEntity<MSCard>(MSCard)
|
|
||||||
msc.load(MSklist[i],parent,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "cf5847e5-a4d7-4a84-8064-024371ea2125",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import { _decorator, Component, Node ,director,game} from 'cc';
|
|
||||||
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('unlock')
|
|
||||||
export class unlockComp extends Component {
|
|
||||||
start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
doCancel() {
|
|
||||||
this.node.active = false
|
|
||||||
|
|
||||||
}
|
|
||||||
doActive() {
|
|
||||||
this.node.active = true
|
|
||||||
|
|
||||||
}
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "3a67f9d9-8df3-4cfc-955d-1a8b1c30b2e8",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Node, Vec3 } from "cc";
|
import { Node, UI, UITransform, Vec3 } from "cc";
|
||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||||
import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
||||||
@@ -47,11 +47,11 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp
|
|||||||
const targets = this.selectEnemyTargets(caster, config);
|
const targets = this.selectEnemyTargets(caster, config);
|
||||||
if (targets.length === 0) return;
|
if (targets.length === 0) return;
|
||||||
skillEntity.load(
|
skillEntity.load(
|
||||||
view.node.position, // 起始位置
|
new Vec3(view.node.position.x, view.node.position.y+view.node.getComponent(UITransform).contentSize.height/2, 0), // 起始位置
|
||||||
view.box_group, // 阵营
|
view.box_group, // 阵营
|
||||||
view.node.parent, // 父节点
|
view.node.parent, // 父节点
|
||||||
config.uuid, // 技能ID
|
config.uuid, // 技能ID
|
||||||
targets[0]?.get(HeroViewComp).node.position, // 目标位置
|
new Vec3(targets[0]?.get(HeroViewComp).node.position.x, targets[0]?.get(HeroViewComp).node.position.y, 0), // 目标位置
|
||||||
targets[0]?.get(HeroViewComp),
|
targets[0]?.get(HeroViewComp),
|
||||||
view
|
view
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Node, Vec3 } from "cc";
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||||
import { HeroSkillsComp } from "./heroSkillsComp";
|
import { HeroSkillsComp } from "./heroSkillsComp";
|
||||||
import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
import { endType, SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
||||||
import { CdType } from "../common/config/SkillSet";
|
import { CdType } from "../common/config/SkillSet";
|
||||||
import { oops } from "db://oops-framework/core/Oops";
|
import { oops } from "db://oops-framework/core/Oops";
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
@@ -32,7 +32,7 @@ export class SkillSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
|||||||
if(skill.atk_count < 1){
|
if(skill.atk_count < 1){
|
||||||
skill.atk_count++;
|
skill.atk_count++;
|
||||||
// console.log("技能命中目标",skill.caster,skill.target,SkillSet[skill.s_uuid]);
|
// console.log("技能命中目标",skill.caster,skill.target,SkillSet[skill.s_uuid]);
|
||||||
this.applySkillEffect(skill.caster,skill.target,SkillSet[skill.s_uuid]);
|
this.applySkillEffect(skill.caster,skill.target,SkillSet[skill.s_uuid],e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.processDamageQueue();
|
this.processDamageQueue();
|
||||||
@@ -56,14 +56,14 @@ export class SkillSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
|||||||
// 根据技能配置获取判定范围
|
// 根据技能配置获取判定范围
|
||||||
const config = SkillSet[skill.s_uuid];
|
const config = SkillSet[skill.s_uuid];
|
||||||
const rangeX = config?.rangeX || 20; // 默认值为10
|
const rangeX = config?.rangeX || 20; // 默认值为10
|
||||||
const rangeY = config?.rangeY || 20;
|
const rangeY = config?.rangeY || 30;
|
||||||
const distanceX = Math.abs(targetPos.x - skillPos.x);
|
const distanceX = Math.abs(targetPos.x - skillPos.x);
|
||||||
const distanceY = Math.abs(targetPos.y - skillPos.y);
|
const distanceY = Math.abs(targetPos.y+40 - skillPos.y);
|
||||||
const isInRange = distanceX < rangeX && distanceY < rangeY;
|
const isInRange = distanceX < rangeX && distanceY < rangeY;
|
||||||
return isInRange;
|
return isInRange;
|
||||||
}
|
}
|
||||||
/** 应用技能效果 */
|
/** 应用技能效果 */
|
||||||
private applySkillEffect(casterView:HeroViewComp, targetView: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]) {
|
private applySkillEffect(casterView:HeroViewComp, targetView: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet],e:ecs.Entity) {
|
||||||
// 直接计算伤害(包含防御减免)
|
// 直接计算伤害(包含防御减免)
|
||||||
const damageResult = this.calculateDamage(casterView, targetView, config);
|
const damageResult = this.calculateDamage(casterView, targetView, config);
|
||||||
// 将施法者传入applyDamage方法
|
// 将施法者传入applyDamage方法
|
||||||
@@ -71,6 +71,9 @@ export class SkillSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
|||||||
// 播放技能特效
|
// 播放技能特效
|
||||||
casterView.playSkillEffect(config.uuid);
|
casterView.playSkillEffect(config.uuid);
|
||||||
console.log(`${casterView.hero_name} 对 ${targetView.hero_name} 造成 ${damageResult.value}伤害`);
|
console.log(`${casterView.hero_name} 对 ${targetView.hero_name} 造成 ${damageResult.value}伤害`);
|
||||||
|
if(config.endType === endType.collision){
|
||||||
|
e.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private calculateDamage(caster: HeroViewComp, target: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]) {
|
private calculateDamage(caster: HeroViewComp, target: HeroViewComp, config: typeof SkillSet[keyof typeof SkillSet]) {
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ export class Skill extends ecs.Entity {
|
|||||||
skillComp.caster = caster;
|
skillComp.caster = caster;
|
||||||
skillComp.prefabName = config.sp_name;
|
skillComp.prefabName = config.sp_name;
|
||||||
skillComp.group = group;
|
skillComp.group = group;
|
||||||
|
if(group==BoxSet.HERO){
|
||||||
|
skillComp.fac=0;
|
||||||
|
}else{
|
||||||
|
skillComp.fac=1;
|
||||||
|
}
|
||||||
console.log(config.sp_name+"技能配置",skillComp);
|
console.log(config.sp_name+"技能配置",skillComp);
|
||||||
// 初始化动画名称
|
// 初始化动画名称
|
||||||
skillComp.animName = config.animName; // 从配置获取动画名称
|
skillComp.animName = config.animName; // 从配置获取动画名称
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ export class SkillCom extends CCComp {
|
|||||||
duration: number = 0; // 技能持续时间
|
duration: number = 0; // 技能持续时间
|
||||||
prefabName: string = ""; // 预制体名称
|
prefabName: string = ""; // 预制体名称
|
||||||
animName: string = "";
|
animName: string = "";
|
||||||
group:number = 0; //阵营
|
group:number = 0; //阵营
|
||||||
|
fac:number=0; //阵营
|
||||||
rigid:RigidBody2D=null!; // 动画名称
|
rigid:RigidBody2D=null!; // 动画名称
|
||||||
target:any=null;
|
target:any=null;
|
||||||
caster:any=null;
|
caster:any=null;
|
||||||
@@ -46,24 +47,24 @@ export class SkillCom extends CCComp {
|
|||||||
start() {
|
start() {
|
||||||
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||||
this.node.active = true;
|
this.node.active = true;
|
||||||
let collider = this.getComponent(Collider2D);
|
// let collider = this.getComponent(Collider2D);
|
||||||
console.log(this.group +"技能 collider ",collider);
|
// console.log(this.group +"技能 collider ",collider);
|
||||||
collider.group = this.group;
|
// collider.group = this.group;
|
||||||
if (collider) {
|
// if (collider) {
|
||||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
// collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||||
|
|
||||||
}
|
// }
|
||||||
this.rigid = this.getComponent(RigidBody2D);
|
// this.rigid = this.getComponent(RigidBody2D);
|
||||||
if(this.rigid.sleep){
|
// if(this.rigid.sleep){
|
||||||
console.log(this.scale+"技能 rigid sleep ",this.rigid);
|
// console.log(this.scale+"技能 rigid sleep ",this.rigid);
|
||||||
this.rigid.wakeUp();
|
// this.rigid.wakeUp();
|
||||||
}
|
// }
|
||||||
// 根据动画类型开始相应的运动
|
// 根据动画类型开始相应的运动
|
||||||
this.startMovement();
|
this.startMovement();
|
||||||
}
|
}
|
||||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
// onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||||
console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
"_value": false
|
"_value": false
|
||||||
},
|
},
|
||||||
"physics-2d": {
|
"physics-2d": {
|
||||||
"_value": true,
|
"_value": false,
|
||||||
"_option": "physics-2d-box2d"
|
"_option": "physics-2d-box2d"
|
||||||
},
|
},
|
||||||
"physics-2d-box2d": {
|
"physics-2d-box2d": {
|
||||||
@@ -134,7 +134,6 @@
|
|||||||
"gfx-webgl2",
|
"gfx-webgl2",
|
||||||
"intersection-2d",
|
"intersection-2d",
|
||||||
"particle-2d",
|
"particle-2d",
|
||||||
"physics-2d-box2d",
|
|
||||||
"profiler",
|
"profiler",
|
||||||
"skeletal-animation",
|
"skeletal-animation",
|
||||||
"spine",
|
"spine",
|
||||||
|
|||||||
Reference in New Issue
Block a user