diff --git a/assets/resources/game/skill/buff/buff.prefab b/assets/resources/game/skill/buff/buff.prefab index f9e5f3ed..c75fdfd8 100644 --- a/assets/resources/game/skill/buff/buff.prefab +++ b/assets/resources/game/skill/buff/buff.prefab @@ -99,8 +99,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.5, - "y": 0.5, + "x": 0.7, + "y": 0.7, "z": 1 }, "_mobility": 0, @@ -161,7 +161,7 @@ "r": 255, "g": 255, "b": 255, - "a": 206 + "a": 255 }, "_spriteFrame": { "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@ce362", diff --git a/assets/resources/gui/element/sbox.prefab b/assets/resources/gui/element/sbox.prefab index 96209a00..8f7392df 100644 --- a/assets/resources/gui/element/sbox.prefab +++ b/assets/resources/gui/element/sbox.prefab @@ -105,7 +105,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": 40, "z": 0 }, "_lrot": { @@ -287,7 +287,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": 40, "z": 0 }, "_lrot": { @@ -623,7 +623,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": 40, "z": 0 }, "_lrot": { @@ -798,7 +798,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": 40, "z": 0 }, "_lrot": { @@ -973,7 +973,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": 40, "z": 0 }, "_lrot": { @@ -1145,7 +1145,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -35.658, + "y": 6.375, "z": 0 }, "_lrot": { @@ -1300,7 +1300,7 @@ "_anchorPoint": { "__type__": "cc.Vec2", "x": 0.5, - "y": 0.5 + "y": 0 }, "_id": "" }, diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index 7f558840..930d7a1d 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -376,7 +376,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate * 2. 处理 buffs 配置追加 * 3. 保留完整施法信息参数,便于后续扩展更多友方效果 */ - private applyFriendlySkillEffects(_s_uuid: number, _skillLv: number, config: SkillConfig, _heroView: HeroViewComp, _cAttrsComp: HeroAttrsComp, targets: HeroViewComp[], _targetPos: Vec3 | null) { + private applyFriendlySkillEffects(_s_uuid: number, _skillLv: number, config: SkillConfig, _heroView: HeroViewComp, _cAttrsComp: HeroAttrsComp, targets: HeroViewComp[], _targetPos: Vec3 | null, isCardSkill: boolean = false) { const kind = config.kind ?? SkillKind.Support; const sUp = SkillUpList[_s_uuid] ?? SkillUpList[1001]; const sAp =config.ap+sUp.ap*_skillLv; @@ -388,7 +388,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate for (const target of applyTargets) { const startPos = _heroView?.node?.position || _targetPos; if (startPos) { - this.playFriendlyCastEffect(startPos, target, () => { + this.playFriendlyCastEffect(startPos, target, isCardSkill, () => { this.applyActualFriendlyEffect(target, kind, sAp, _cAttrsComp, config, sUp); }); } else { @@ -397,7 +397,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate } } - private playFriendlyCastEffect(startPos: Vec3, target: HeroViewComp, callback: Function) { + private playFriendlyCastEffect(startPos: Vec3, target: HeroViewComp, isCardSkill: boolean, callback: Function) { if (!target.node || !target.node.isValid) { callback(); return; @@ -411,14 +411,14 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate callback(); return; } - this.doPlayFriendlyCastEffect(startPos.clone(), target, res as Prefab, callback); + this.doPlayFriendlyCastEffect(startPos.clone(), target, res as Prefab, isCardSkill, callback); }); } else { - this.doPlayFriendlyCastEffect(startPos.clone(), target, prefab as Prefab, callback); + this.doPlayFriendlyCastEffect(startPos.clone(), target, prefab as Prefab, isCardSkill, callback); } } - private doPlayFriendlyCastEffect(startPos: Vec3, target: HeroViewComp, prefab: Prefab, callback: Function) { + private doPlayFriendlyCastEffect(startPos: Vec3, target: HeroViewComp, prefab: Prefab, isCardSkill: boolean, callback: Function) { if (!target.node || !target.node.isValid) { callback(); return; @@ -432,31 +432,19 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const node = instantiate(prefab); node.parent = parent; + + startPos.y += 15; node.setPosition(startPos); const targetPos = target.node.position.clone(); - targetPos.y += 50; - - const midX = (startPos.x + targetPos.x) / 2; - const midY = Math.max(startPos.y, targetPos.y) + 200; + targetPos.y += 15; const dist = Vec3.distance(startPos, targetPos); const duration = Math.min(0.6, Math.max(0.3, dist / 800)); - const proxy = { ratio: 0 }; - tween(proxy) - .to(duration, { ratio: 1 }, { - easing: 'sineOut', - onUpdate: () => { - if (!node.isValid) return; - const r = proxy.ratio; - const x = (1 - r) * (1 - r) * startPos.x + 2 * r * (1 - r) * midX + r * r * targetPos.x; - const y = (1 - r) * (1 - r) * startPos.y + 2 * r * (1 - r) * midY + r * r * targetPos.y; - node.setPosition(new Vec3(x, y, startPos.z)); - node.setScale(new Vec3(1 - r * 0.3, 1 - r * 0.3, 1)); - node.angle = -r * 720; - } - }) + // 统一走直线 + tween(node) + .to(duration, { position: targetPos, angle: -720 }, { easing: 'sineOut' }) .call(() => { if (node.isValid) node.destroy(); callback();