refactor(hero): 重构英雄头顶状态栏逻辑到独立组件
将原HeroViewComp中的头顶血条、等级、护盾UI逻辑抽离为HeroTopBarComp, 统一管理头顶状态栏的初始化、数据更新、动画和显隐逻辑,减少HeroViewComp代码冗余, 提升代码可维护性和复用性。同时更新预制体关联,适配新的组件结构。
This commit is contained in:
@@ -38,10 +38,13 @@
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 110
|
||||
},
|
||||
{
|
||||
"__id__": 112
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 112
|
||||
"__id__": 114
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -1277,7 +1280,7 @@
|
||||
"__id__": 65
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 73
|
||||
@@ -2520,8 +2523,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 70,
|
||||
"height": 20
|
||||
"width": 40,
|
||||
"height": 11
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -2534,6 +2537,34 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "cdvV5hAkdEaY6AT6urHKuf"
|
||||
},
|
||||
{
|
||||
"__type__": "c4181/FEWhKbY0D0PLdCyKi",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 113
|
||||
},
|
||||
"hpProgressBar": {
|
||||
"__id__": 53
|
||||
},
|
||||
"lvLabel": null,
|
||||
"shieldProgressBar": {
|
||||
"__id__": 77
|
||||
},
|
||||
"hpBarSprite": {
|
||||
"__id__": 36
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "3eCKBFOJhLHKqcnak/mi3d"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
||||
Reference in New Issue
Block a user