refactor(config,map): 统一抽离卡片背景颜色配置

将多处硬编码的卡片等级背景颜色数组移至公共配置文件,
同时重构英雄列表组件的等级显示逻辑,替换为标签直接赋值。
This commit is contained in:
panFD
2026-08-23 23:52:20 +08:00
parent bef521683c
commit 41842f2b67
5 changed files with 25 additions and 37 deletions

View File

@@ -195,3 +195,9 @@ export function getLvColor(lv: number): Color {
default: return Color.WHITE;
}
}
/**
* card_lv → 背景颜色节点名映射1=green 2=blue 3=purple 4=yellow 5=red
* 用于 BG_node 下子节点的显隐切换
*/
export const CARD_LV_BG_COLORS: string[] = ["green", "blue", "purple", "yellow", "red"];