fix: 调整英雄碰撞体积和技能配置以修复命中判定

- 统一多个英雄prefab的碰撞宽度从60改为30,优化碰撞检测
- 调整hz1英雄的_contentSize高度从10改为100,修正显示问题
- 修改atk_s1、atk_s4、atk_f2技能prefab的激活状态和碰撞器启用状态
- 移除EType枚举中的distanceEnd类型,将技能6001的消失类型改为collision
- 启用物理系统调试绘制,便于开发调试
- 调整atk_f2技能的攻击范围和锚点位置,优化技能表现
This commit is contained in:
panw
2026-03-19 16:08:07 +08:00
parent a2e3dd4924
commit e2cac41753
16 changed files with 41 additions and 40 deletions

View File

@@ -906,7 +906,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -778,7 +778,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -778,7 +778,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -754,7 +754,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -778,7 +778,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -778,7 +778,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -666,7 +666,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 80, "width": 80,
"height": 10 "height": 100
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -778,7 +778,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -775,7 +775,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 90 "height": 90
}, },
"_id": "" "_id": ""

View File

@@ -775,7 +775,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 80 "height": 80
}, },
"_id": "" "_id": ""

View File

@@ -754,7 +754,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -1051,7 +1051,7 @@
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 30,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@@ -210,6 +210,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "3arqAMBz1MvoXBzeDaL5M/", "fileId": "3arqAMBz1MvoXBzeDaL5M/",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -221,7 +223,7 @@
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 9
@@ -238,7 +240,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 40, "x": 0,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
@@ -279,13 +281,13 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 80, "width": 200,
"height": 100 "height": 200
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0 "y": 0.5
}, },
"_id": "" "_id": ""
}, },
@@ -301,7 +303,7 @@
"node": { "node": {
"__id__": 8 "__id__": 8
}, },
"_enabled": false, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 12 "__id__": 12
}, },
@@ -352,10 +354,10 @@
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
"_left": 0, "_left": -60,
"_right": 0, "_right": -60,
"_top": 0, "_top": -50,
"_bottom": 0, "_bottom": -50,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
@@ -406,8 +408,8 @@
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0.5,
"y": 0 "y": 0.5
}, },
"_id": "" "_id": ""
}, },
@@ -519,13 +521,13 @@
"_restitution": 0, "_restitution": 0,
"_offset": { "_offset": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 50, "x": 0,
"y": 50 "y": 0
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 100, "width": 300,
"height": 199.9 "height": 200
}, },
"_id": "" "_id": ""
}, },

View File

@@ -217,7 +217,7 @@
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 9
@@ -297,7 +297,7 @@
"node": { "node": {
"__id__": 8 "__id__": 8
}, },
"_enabled": false, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 12 "__id__": 12
}, },

View File

@@ -220,7 +220,7 @@
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 9
@@ -300,7 +300,7 @@
"node": { "node": {
"__id__": 8 "__id__": 8
}, },
"_enabled": false, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 12 "__id__": 12
}, },

View File

@@ -12,11 +12,11 @@ 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 PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
// |EPhysics2DDrawFlags.Pair |EPhysics2DDrawFlags.Pair
// |EPhysics2DDrawFlags.CenterOfMass |EPhysics2DDrawFlags.CenterOfMass
// |EPhysics2DDrawFlags.Joint |EPhysics2DDrawFlags.Joint
// |EPhysics2DDrawFlags.Shape; |EPhysics2DDrawFlags.Shape;
} }
protected async run() { protected async run() {
smc.initialize = ecs.getEntity<Initialize>(Initialize); smc.initialize = ecs.getEntity<Initialize>(Initialize);

View File

@@ -75,8 +75,7 @@ export enum RType {
export enum EType { export enum EType {
animationEnd = 0, //碰撞够也不消失,动画结束才消失 animationEnd = 0, //碰撞够也不消失,动画结束才消失
timeEnd = 1, //碰撞够也不消失,时间到才消失 timeEnd = 1, //碰撞够也不消失,时间到才消失
distanceEnd = 2, //碰撞够也不消失,距离到才消失 collision = 2, //碰撞次数够就消失
collision = 3, //碰撞次数够就消失
} }
//debuff类型 //debuff类型
@@ -193,7 +192,7 @@ export const SkillSet: Record<number, SkillConfig> = {
6001: { 6001: {
uuid:6001,name:"空挥",sp_name:"atk_s1",icon:"1026",TGroup:TGroup.Enemy,TType:TType.Frontline,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single, uuid:6001,name:"空挥",sp_name:"atk_s1",icon:"1026",TGroup:TGroup.Enemy,TType:TType.Frontline,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:100,hit_count:1,hitcd:0.2,speed:720,with:0, ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,
ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.distanceEnd, ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,
buffs:[],debuffs:[],info:"对前方目标造成100%攻击的伤害", buffs:[],debuffs:[],info:"对前方目标造成100%攻击的伤害",
}, },
6002: { 6002: {