fix(hero): 修复英雄视图初始化时血条显示状态问题
重置血条UI显示状态以确保模型存在时正确显示
This commit is contained in:
@@ -112,6 +112,11 @@ export class HeroViewComp extends CCComp {
|
||||
this.top_node.getChildByName("shield").active = false;
|
||||
// 初始隐藏血条(有更新时才显示)
|
||||
this.top_node.active = false;
|
||||
|
||||
// 🔥 重置血条 UI 显示状态
|
||||
if (this.model) {
|
||||
this.hp_show();
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 UI 节点引用 */
|
||||
|
||||
Reference in New Issue
Block a user