refactor(hero): 优化护盾系统日志与显示逻辑

1. 新增多处护盾相关调试日志,方便追踪护盾数值变化
2. 重构HeroAttrsComp的add_shield方法,统一日志输出格式
3. 重写HeroTopBarComp的护盾显示逻辑,改为直接显示数值而非按上限比例
4. 为HeroViewComp新增护盾特效管理,实现护盾状态自动显隐
5. 清理hk1.prefab中冗余的预制体覆盖配置
This commit is contained in:
panFD
2026-09-03 23:53:37 +08:00
parent a41ff479da
commit 0a3efafbd5
6 changed files with 85 additions and 206 deletions

View File

@@ -26,34 +26,31 @@
},
{
"__id__": 22
},
{
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 43
"__id__": 31
},
{
"__id__": 45
"__id__": 33
},
{
"__id__": 47
"__id__": 35
},
{
"__id__": 49
"__id__": 37
},
{
"__id__": 51
"__id__": 39
},
{
"__id__": 53
"__id__": 41
}
],
"_prefab": {
"__id__": 55
"__id__": 43
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -459,10 +456,10 @@
"__id__": 22
},
"asset": {
"__uuid__": "e1b8a315-ece3-41a2-941e-a66861753f1b",
"__uuid__": "50c3d5e4-49f8-4bd7-a15b-cda359a0ae5c",
"__expectedType__": "cc.Prefab"
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"fileId": "5fqU0L3/FOhKaco5UkHuWT",
"instance": {
"__id__": 24
},
@@ -470,7 +467,7 @@
},
{
"__type__": "cc.PrefabInstance",
"fileId": "3a1pwLAh1NkYnlDVrAFcnS",
"fileId": "69IAw7dThHvIlVtTfXOVMZ",
"prefabRootNode": {
"__id__": 1
},
@@ -491,12 +488,6 @@
},
{
"__id__": 30
},
{
"__id__": 31
},
{
"__id__": 33
}
],
"removedComponents": []
@@ -509,166 +500,6 @@
"propertyPath": [
"_name"
],
"value": "shielded"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 32
},
"propertyPath": [
"_contentSize"
],
"value": {
"__type__": "cc.Size",
"width": 120,
"height": 100
}
},
{
"__type__": "cc.TargetInfo",
"localID": [
"63NP9yq3hEUKD/OZZZ5t7x"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_lscale"
],
"value": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 35
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 34
},
"asset": {
"__uuid__": "50c3d5e4-49f8-4bd7-a15b-cda359a0ae5c",
"__expectedType__": "cc.Prefab"
},
"fileId": "5fqU0L3/FOhKaco5UkHuWT",
"instance": {
"__id__": 36
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "69IAw7dThHvIlVtTfXOVMZ",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 37
},
{
"__id__": 39
},
{
"__id__": 40
},
{
"__id__": 41
},
{
"__id__": 42
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 38
},
"propertyPath": [
"_name"
],
"value": "top"
},
{
@@ -680,7 +511,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 38
"__id__": 26
},
"propertyPath": [
"_lpos"
@@ -695,7 +526,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 38
"__id__": 26
},
"propertyPath": [
"_lrot"
@@ -711,7 +542,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 38
"__id__": 26
},
"propertyPath": [
"_euler"
@@ -726,7 +557,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 38
"__id__": 26
},
"propertyPath": [
"_lscale"
@@ -748,7 +579,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 44
"__id__": 32
},
"_contentSize": {
"__type__": "cc.Size",
@@ -776,7 +607,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 46
"__id__": 34
},
"anm": {
"__id__": 13
@@ -797,7 +628,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 48
"__id__": 36
},
"debugMode": false,
"_id": ""
@@ -816,7 +647,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 50
"__id__": 38
},
"enabledContactListener": true,
"bullet": false,
@@ -850,7 +681,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 52
"__id__": 40
},
"tag": 0,
"_group": 4,
@@ -884,7 +715,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 54
"__id__": 42
},
"playOnLoad": false,
"_clips": [],
@@ -907,9 +738,6 @@
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 34
},
{
"__id__": 22
},