From 73ca2ffbf0dcd38e47437a9f600dfa19bedd9d3d Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 21 Apr 2026 15:39:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=95=8C=E9=9D=A2):=20=E4=B8=BA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=98=B6=E6=AE=B5=E5=88=87=E6=8D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在任务阶段切换时,为阶段节点添加缩放动画,提升视觉反馈和心流体验。动画在准备开始/结束和战斗开始/结束阶段触发,包含放大和回弹效果。 --- assets/script/game/common/config/heros.md | 10 ++++++++-- assets/script/game/map/MissionComp.ts | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/assets/script/game/common/config/heros.md b/assets/script/game/common/config/heros.md index fa62885e..f902950f 100644 --- a/assets/script/game/common/config/heros.md +++ b/assets/script/game/common/config/heros.md @@ -1,5 +1,3 @@ -盾战:获得护盾,抵御3次攻击, - 攻击类型: 普通: 近战无 普通魔法:水球 @@ -27,3 +25,11 @@ 战斗开始技能触发2次 战斗结束技能触发2次 被攻击技能触发2次 + +战士1:普通攻击 : 被攻击3次获得3次格挡的护盾 +战士2: : +战士3: : +战士4: : +战士5: : + + diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 2dc8f8e3..8e738a8e 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -27,7 +27,7 @@ * - CardInitCoins —— 初始金币数 * - UIID.Victory —— 结算弹窗 */ -import { _decorator, Vec3,Animation, instantiate, Prefab, Node, NodeEventType, ProgressBar, Label, CCInteger } from "cc"; +import { _decorator, Vec3,Animation, instantiate, Prefab, Node, NodeEventType, ProgressBar, Label, CCInteger, tween, v3, Tween } 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 { smc } from "../common/SingletonModuleComp"; @@ -306,6 +306,19 @@ export class MissionComp extends CCComp { if (label) { label.string = MissionComp.PhaseNameMap[targetPhase] || "未知"; } + + // 阶段切换动感表现:针对阶段变化加入缩放与回弹动画,让流程充满心流体验 + if (targetPhase === MissionPhase.PrepareStart || + targetPhase === MissionPhase.PrepareEnd || + targetPhase === MissionPhase.BattleStart || + targetPhase === MissionPhase.BattleEnd) { + Tween.stopAllByTarget(phaseNode); + phaseNode.scale = v3(0.5, 0.5, 1); + tween(phaseNode) + .to(0.3, { scale: v3(1.5, 1.5, 1) }, { easing: "backOut" }) + .to(0.2, { scale: v3(1, 1, 1) }, { easing: "sineInOut" }) + .start(); + } } }