feat(skill): 调整技能提示的动画和样式
- 技能提示现在会短暂停留后垂直向上淡出,而非立即随机漂移 - 调整技能提示的位置、缩放和文本样式以改善视觉效果 - 移除技能提示的粗体样式,使整体显示更加协调
This commit is contained in:
@@ -2135,7 +2135,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 20,
|
||||
"y": -20,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2201,8 +2201,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -2257,7 +2257,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -65.359375,
|
||||
"x": -54.4580078125,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -3982,7 +3982,7 @@
|
||||
},
|
||||
"_alignFlags": 10,
|
||||
"_target": null,
|
||||
"_left": -15,
|
||||
"_left": -8,
|
||||
"_right": 0.359375,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
@@ -4031,7 +4031,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100.71875,
|
||||
"width": 92.916015625,
|
||||
"height": 29.2
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -4080,7 +4080,7 @@
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": true,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
|
||||
@@ -102,7 +102,7 @@ export class TooltipCom extends CCComp {
|
||||
const skillConfig = SkillSet[this.s_uuid];
|
||||
const skillName = skillConfig ? "<" + skillConfig.name + ">" : "";
|
||||
this.setupLabel("skill", "name", skillName+this.value);
|
||||
this.node.setPosition(v3(this.node.position.x, currentY));
|
||||
// this.node.setPosition(v3(this.node.position.x, currentY));
|
||||
this.node.setSiblingIndex(topSiblingIndex);
|
||||
break;
|
||||
case TooltipTypes.uskill:
|
||||
@@ -153,13 +153,25 @@ export class TooltipCom extends CCComp {
|
||||
// 1. 爆发阶段 (Pop)
|
||||
t.to(this.popDuration, { scale: v3(sx * scaleMax, scaleMax, 1) }, { easing: 'backOut' });
|
||||
|
||||
// 2. 漂移阶段 (Drift) & 3. 淡出 (Fade)
|
||||
// 并行执行:恢复缩放 + 位移 + 淡出
|
||||
t.parallel(
|
||||
tween(this.node).to(this.popDuration, { scale: v3(sx * 1.2, 1.2, 1) }), // 回弹到正常大小 (稍微放大)
|
||||
tween(this.node).by(this.driftDuration, { position: v3(isHeal ? 0 : randomX, moveY, 0) }, { easing: 'sineOut' }), // 治疗垂直飘,其他随机飘
|
||||
tween(this._uiOpacity).delay(this.driftDuration - this.fadeDuration).to(this.fadeDuration, { opacity: 0 }) // 最后阶段淡出
|
||||
);
|
||||
const isSkill = this.stype === TooltipTypes.skill;
|
||||
|
||||
if (isSkill) {
|
||||
// 技能类型的提示:回弹后停留 0.5 秒,然后向上淡出
|
||||
t.to(this.popDuration, { scale: v3(sx * 1.2, 1.2, 1) });
|
||||
t.delay(0.5);
|
||||
t.parallel(
|
||||
tween(this.node).by(this.driftDuration, { position: v3(0, moveY, 0) }, { easing: 'sineOut' }),
|
||||
tween(this._uiOpacity).delay(this.driftDuration - this.fadeDuration).to(this.fadeDuration, { opacity: 0 })
|
||||
);
|
||||
} else {
|
||||
// 2. 漂移阶段 (Drift) & 3. 淡出 (Fade)
|
||||
// 其他类型提示:并行执行恢复缩放、位移和淡出
|
||||
t.parallel(
|
||||
tween(this.node).to(this.popDuration, { scale: v3(sx * 1.2, 1.2, 1) }), // 回弹到正常大小 (稍微放大)
|
||||
tween(this.node).by(this.driftDuration, { position: v3(isHeal ? 0 : randomX, moveY, 0) }, { easing: 'sineOut' }), // 治疗垂直飘,其他随机飘
|
||||
tween(this._uiOpacity).delay(this.driftDuration - this.fadeDuration).to(this.fadeDuration, { opacity: 0 }) // 最后阶段淡出
|
||||
);
|
||||
}
|
||||
|
||||
// 结束销毁
|
||||
t.call(() => {
|
||||
|
||||
Reference in New Issue
Block a user