fix: 修复护盾吸收和伤害显示的数字格式问题

- 移除已删除的元数据文件
- 调整技能提示UI的字体大小和尺寸
- 使用NumberFormatter格式化护盾吸收值和伤害值,确保显示整数
- 修复tooltip.prefab中一个节点的激活状态
This commit is contained in:
walkpan
2026-03-23 20:55:18 +08:00
parent 32fa7a4163
commit 3756667b61
4 changed files with 14 additions and 34 deletions

View File

@@ -221,7 +221,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -57.36234375000001, "x": -57.36234375,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
@@ -262,8 +262,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 14.3251953125, "width": 10.3251953125,
"height": 43.8 "height": 39.8
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -302,7 +302,7 @@
"_horizontalAlign": 2, "_horizontalAlign": 2,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 25, "_actualFontSize": 25,
"_fontSize": 25, "_fontSize": 20,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 30, "_lineHeight": 30,
"_overflow": 0, "_overflow": 0,
@@ -358,7 +358,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -14.52494140625, "_left": -12.52494140625,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -447,7 +447,7 @@
"_horizontalAlign": 0, "_horizontalAlign": 0,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 26, "_actualFontSize": 26,
"_fontSize": 25, "_fontSize": 20,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 30, "_lineHeight": 30,
"_overflow": 2, "_overflow": 2,
@@ -755,7 +755,7 @@
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 26, "_actualFontSize": 26,
"_fontSize": 25, "_fontSize": 20,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 30, "_lineHeight": 30,
"_overflow": 2, "_overflow": 2,
@@ -900,7 +900,7 @@
"_horizontalAlign": 0, "_horizontalAlign": 0,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 26, "_actualFontSize": 26,
"_fontSize": 25, "_fontSize": 20,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 30, "_lineHeight": 30,
"_overflow": 2, "_overflow": 2,
@@ -1009,7 +1009,7 @@
"__id__": 39 "__id__": 39
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 61 "__id__": 61

View File

@@ -1,11 +0,0 @@
{
"ver": "1.0.1",
"importer": "text",
"imported": true,
"uuid": "85a49a8b-eaf5-4077-8ae6-fba263254056",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -3,11 +3,10 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { mLogger } from "../common/Logger"; import { mLogger } from "../common/Logger";
import { HeroSpine } from "./HeroSpine"; import { HeroSpine } from "./HeroSpine";
import { BoxSet, FacSet, FightSet } from "../common/config/GameSet"; import { BoxSet, FacSet, FightSet, NumberFormatter, TooltipTypes } from "../common/config/GameSet";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { SkillSet,} from "../common/config/SkillSet"; import { SkillSet,} from "../common/config/SkillSet";
import { oops } from "db://oops-framework/core/Oops"; import { oops } from "db://oops-framework/core/Oops";
import { TooltipTypes } from "../common/config/GameSet";
import { HeroAttrsComp } from "./HeroAttrsComp"; import { HeroAttrsComp } from "./HeroAttrsComp";
import { Tooltip } from "../skill/Tooltip"; import { Tooltip } from "../skill/Tooltip";
import { timedCom } from "../skill/timedCom"; import { timedCom } from "../skill/timedCom";
@@ -292,7 +291,7 @@ export class HeroViewComp extends CCComp {
/** 护盾吸收提示 */ /** 护盾吸收提示 */
shield_tip(absorbed: number) { shield_tip(absorbed: number) {
this.hp_tip(TooltipTypes.life, absorbed.toFixed(0)); this.hp_tip(TooltipTypes.life, NumberFormatter.formatNumber(Math.max(0, Math.floor(absorbed))));
} }
public palayBuff(anm: string = ""){ public palayBuff(anm: string = ""){
if(anm==="") return; if(anm==="") return;
@@ -540,11 +539,12 @@ export class HeroViewComp extends CCComp {
private showDamageImmediate(damage: number, isCrit: boolean) { private showDamageImmediate(damage: number, isCrit: boolean) {
if (!this.model) return; if (!this.model) return;
const damageText = NumberFormatter.formatNumber(Math.max(0, Math.floor(damage)));
this.hp_show(); this.hp_show();
if (isCrit) { if (isCrit) {
this.hp_tip(TooltipTypes.crit, damage.toFixed(0)); this.hp_tip(TooltipTypes.crit, damageText);
} else { } else {
this.hp_tip(TooltipTypes.life, damage.toFixed(0)); this.hp_tip(TooltipTypes.life, damageText);
} }
} }
reset() { reset() {

View File

@@ -1,9 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "6079465d-5e74-433e-aacb-dc3a24376f91",
"files": [],
"subMetas": {},
"userData": {}
}