feat(界面): 为任务阶段切换添加缩放动画效果
在任务阶段切换时,为阶段节点添加缩放动画,提升视觉反馈和心流体验。动画在准备开始/结束和战斗开始/结束阶段触发,包含放大和回弹效果。
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
盾战:获得护盾,抵御3次攻击,
|
|
||||||
|
|
||||||
攻击类型:
|
攻击类型:
|
||||||
普通: 近战无
|
普通: 近战无
|
||||||
普通魔法:水球
|
普通魔法:水球
|
||||||
@@ -27,3 +25,11 @@
|
|||||||
战斗开始技能触发2次
|
战斗开始技能触发2次
|
||||||
战斗结束技能触发2次
|
战斗结束技能触发2次
|
||||||
被攻击技能触发2次
|
被攻击技能触发2次
|
||||||
|
|
||||||
|
战士1:普通攻击 : 被攻击3次获得3次格挡的护盾
|
||||||
|
战士2: :
|
||||||
|
战士3: :
|
||||||
|
战士4: :
|
||||||
|
战士5: :
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* - CardInitCoins —— 初始金币数
|
* - CardInitCoins —— 初始金币数
|
||||||
* - UIID.Victory —— 结算弹窗
|
* - 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 { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
@@ -306,6 +306,19 @@ export class MissionComp extends CCComp {
|
|||||||
if (label) {
|
if (label) {
|
||||||
label.string = MissionComp.PhaseNameMap[targetPhase] || "未知";
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user