2 Commits

Author SHA1 Message Date
pan
73b1d054d0 refactor(hero cast): add buff effect animation resolution logic
新增根据buff属性解析对应增益特效动画名的方法,并在施加永久和计时buff时播放对应特效
2026-09-07 17:22:54 +08:00
pan
d37bbbcd72 fix(hero): 修正治疗特效的资源路径与动画参数
1. 将治疗特效的资源路径从heathed改为end/heal
2. 调整治疗动画的采样率和时长以优化表现
3. 新增攻击力提升、冷却缩减的技能结束特效预制体
2026-09-07 17:18:26 +08:00
7 changed files with 583 additions and 9 deletions

View File

@@ -7,11 +7,11 @@
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 18,
"sample": 14,
"speed": 1,
"wrapMode": 1,
"enableTrsBlending": false,
"_duration": 0.3888888888888889,
"_duration": 0.5,
"_hash": 500763545,
"_tracks": [
{
@@ -69,12 +69,12 @@
"__type__": "cc.ObjectCurve",
"_times": [
0,
0.05555555555555555,
0.1111111111111111,
0.16666666666666666,
0.2222222222222222,
0.2777777777777778,
0.3333333333333333
0.07142857142857142,
0.14285714285714285,
0.21428571428571427,
0.2857142857142857,
0.35714285714285715,
0.42857142857142855
],
"_values": [
{

View File

@@ -0,0 +1,274 @@
[
{
"__type__": "cc.Prefab",
"_name": "up_ap",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "up_ap",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 12
},
"_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.Node",
"_name": "skill",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -10.802,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.2,
"y": 1.2,
"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__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 91,
"height": 118
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b4sNQPJWFKha7x75SWXmRj"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@7dc71",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0.2,
"_fillRange": 1,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9a+65VIghBm4HQxuHPQ/mg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7a5LvbdlxEc6FKa7cun2oB",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63NP9yq3hEUKD/OZZZ5t7x"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"playOnLoad": true,
"_clips": [
{
"__uuid__": "b01ee4bf-1c59-4158-806f-488e00ed7b5a",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "b01ee4bf-1c59-4158-806f-488e00ed7b5a",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c6LOemuvJKyYCqlF/yUJcr"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1 @@
{"ver":"1.1.50","importer":"prefab","imported":true,"uuid":"1e8ca165-c3f4-4d82-adfb-4715f191dd3f","files":[".json"],"subMetas":{},"userData":{"syncNodeName":"up_ap"}}

View File

@@ -0,0 +1,274 @@
[
{
"__type__": "cc.Prefab",
"_name": "up_cd",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "up_cd",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 12
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -12.537,
"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.Node",
"_name": "skill",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_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.2,
"y": 1.2,
"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__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 91,
"height": 109
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b4sNQPJWFKha7x75SWXmRj"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@57c99",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0.2,
"_fillRange": 1,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9a+65VIghBm4HQxuHPQ/mg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7a5LvbdlxEc6FKa7cun2oB",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63NP9yq3hEUKD/OZZZ5t7x"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"playOnLoad": true,
"_clips": [
{
"__uuid__": "cbac7690-586d-42bf-bd2c-2e2fc279b819",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "cbac7690-586d-42bf-bd2c-2e2fc279b819",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c6LOemuvJKyYCqlF/yUJcr"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "2eeac68b-26a6-473b-81e1-f96b654c80fd",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "up_cd"
}
}

View File

@@ -271,7 +271,7 @@ export class HeroViewComp extends CCComp {
}
/** 治疗特效 */
private heathed() {
this.spawnAnimEndFx("game/skill/buff/heathed", this.node, undefined);
this.spawnAnimEndFx("game/skill/end/heal", this.node, undefined);
}
private deaded() {
this.spawnAnimEndFx("game/skill/end/dead", this.node.parent, this.node.position);

View File

@@ -517,6 +517,13 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
}
}
/** 解析 buff 增益特效动画名:攻击提升→up_ap,攻速提升→up_cd,其余→up_blue */
private resolveBuffEndAnm(attr?: Attrs): string {
if (attr === Attrs.ap) return "up_ap";
if (attr === Attrs.speed) return "up_cd";
return "up_blue";
}
private applyActualFriendlyEffect(target: HeroViewComp, kind: SkillKind, sAp: number, _cAttrsComp: HeroAttrsComp, config: SkillConfig, _skillLv: number = 1) {
if (!target.ent) return;
const model = target.ent.get(HeroAttrsComp);
@@ -570,6 +577,8 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
_cAttrsComp.ap,
Object.keys(buffOverrides).length > 0 ? buffOverrides : undefined
);
// 播放计时 buff 增益特效:按修饰属性区分(攻击提升/攻速提升/其他)
target.playEnd(this.resolveBuffEndAnm(BuffList[config.timed_buff_id]?.modifiers?.[0]?.attr));
return;
}
@@ -577,6 +586,9 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
// buff 强化(buff_power,百分点):辅助专精天赋写入,按施法者放大永久 buff 数值
const totalBuffValue = config.ap * (1 + _cAttrsComp.buff_power / 100);
// 播放永久 buff 增益特效:按 buff 属性区分(攻击提升/攻速提升/其他)
target.playEnd(this.resolveBuffEndAnm(config.buff_type));
switch (config.buff_type) {
case Attrs.ap: {
// 攻击力按基础 ap 的百分比提升