From ae30a865c7f5d687a77fad07cf4d3be169a7bc16 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 26 Mar 2025 11:04:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=A2=B0=E6=92=9E=E6=9D=A5=E5=A4=84=E7=90=86=20=E6=8A=9B?= =?UTF-8?q?=E5=B0=84=E5=9E=8B=E6=8A=80=E8=83=BD=E9=80=BB=E8=BE=91=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @Progress.md | 7 +- @project-status.md | 14 +- assets/resources/game/heros/a3.prefab | 76 ++- assets/resources/game/heros/mor2.prefab | 76 ++- assets/resources/game/skills/apup.prefab | 465 ------------------ assets/resources/game/skills/apup.prefab.meta | 13 - assets/resources/game/skills/ball_blue.prefab | 84 +++- assets/resources/game/skills/heath.prefab | 355 ------------- .../resources/game/skills/heath.prefab.meta | 13 - assets/resources/game/skills/heath2.prefab | 368 -------------- .../resources/game/skills/heath2.prefab.meta | 13 - assets/script/Main.ts | 4 +- assets/script/game/common/config/SkillSet.ts | 20 +- assets/script/game/common/config/heroSet.ts | 76 +-- .../common/ecs/position/EcsPositionSystem.ts | 2 +- assets/script/game/hero/HeroViewComp.ts | 39 +- assets/script/game/map/MissionHeroComp.ts | 7 +- assets/script/game/map/MissionMonComp.ts | 19 +- assets/script/game/skill/EcsSkillSystem.ts | 12 - .../script/game/skill/EcsSkillSystem.ts.meta | 9 - assets/script/game/skill/HeroSkillSystem.ts | 36 +- assets/script/game/skills/SkillCom.ts | 29 +- settings/v2/packages/engine.json | 3 +- 23 files changed, 388 insertions(+), 1352 deletions(-) delete mode 100644 assets/resources/game/skills/apup.prefab delete mode 100644 assets/resources/game/skills/apup.prefab.meta delete mode 100644 assets/resources/game/skills/heath.prefab delete mode 100644 assets/resources/game/skills/heath.prefab.meta delete mode 100644 assets/resources/game/skills/heath2.prefab delete mode 100644 assets/resources/game/skills/heath2.prefab.meta delete mode 100644 assets/script/game/skill/EcsSkillSystem.ts delete mode 100644 assets/script/game/skill/EcsSkillSystem.ts.meta diff --git a/@Progress.md b/@Progress.md index 2e73dca4..69ca3c20 100644 --- a/@Progress.md +++ b/@Progress.md @@ -10,4 +10,9 @@ - 修改了直线技能的结束条件,改为到达目标点时销毁 - 移除了不必要的屏幕边界检测 - 优化了技能伤害延迟计算逻辑 -- 为抛物线类型技能添加了基于距离和速度的动态延迟计算 \ No newline at end of file +- 为抛物线类型技能添加了基于距离和速度的动态延迟计算 + +## 技能系统改进 +- 优化了技能效果延迟时间的计算 +- 添加了目标移动速度的考虑 +- 实现了相向运动时的相对速度计算 \ No newline at end of file diff --git a/@project-status.md b/@project-status.md index 39391b04..5044b1f5 100644 --- a/@project-status.md +++ b/@project-status.md @@ -8,6 +8,8 @@ - 确保技能行为符合设计意图 - 实现了抛物线技能的动态伤害延迟计算 - 保持了其他类型技能的默认延迟时间 +- 在技能系统中实现了相对速度的计算 +- 优化了技能效果的延迟时间计算机制 ## 下一步工作建议 - 测试 EndAnmCom 组件在不同类型技能上的表现 @@ -18,4 +20,14 @@ - 验证不同距离和速度下的技能表现 - 测试抛物线技能在不同距离下的伤害延迟表现 - 验证伤害时机是否与技能动画同步 -- 考虑是否需要为其他类型技能添加自定义延迟计算 \ No newline at end of file +- 考虑是否需要为其他类型技能添加自定义延迟计算 + +## 待处理的任务 +- 可能需要添加更复杂的相对运动计算 +- 考虑添加不同角度的相对运动支持 +- 可能需要添加目标加速度的考虑 + +## 下一步计划 +1. 验证相对速度计算的准确性 +2. 考虑添加更多运动参数的支持 +3. 可能需要添加碰撞预测功能 \ No newline at end of file diff --git a/assets/resources/game/heros/a3.prefab b/assets/resources/game/heros/a3.prefab index 3f8db601..6ea7eff1 100644 --- a/assets/resources/game/heros/a3.prefab +++ b/assets/resources/game/heros/a3.prefab @@ -59,10 +59,16 @@ }, { "__id__": 89 + }, + { + "__id__": 91 + }, + { + "__id__": 93 } ], "_prefab": { - "__id__": 91 + "__id__": 95 }, "_lpos": { "__type__": "cc.Vec3", @@ -1403,6 +1409,74 @@ "__type__": "cc.CompPrefabInfo", "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", "root": { diff --git a/assets/resources/game/heros/mor2.prefab b/assets/resources/game/heros/mor2.prefab index 1f41f3bb..ce5796c2 100644 --- a/assets/resources/game/heros/mor2.prefab +++ b/assets/resources/game/heros/mor2.prefab @@ -59,10 +59,16 @@ }, { "__id__": 89 + }, + { + "__id__": 91 + }, + { + "__id__": 93 } ], "_prefab": { - "__id__": 91 + "__id__": 95 }, "_lpos": { "__type__": "cc.Vec3", @@ -1403,6 +1409,74 @@ "__type__": "cc.CompPrefabInfo", "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", "root": { diff --git a/assets/resources/game/skills/apup.prefab b/assets/resources/game/skills/apup.prefab deleted file mode 100644 index 1ff75df1..00000000 --- a/assets/resources/game/skills/apup.prefab +++ /dev/null @@ -1,465 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "apup", - "_objFlags": 0, - "__editorExtras__": {}, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "apup", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - }, - { - "__id__": 14 - } - ], - "_active": true, - "_components": [ - { - "__id__": 20 - }, - { - "__id__": 22 - }, - { - "__id__": 24 - } - ], - "_prefab": { - "__id__": 26 - }, - "_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.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 3 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 2 - }, - "asset": { - "__uuid__": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861", - "__expectedType__": "cc.Prefab" - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": { - "__id__": 4 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "80t5h5Hd1H2YZB/aurwYsr", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 5 - }, - { - "__id__": 7 - }, - { - "__id__": 8 - }, - { - "__id__": 9 - }, - { - "__id__": 10 - }, - { - "__id__": 11 - }, - { - "__id__": 13 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_name" - ], - "value": "skill" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "c46/YsCPVOJYA4mWEpNYRx" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -100, - "y": 300, - "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": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, - "z": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 12 - }, - "propertyPath": [ - "_spriteFrame" - ], - "value": { - "__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@511ad", - "__expectedType__": "cc.SpriteFrame" - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "85FjuP7AFBvr2ZutPHmCqx" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_active" - ], - "value": true - }, - { - "__type__": "cc.Node", - "_name": "Node", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 15 - }, - { - "__id__": 17 - } - ], - "_prefab": { - "__id__": 19 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 171.25, - "y": -15, - "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__": 14 - }, - "_enabled": true, - "__prefab": { - "__id__": 16 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 606.8800048828125, - "height": 158.0500030517578 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.49995056884547934, - "y": 0.231698818252427 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a20gdPTTBHq4UBWdhvq1Ey" - }, - { - "__type__": "sp.Skeleton", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 14 - }, - "_enabled": true, - "__prefab": { - "__id__": 18 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_skeletonData": { - "__uuid__": "36543599-d11a-48e3-b9bd-3eca62e3ef62", - "__expectedType__": "sp.SkeletonData" - }, - "defaultSkin": "default", - "defaultAnimation": "", - "_premultipliedAlpha": true, - "_timeScale": 1, - "_preCacheMode": 0, - "_cacheMode": 0, - "_sockets": [], - "_useTint": false, - "_debugMesh": false, - "_debugBones": false, - "_debugSlots": false, - "_enableBatch": false, - "loop": true, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "5abLvmZJpDOKHToEfr25bJ" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "45DBRQl1FG+KeoA4R9kNp9", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 21 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 720, - "height": 60 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "63NP9yq3hEUKD/OZZZ5t7x" - }, - { - "__type__": "45646oIyIdA24W+0c5rdELD", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 23 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "8ahZv91itPcYJm8S0veHYl" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 25 - }, - "playOnLoad": true, - "_clips": [ - { - "__uuid__": "022b51c2-50bd-4f24-9f26-c5d77f3b2d8c", - "__expectedType__": "cc.AnimationClip" - } - ], - "_defaultClip": { - "__uuid__": "022b51c2-50bd-4f24-9f26-c5d77f3b2d8c", - "__expectedType__": "cc.AnimationClip" - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "684O4uajxIsKmwoOacfpUS" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 2 - } - ] - } -] \ No newline at end of file diff --git a/assets/resources/game/skills/apup.prefab.meta b/assets/resources/game/skills/apup.prefab.meta deleted file mode 100644 index a3ab0036..00000000 --- a/assets/resources/game/skills/apup.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.50", - "importer": "prefab", - "imported": true, - "uuid": "0be88337-2c27-40b2-b007-bd1721ce6564", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "apup" - } -} diff --git a/assets/resources/game/skills/ball_blue.prefab b/assets/resources/game/skills/ball_blue.prefab index 6d88f8ae..ab21e3aa 100644 --- a/assets/resources/game/skills/ball_blue.prefab +++ b/assets/resources/game/skills/ball_blue.prefab @@ -32,10 +32,16 @@ }, { "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 } ], "_prefab": { - "__id__": 14 + "__id__": 18 }, "_lpos": { "__type__": "cc.Vec3", @@ -130,8 +136,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 40, - "height": 40 + "width": 30, + "height": 30 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -216,8 +222,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 40, - "height": 40 + "width": 30, + "height": 30 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -277,6 +283,74 @@ "__type__": "cc.CompPrefabInfo", "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": 1, + "_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", "root": { diff --git a/assets/resources/game/skills/heath.prefab b/assets/resources/game/skills/heath.prefab deleted file mode 100644 index dede0e1b..00000000 --- a/assets/resources/game/skills/heath.prefab +++ /dev/null @@ -1,355 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "heath", - "_objFlags": 0, - "__editorExtras__": {}, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "heath", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - } - ], - "_active": true, - "_components": [ - { - "__id__": 13 - }, - { - "__id__": 15 - }, - { - "__id__": 17 - }, - { - "__id__": 19 - }, - { - "__id__": 21 - } - ], - "_prefab": { - "__id__": 23 - }, - "_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.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 3 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 2 - }, - "asset": { - "__uuid__": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861", - "__expectedType__": "cc.Prefab" - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": { - "__id__": 4 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "80t5h5Hd1H2YZB/aurwYsr", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 5 - }, - { - "__id__": 7 - }, - { - "__id__": 8 - }, - { - "__id__": 9 - }, - { - "__id__": 10 - }, - { - "__id__": 11 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_name" - ], - "value": "skill" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "c46/YsCPVOJYA4mWEpNYRx" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -260, - "y": 300, - "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": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, - "z": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 12 - }, - "propertyPath": [ - "_spriteFrame" - ], - "value": { - "__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@f7424", - "__expectedType__": "cc.SpriteFrame" - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "85FjuP7AFBvr2ZutPHmCqx" - ] - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 14 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 720, - "height": 60 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "63NP9yq3hEUKD/OZZZ5t7x" - }, - { - "__type__": "45646oIyIdA24W+0c5rdELD", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 16 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "8ahZv91itPcYJm8S0veHYl" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 18 - }, - "playOnLoad": true, - "_clips": [ - { - "__uuid__": "4a33f85f-b64d-4336-b751-324ee389ee79", - "__expectedType__": "cc.AnimationClip" - } - ], - "_defaultClip": { - "__uuid__": "4a33f85f-b64d-4336-b751-324ee389ee79", - "__expectedType__": "cc.AnimationClip" - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "684O4uajxIsKmwoOacfpUS" - }, - { - "__type__": "6a7fejJxHlM5r/TS8IFF1Kq", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": false, - "__prefab": { - "__id__": 20 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "3fysFPaqZDX5SZP/okxb81" - }, - { - "__type__": "61a56EcF3JMl75YeV4T92Pz", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": false, - "__prefab": { - "__id__": 22 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "5cxhQwQtJNOIpB58h6Awp8" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 2 - } - ] - } -] \ No newline at end of file diff --git a/assets/resources/game/skills/heath.prefab.meta b/assets/resources/game/skills/heath.prefab.meta deleted file mode 100644 index bb4bc13a..00000000 --- a/assets/resources/game/skills/heath.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.50", - "importer": "prefab", - "imported": true, - "uuid": "e50de922-fc66-47f7-acfa-968b6710c868", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "heath" - } -} diff --git a/assets/resources/game/skills/heath2.prefab b/assets/resources/game/skills/heath2.prefab deleted file mode 100644 index 1eb9a470..00000000 --- a/assets/resources/game/skills/heath2.prefab +++ /dev/null @@ -1,368 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "heath2", - "_objFlags": 0, - "__editorExtras__": {}, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "heath2", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - } - ], - "_active": true, - "_components": [ - { - "__id__": 14 - }, - { - "__id__": 16 - }, - { - "__id__": 18 - }, - { - "__id__": 20 - }, - { - "__id__": 22 - } - ], - "_prefab": { - "__id__": 24 - }, - "_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.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 3 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 2 - }, - "asset": { - "__uuid__": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861", - "__expectedType__": "cc.Prefab" - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": { - "__id__": 4 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "80t5h5Hd1H2YZB/aurwYsr", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 5 - }, - { - "__id__": 7 - }, - { - "__id__": 8 - }, - { - "__id__": 9 - }, - { - "__id__": 10 - }, - { - "__id__": 11 - }, - { - "__id__": 13 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_name" - ], - "value": "skill" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "c46/YsCPVOJYA4mWEpNYRx" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -180, - "y": 300, - "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": [ - "_lscale" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, - "z": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 12 - }, - "propertyPath": [ - "_spriteFrame" - ], - "value": { - "__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@2085a", - "__expectedType__": "cc.SpriteFrame" - } - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "85FjuP7AFBvr2ZutPHmCqx" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 6 - }, - "propertyPath": [ - "_active" - ], - "value": true - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 15 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 720, - "height": 60 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "63NP9yq3hEUKD/OZZZ5t7x" - }, - { - "__type__": "45646oIyIdA24W+0c5rdELD", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 17 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "8ahZv91itPcYJm8S0veHYl" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 19 - }, - "playOnLoad": true, - "_clips": [ - { - "__uuid__": "022b51c2-50bd-4f24-9f26-c5d77f3b2d8c", - "__expectedType__": "cc.AnimationClip" - } - ], - "_defaultClip": { - "__uuid__": "022b51c2-50bd-4f24-9f26-c5d77f3b2d8c", - "__expectedType__": "cc.AnimationClip" - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "684O4uajxIsKmwoOacfpUS" - }, - { - "__type__": "9e0d3yayihFMKm6st+kCG3D", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": false, - "__prefab": { - "__id__": 21 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "40ZOnM4A1JXoRtABQW5hQD" - }, - { - "__type__": "61a56EcF3JMl75YeV4T92Pz", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": false, - "__prefab": { - "__id__": 23 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "f8RJHCsExJuZp1M4gVjPvg" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "c46/YsCPVOJYA4mWEpNYRx", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 2 - } - ] - } -] \ No newline at end of file diff --git a/assets/resources/game/skills/heath2.prefab.meta b/assets/resources/game/skills/heath2.prefab.meta deleted file mode 100644 index b5511b29..00000000 --- a/assets/resources/game/skills/heath2.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.50", - "importer": "prefab", - "imported": true, - "uuid": "04721691-8407-48bc-87ea-af28445cc8da", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "heath2" - } -} diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 2d5d5cf9..65584f1a 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -7,7 +7,6 @@ import { UIConfigData } from './game/common/config/GameUIConfig'; import { smc } from './game/common/SingletonModuleComp'; import { Initialize } from './game/initialize/Initialize'; import { EcsPositionSystem } from './game/common/ecs/position/EcsPositionSystem'; -import { EcsSkillSystem } from './game/skill/EcsSkillSystem'; const { ccclass, property } = _decorator; @@ -25,8 +24,7 @@ export class Main extends Root { } protected async initEcsSystem() { - oops.ecs.add(new EcsPositionSystem()); - oops.ecs.add(new EcsSkillSystem()); + // oops.ecs.add(new EcsPositionSystem()); // oops.ecs.add(new EcsRoleSystem()); // oops.ecs.add(new EcsInitializeSystem()); diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 8d649737..03278f96 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -76,16 +76,16 @@ info:技能描述 */ export const SkillSet = { - 6001:{uuid:6001,name:"凛冬之触",sp_name:"ball_blue",path:"6001",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:1,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:1,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:1,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:1,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%攻击的伤害"}, - 6005:{uuid:6005,name:"破空斩击",sp_name:"patk",path:"6005",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:1,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%伤害"}, - 6006:{uuid:6006,name:"穿心箭矢",sp_name:"arrow",path:"6006",TargetType:1,TargetGroup:3,act:"atk",CdType:1,AnimType:1,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:1,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:1,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:1,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:1,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: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_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%攻击的伤害"}, + 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%攻击的伤害"}, + 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%攻击的伤害"}, + 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%伤害"}, + 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%攻击的伤害"}, + 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%攻击的伤害"}, + 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%攻击的伤害"}, + 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%攻击的伤害"}, + 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%攻击的伤害"}, 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%攻击的伤害,有一定几率施加灼烧"}, 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%攻击伤害"}, diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index aa6446e4..0804e8d3 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -32,42 +32,42 @@ export const HeroSet = { StartPos:[-300,-350,-350] } export const HeroInfo = { - 5001:{uuid:5001,name:"神圣守护",path:"k2", quality:3,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:140,skills:[6005],tals:"说明"}, - 5002:{uuid:5002,name:"幻影剑豪",path:"k1", quality:3,kind:2,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:140,skills:[6005],tals:"说明"}, - 5003:{uuid:5003,name:"战争领主",path:"k5", quality:3,kind:2,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:140,skills:[6005],tals:"说明"}, - 5004:{uuid:5004,name:"混沌法师",path:"zh1", quality:3,kind:2,type:2,hp:200,ap:100,dis:500,a_cd:1.5,speed:100,skills:[6003],tals:"说明"}, - 5005:{uuid:5005,name:"火焰法师",path:"zh2", quality:3,kind:2,type:2,hp:200,ap:150,dis:500,a_cd:1.5,speed:120,skills:[6003],tals:"说明"}, - 5006:{uuid:5006,name:"风暴精灵",path:"m4", quality:3,kind:2,type:2,hp:200,ap:150,dis:500,a_cd:1.5,speed:100,skills:[6001],tals:"说明"}, - 5007:{uuid:5007,name:"生命圣者",path:"d1", quality:3,kind:2,type:2,hp:200,ap:100,dis:500,a_cd:1.5,speed:100,skills:[6003],tals:"说明"}, - 5008:{uuid:5008,name:"战争祭祀",path:"d2", quality:3,kind:2,type:2,hp:200,ap:100,dis:500,a_cd:1.5,speed:100,skills:[6003],tals:"说明"}, - 5009:{uuid:5009,name:"暴风射手",path:"a5", quality:3,kind:2,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:120,skills:[6006],tals:"说明"}, - 5010:{uuid:5010,name:"苍穹射手",path:"a3", quality:3,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:120,skills:[6006],tals:"说明"}, - 5011:{uuid:5011,name:"幽灵射手",path:"a4", quality:3,kind:2,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:120,skills:[6006],tals:"说明"}, - 5201:{uuid:5201,name:"兽人战士",path:"mor1", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5202:{uuid:5202,name:"兽人刺客",path:"mor2", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5203:{uuid:5203,name:"兽人护卫",path:"mor3", quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6007],tals:"说明"}, - 5204:{uuid:5204,name:"石卫", path:"mgem1",quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5205:{uuid:5205,name:"土卫", path:"mgem2",quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5206:{uuid:5206,name:"树人", path:"mgem3",quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5207:{uuid:5207,name:"小骷髅", path:"mkl1", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5208:{uuid:5208,name:"小骷髅", path:"mkl2", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5209:{uuid:5209,name:"小骷髅", path:"mkl3", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5210:{uuid:5210,name:"骷髅战士",path:"mkl4", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5211:{uuid:5211,name:"骷髅战士",path:"mkl5", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5212:{uuid:5212,name:"骷髅战士",path:"mkl6", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5213:{uuid:5213,name:"骷髅射手",path:"mkla1",quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6005],tals:"说明"}, - 5214:{uuid:5214,name:"骷髅射手",path:"mkla2",quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6005],tals:"说明"}, - 5215:{uuid:5215,name:"骷髅射手",path:"mkla3",quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6005],tals:"说明"}, - 5216:{uuid:5216,name:"元素1", path:"my1", quality:2,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1.5,speed:50,skills:[6001],tals:"说明"}, - 5217:{uuid:5217,name:"元素2", path:"my2", quality:2,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1.5,speed:50,skills:[6002],tals:"说明"}, - 5218:{uuid:5218,name:"元素3", path:"my3", quality:2,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1.5,speed:50,skills:[6003],tals:"说明"}, - 5219:{uuid:5219,name:"牛头战士",path:"mn1", quality:2,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5220:{uuid:5220,name:"牛头战士",path:"mn2", quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6010],tals:"说明"}, - 5221:{uuid:5221,name:"牛头战士",path:"mn3", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5222:{uuid:5222,name:"独眼巨人",path:"md1", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6005],tals:"说明"}, - 5223:{uuid:5223,name:"独眼巨人",path:"md2", quality:1,kind:1,type:0,hp:200,ap:100,dis:180,a_cd:1,speed:50,skills:[6008],tals:"说明"}, - 5224:{uuid:5224,name:"独眼巨人",path:"md3", quality:1,kind:1,type:1,hp:200,ap:150,dis:400,a_cd:1.2,speed:50,skills:[6005],tals:"说明"}, - 5225:{uuid:5225,name:"精英独眼",path:"md4", quality:3,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1,speed:50,skills:[6009],tals:"说明"}, - 5226:{uuid:5226,name:"精英牛头",path:"mn4", quality:3,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1,speed:50,skills:[6010],tals:"说明"}, - 5227:{uuid:5227,name:"精英兽人",path:"mor4", quality:3,kind:1,type:2,hp:200,ap:150,dis:500,a_cd:1,speed:50,skills:[6009],tals:"说明"} + 5001:{uuid:5001,name:"神圣守护",path:"k2", quality:3,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5002:{uuid:5002,name:"幻影剑豪",path:"k1", quality:3,kind:2,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5003:{uuid:5003,name:"战争领主",path:"k5", quality:3,kind:2,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5004:{uuid:5004,name:"混沌法师",path:"zh1", quality:3,kind:2,type:2,hp:200,ap:10,dis:500,a_cd:1.5,speed:500,skills:[6003],tals:"说明"}, + 5005:{uuid:5005,name:"火焰法师",path:"zh2", quality:3,kind:2,type:2,hp:200,ap:15,dis:500,a_cd:1.5,speed:500,skills:[6003],tals:"说明"}, + 5006:{uuid:5006,name:"风暴精灵",path:"m4", quality:3,kind:2,type:2,hp:200,ap:15,dis:500,a_cd:1.5,speed:500,skills:[6001],tals:"说明"}, + 5007:{uuid:5007,name:"生命圣者",path:"d1", quality:3,kind:2,type:2,hp:200,ap:10,dis:500,a_cd:1.5,speed:500,skills:[6003],tals:"说明"}, + 5008:{uuid:5008,name:"战争祭祀",path:"d2", quality:3,kind:2,type:2,hp:200,ap:10,dis:500,a_cd:1.5,speed:500,skills:[6003],tals:"说明"}, + 5009:{uuid:5009,name:"暴风射手",path:"a5", quality:3,kind:2,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6006],tals:"说明"}, + 5010:{uuid:5010,name:"苍穹射手",path:"a3", quality:3,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6006],tals:"说明"}, + 5011:{uuid:5011,name:"幽灵射手",path:"a4", quality:3,kind:2,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6006],tals:"说明"}, + 5201:{uuid:5201,name:"兽人战士",path:"mor1", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5202:{uuid:5202,name:"兽人刺客",path:"mor2", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5203:{uuid:5203,name:"兽人护卫",path:"mor3", quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6007],tals:"说明"}, + 5204:{uuid:5204,name:"石卫", path:"mgem1",quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5205:{uuid:5205,name:"土卫", path:"mgem2",quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5206:{uuid:5206,name:"树人", path:"mgem3",quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5207:{uuid:5207,name:"小骷髅", path:"mkl1", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5208:{uuid:5208,name:"小骷髅", path:"mkl2", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5209:{uuid:5209,name:"小骷髅", path:"mkl3", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5210:{uuid:5210,name:"骷髅战士",path:"mkl4", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5211:{uuid:5211,name:"骷髅战士",path:"mkl5", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5212:{uuid:5212,name:"骷髅战士",path:"mkl6", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5213:{uuid:5213,name:"骷髅射手",path:"mkla1",quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6005],tals:"说明"}, + 5214:{uuid:5214,name:"骷髅射手",path:"mkla2",quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6005],tals:"说明"}, + 5215:{uuid:5215,name:"骷髅射手",path:"mkla3",quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6005],tals:"说明"}, + 5216:{uuid:5216,name:"元素1", path:"my1", quality:2,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1.5,speed:500,skills:[6001],tals:"说明"}, + 5217:{uuid:5217,name:"元素2", path:"my2", quality:2,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1.5,speed:500,skills:[6002],tals:"说明"}, + 5218:{uuid:5218,name:"元素3", path:"my3", quality:2,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1.5,speed:500,skills:[6003],tals:"说明"}, + 5219:{uuid:5219,name:"牛头战士",path:"mn1", quality:2,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5220:{uuid:5220,name:"牛头战士",path:"mn2", quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6010],tals:"说明"}, + 5221:{uuid:5221,name:"牛头战士",path:"mn3", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5222:{uuid:5222,name:"独眼巨人",path:"md1", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6005],tals:"说明"}, + 5223:{uuid:5223,name:"独眼巨人",path:"md2", quality:1,kind:1,type:0,hp:200,ap:10,dis:180,a_cd:1,speed:500,skills:[6008],tals:"说明"}, + 5224:{uuid:5224,name:"独眼巨人",path:"md3", quality:1,kind:1,type:1,hp:200,ap:15,dis:400,a_cd:1.2,speed:500,skills:[6005],tals:"说明"}, + 5225:{uuid:5225,name:"精英独眼",path:"md4", quality:3,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1,speed:500,skills:[6009],tals:"说明"}, + 5226:{uuid:5226,name:"精英牛头",path:"mn4", quality:3,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1,speed:500,skills:[6010],tals:"说明"}, + 5227:{uuid:5227,name:"精英兽人",path:"mor4", quality:3,kind:1,type:2,hp:200,ap:15,dis:500,a_cd:1,speed:500,skills:[6009],tals:"说明"} }; \ No newline at end of file diff --git a/assets/script/game/common/ecs/position/EcsPositionSystem.ts b/assets/script/game/common/ecs/position/EcsPositionSystem.ts index acebd5ac..26b48fc5 100644 --- a/assets/script/game/common/ecs/position/EcsPositionSystem.ts +++ b/assets/script/game/common/ecs/position/EcsPositionSystem.ts @@ -3,6 +3,6 @@ import { BattleMoveSystem } from "./BattleMoveSystem"; export class EcsPositionSystem extends ecs.System { constructor() { super(); - this.add(new BattleMoveSystem()); + // this.add(new BattleMoveSystem()); } } diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 52a99ba1..8169fcc3 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -1,4 +1,4 @@ -import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite, math, clamp, Game, tween, Color} from "cc"; +import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite, math, clamp, Game, tween, Color, RigidBody, RigidBody2D} 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 { HeroSpine } from "./HeroSpine"; @@ -24,7 +24,6 @@ export class HeroViewComp extends CCComp { BUFFCOMP:BuffComp=null! enemy_pos:Vec3=null! // enemy:any=null!; - as: HeroSpine = null! anm_timer:Timer = new Timer(0.3); anm_name="idle" @@ -37,9 +36,10 @@ export class HeroViewComp extends CCComp { scale: number = 1; /** 角色阵营 1:hero -1 :mon */ type: number = 0; /**角色类型 0近战-需要贴身 1远程-保持距离 2辅助 */ fac:number=0; //阵营 0:hero 1:monster - box_group:number = BoxSet.HERO; atk_range:number = 150; + box_group:number = BoxSet.HERO; + rigid:RigidBody2D=null!; is_dead:boolean = false; //是否摧毁 @@ -120,8 +120,39 @@ export class HeroViewComp extends CCComp { onLoad() { this.as = this.getComponent(HeroSpine); + // 注册单个碰撞体的回调函数 - } /** 视图层逻辑代码分离演示 */ + let collider = this.getComponent(Collider2D); + collider.group = this.box_group; + // console.log("hero collider ",this.scale,collider); + if (collider) { + collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this); + // collider.on(Contact2DType.END_CONTACT, this.onEndContact, this); + collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this); + // collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this); + } + this.rigid = this.getComponent(RigidBody2D); + if(this.rigid.sleep){ + console.log("hero rigid sleep ",this.scale,this.rigid); + this.rigid.wakeUp(); + } + } + onBeginContact (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); + } + + onPostSolve (seCol: Collider2D, oCol: Collider2D) { + console.log("碰撞后处理 ",this.scale,seCol,oCol); + } + + /** 视图层逻辑代码分离演示 */ start () { this.as.idle() this.BUFFCOMP=this.node.getComponent(BuffComp); diff --git a/assets/script/game/map/MissionHeroComp.ts b/assets/script/game/map/MissionHeroComp.ts index 45e7eb23..cfdf897a 100644 --- a/assets/script/game/map/MissionHeroComp.ts +++ b/assets/script/game/map/MissionHeroComp.ts @@ -17,15 +17,18 @@ const { ccclass, property } = _decorator; export class MissionHeroCompComp extends CCComp { timer:Timer=new Timer(2) onLoad(){ - this.on(GameEvent.UserHeroCard,this.call_hero,this) + // this.on(GameEvent.UserHeroCard,this.call_hero,this) } start() { - + this.test_call() } protected update(dt: number): void { if(smc.mission.status != 1) return } + test_call(){ + this.addHero(5010) + } call_hero(event: string, args: any){ this.timer.reset() let hero_list =HeroList diff --git a/assets/script/game/map/MissionMonComp.ts b/assets/script/game/map/MissionMonComp.ts index fdbb0f7b..f6ffee42 100644 --- a/assets/script/game/map/MissionMonComp.ts +++ b/assets/script/game/map/MissionMonComp.ts @@ -6,6 +6,7 @@ import { BoxSet } from "../common/config/BoxSet"; import { HeroSet } from "../common/config/heroSet"; import { Missions } from "../common/config/MissionSet"; import { RandomManager } from "db://oops-framework/core/common/random/RandomManager"; +import { Timer } from "db://oops-framework/core/common/timer/Timer"; const { ccclass, property } = _decorator; @@ -13,19 +14,23 @@ const { ccclass, property } = _decorator; @ccclass('MissionMonCompComp') @ecs.register('MissionMonComp', false) export class MissionMonCompComp extends CCComp { + timer:Timer=new Timer(5) /** 视图层逻辑代码分离演示 */ start() { // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 // this.on(ModuleEvent.Cmd, this.onHandler, this); + this.test_call() + } + protected update(dt: number): void { + // if(this.timer.update(dt)){ + // this.mon_refresh() + // } + } + test_call(){ + this.addMonster(5202,0,true) } - /** 全局消息逻辑处理 */ - // private onHandler(event: string, args: any) { - // switch (event) { - // case ModuleEvent.Cmd: - // break; - // } - // } + mon_refresh(){ let num =3 let t_num= Missions[0].length diff --git a/assets/script/game/skill/EcsSkillSystem.ts b/assets/script/game/skill/EcsSkillSystem.ts deleted file mode 100644 index 33dd23c1..00000000 --- a/assets/script/game/skill/EcsSkillSystem.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { HeroSkillSystem } from "./HeroSkillSystem"; -export class EcsSkillSystem extends ecs.System { - constructor() { - super(); - // this.add(new HeroSkillSystem()); - - - - } - -} diff --git a/assets/script/game/skill/EcsSkillSystem.ts.meta b/assets/script/game/skill/EcsSkillSystem.ts.meta deleted file mode 100644 index 75b6af90..00000000 --- a/assets/script/game/skill/EcsSkillSystem.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.23", - "importer": "typescript", - "imported": true, - "uuid": "ea1f8dae-6593-46bf-b20b-a301b495a434", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skill/HeroSkillSystem.ts b/assets/script/game/skill/HeroSkillSystem.ts index 7e811b41..836cc5ab 100644 --- a/assets/script/game/skill/HeroSkillSystem.ts +++ b/assets/script/game/skill/HeroSkillSystem.ts @@ -1,26 +1,3 @@ -/** - * 这是一个 使用cocos creator 3.8.2引擎 开发的游戏英雄技能系统TS脚本 - * SkillSet 技能配置表 - * HeroViewComp 英雄视图组件 - * HeroSkillsComp 英雄技能组件 - * Skill 技能实体 - * SkillCom 技能视图组件 - * 目前实现功能: - * 1. 技能冷却 - * 2. 技能释放 - * 3. 技能目标选择 - * 4. 基础攻击技能的伤害应用 及view的伤害显示 - * 未完成功能 - - - - * 1. 技能的动画显示和运动 - * 2. debuff技能的实现和动画显示 - * 3. buff技能实现和动画显示 - */ - - - import { Node, Vec3 } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { HeroViewComp } from "../hero/HeroViewComp"; @@ -37,6 +14,7 @@ import { AnimType } from "../common/config/SkillSet"; /** 技能系统 */ @ecs.register('HeroSkillSystem') export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate { +// export class HeroSkillSystem implements ecs.ISystemUpdate { // private updateInterval: number = 0.1; // 每0.1秒更新一次 // private accumulator: number = 0; private _timers: { [key: string]: number } = {}; @@ -50,6 +28,7 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp update(e: ecs.Entity) { + return false // 处理伤害队列 this.processDamageQueue(); const view = e.get(HeroViewComp); @@ -258,18 +237,19 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp const targetView = target.get(HeroViewComp); const skillView = skillEntity.get(SkillCom); if (!casterView || !targetView || !skillView) return; - + // 计算距离 const distance = this.calculateDistance( skillView.node.position, targetView.node.position ); - // 假设技能效果移动速度为 500 units/second - const EFFECT_SPEED = 500; + // 计算实际延迟时间(秒) - const actualDelay = distance / EFFECT_SPEED; - + const actualDelay = distance / (skillView.speed+targetView.speed); + console.log("skillView:"+skillView.node.position+ " targetView:"+targetView.node.position+ " actualDelay:"+actualDelay + " dis:"+distance+ " skillView.speed:"+skillView.speed+ " targetView.speed:"+targetView.speed); + + this._damageQueue.push({ timer: actualDelay, callback: () => { diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index 0081442a..82b31c3d 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -31,7 +31,34 @@ export class SkillCom extends CCComp { prefabName: string = ""; // 预制体名称 group:number = 0; //阵营 animName: string = ""; // 动画名称 - + box_group:number = 0; //碰撞组 + protected onLoad(): void { + + + let collider = this.getComponent(Collider2D); + collider.group = this.box_group; + // console.log("hero collider ",this.scale,collider); + if (collider) { + collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this); + // collider.on(Contact2DType.END_CONTACT, this.onEndContact, this); + collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this); + // collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this); + } + + } + onBeginContact (seCol: Collider2D, oCol: Collider2D) { + + } + + onEndContact (seCol: Collider2D, oCol: Collider2D) { + + } + onPreSolve (seCol: Collider2D, oCol: Collider2D) { + + } + + onPostSolve (seCol: Collider2D, oCol: Collider2D) { + } start() { oops.message.on(GameEvent.MissionEnd, this.doDestroy, this); diff --git a/settings/v2/packages/engine.json b/settings/v2/packages/engine.json index a7b473b8..5331b8e0 100644 --- a/settings/v2/packages/engine.json +++ b/settings/v2/packages/engine.json @@ -51,7 +51,7 @@ "_value": false }, "physics-2d": { - "_value": false, + "_value": true, "_option": "physics-2d-box2d" }, "physics-2d-box2d": { @@ -134,6 +134,7 @@ "gfx-webgl2", "intersection-2d", "particle-2d", + "physics-2d-box2d", "profiler", "skeletal-animation", "spine",