fix: 修复护盾吸收和伤害显示的数字格式问题
- 移除已删除的元数据文件 - 调整技能提示UI的字体大小和尺寸 - 使用NumberFormatter格式化护盾吸收值和伤害值,确保显示整数 - 修复tooltip.prefab中一个节点的激活状态
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"importer": "text",
|
||||
"imported": true,
|
||||
"uuid": "85a49a8b-eaf5-4077-8ae6-fba263254056",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -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 { mLogger } from "../common/Logger";
|
||||
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 { SkillSet,} from "../common/config/SkillSet";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { TooltipTypes } from "../common/config/GameSet";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { Tooltip } from "../skill/Tooltip";
|
||||
import { timedCom } from "../skill/timedCom";
|
||||
@@ -292,7 +291,7 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
/** 护盾吸收提示 */
|
||||
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 = ""){
|
||||
if(anm==="") return;
|
||||
@@ -540,11 +539,12 @@ export class HeroViewComp extends CCComp {
|
||||
private showDamageImmediate(damage: number, isCrit: boolean) {
|
||||
if (!this.model) return;
|
||||
|
||||
const damageText = NumberFormatter.formatNumber(Math.max(0, Math.floor(damage)));
|
||||
this.hp_show();
|
||||
if (isCrit) {
|
||||
this.hp_tip(TooltipTypes.crit, damage.toFixed(0));
|
||||
this.hp_tip(TooltipTypes.crit, damageText);
|
||||
} else {
|
||||
this.hp_tip(TooltipTypes.life, damage.toFixed(0));
|
||||
this.hp_tip(TooltipTypes.life, damageText);
|
||||
}
|
||||
}
|
||||
reset() {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "6079465d-5e74-433e-aacb-dc3a24376f91",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user