refactor(game): 优化属性卡牌配置与UI更新逻辑
- 将AttrSet中的`note`字段统一重命名为`name`,提高字段语义清晰度 - 在CardSet中修正属性卡和药水卡名称的获取逻辑,使用新的`name`字段 - 调整HeroViewComp的health方法,增加血量变化小于等于99时不显示特效的优化 - 将HeroAttrsSystem中的自然回复计时器从1秒改为5秒,并更新相关注释 - 移除HeroViewComp中已注释的冗余UI更新代码,保持代码整洁
This commit is contained in:
@@ -84,7 +84,7 @@ function getCardBaseInfo(type: CardType, uuid: number): ICardInfo | null {
|
||||
case CardType.Attr:
|
||||
baseInfo = AttrCards[uuid];
|
||||
if (!baseInfo) return null;
|
||||
name = baseInfo.desc.split(" ")[0] || "属性";
|
||||
name = baseInfo.name || "属性";
|
||||
desc = baseInfo.desc;
|
||||
icon = baseInfo.icon;
|
||||
kind = CardKind.Attr;
|
||||
@@ -117,7 +117,7 @@ function getCardBaseInfo(type: CardType, uuid: number): ICardInfo | null {
|
||||
case CardType.Potion:
|
||||
baseInfo = PotionCards[uuid];
|
||||
if (!baseInfo) return null;
|
||||
name = baseInfo.note || "药水";
|
||||
name = baseInfo.name || "药水";
|
||||
desc = baseInfo.desc;
|
||||
icon = baseInfo.icon;
|
||||
kind = CardKind.Buff; // 药水归类为 Buff 类型的卡片显示
|
||||
|
||||
Reference in New Issue
Block a user