Compare commits
2 Commits
9148c830c2
...
3a07a7e9d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a07a7e9d2 | ||
|
|
52fe4358ea |
File diff suppressed because it is too large
Load Diff
@@ -269,7 +269,12 @@ export class HeroViewComp extends CCComp {
|
||||
pos.y = pos.y + y;
|
||||
Tooltip.load(pos, type, value, s_uuid, this.node);
|
||||
}
|
||||
|
||||
/** 技能提示 */
|
||||
public skill_name(value: string = "", s_uuid: number = 1001, y: number = 50) {
|
||||
let pos = v3(0, 60);
|
||||
pos.y = pos.y + y;
|
||||
Tooltip.load(pos, TooltipTypes.skill, value, s_uuid, this.node);
|
||||
}
|
||||
/** 血量提示(伤害数字) */
|
||||
private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 0) {
|
||||
let x = this.node.position.x;
|
||||
|
||||
@@ -232,7 +232,11 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
const sUp = SkillUpList[s_uuid] ? SkillUpList[s_uuid] : SkillUpList[1001];
|
||||
const cNum = Math.min(2, Math.max(0, Math.floor(sUp.num ?? 0)));
|
||||
const castTimes = 1 + cNum;
|
||||
|
||||
let val=""
|
||||
if(castTimes >1){
|
||||
val = "*"+castTimes.toString
|
||||
}
|
||||
heroView.skill_name(val,s_uuid)
|
||||
for (let i = 0; i < castTimes; i++) {
|
||||
if (!heroView.node || !heroView.node.isValid) return;
|
||||
if (isFriendly) {
|
||||
|
||||
@@ -101,8 +101,8 @@ export class TooltipCom extends CCComp {
|
||||
case TooltipTypes.skill:
|
||||
const skillConfig = SkillSet[this.s_uuid];
|
||||
const skillName = skillConfig ? "<" + skillConfig.name + ">" : "";
|
||||
this.setupLabel("skill", "name", skillName);
|
||||
this.node.setPosition(v3(this.node.position.x, currentY));
|
||||
this.setupLabel("skill", "name", skillName+this.value);
|
||||
// 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' });
|
||||
|
||||
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