feat(技能提示): 在技能名称后显示施放次数
当技能有多次施放时,在技能名称后添加"*N"标识
This commit is contained in:
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,7 +101,7 @@ 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.setupLabel("skill", "name", skillName+this.value);
|
||||
this.node.setPosition(v3(this.node.position.x, currentY));
|
||||
this.node.setSiblingIndex(topSiblingIndex);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user