fix: 修复护盾吸收和伤害显示的数字格式问题
- 移除已删除的元数据文件 - 调整技能提示UI的字体大小和尺寸 - 使用NumberFormatter格式化护盾吸收值和伤害值,确保显示整数 - 修复tooltip.prefab中一个节点的激活状态
This commit is contained in:
@@ -221,7 +221,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -57.36234375000001,
|
||||
"x": -57.36234375,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -262,8 +262,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 14.3251953125,
|
||||
"height": 43.8
|
||||
"width": 10.3251953125,
|
||||
"height": 39.8
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -302,7 +302,7 @@
|
||||
"_horizontalAlign": 2,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 30,
|
||||
"_overflow": 0,
|
||||
@@ -358,7 +358,7 @@
|
||||
},
|
||||
"_alignFlags": 8,
|
||||
"_target": null,
|
||||
"_left": -14.52494140625,
|
||||
"_left": -12.52494140625,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
@@ -447,7 +447,7 @@
|
||||
"_horizontalAlign": 0,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 26,
|
||||
"_fontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 30,
|
||||
"_overflow": 2,
|
||||
@@ -755,7 +755,7 @@
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 26,
|
||||
"_fontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 30,
|
||||
"_overflow": 2,
|
||||
@@ -900,7 +900,7 @@
|
||||
"_horizontalAlign": 0,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 26,
|
||||
"_fontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 30,
|
||||
"_overflow": 2,
|
||||
@@ -1009,7 +1009,7 @@
|
||||
"__id__": 39
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 61
|
||||
|
||||
@@ -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