refactor(game/constants): 移除硬编码路径配置,新增 WAVES_PER_MAP 常量

This commit is contained in:
Cloud Bot
2026-03-21 09:45:02 +00:00
parent 631c32cea0
commit 2d8c126394

View File

@@ -8,14 +8,8 @@ export const GAME_HEIGHT = 720
// HUD 高度(顶部状态栏) // HUD 高度(顶部状态栏)
export const HUD_HEIGHT = 60 export const HUD_HEIGHT = 60
// S型路径折线关键坐标点 // 每张地图的波次数
// 路径:从左侧(0,2) → 右至(11,2) → 下至(11,9) → 右至(15,9) export const WAVES_PER_MAP = 5
export const PATH_WAYPOINTS = [
{ x: 0, y: 2 },
{ x: 11, y: 2 },
{ x: 11, y: 9 },
{ x: 15, y: 9 },
] as const
// 游戏初始数值 // 游戏初始数值
export const INITIAL_HC = 200 export const INITIAL_HC = 200
@@ -30,11 +24,3 @@ export const COLOR_BUILDABLE = 0x1e3a5f // 可建塔格子:深蓝色
export const COLOR_HOVER = 0x2d5a8e // 悬停高亮:亮蓝色 export const COLOR_HOVER = 0x2d5a8e // 悬停高亮:亮蓝色
export const COLOR_BORDER = 0x0a1628 // 格子边框:深夜蓝 export const COLOR_BORDER = 0x0a1628 // 格子边框:深夜蓝
export const COLOR_HUD_BG = 0x0a1628 // HUD 背景色 export const COLOR_HUD_BG = 0x0a1628 // HUD 背景色
// 地图装饰性标记文字
export const MAP_LABELS: { col: number; row: number; text: string }[] = [
{ col: 2, row: 5, text: '面试间' },
{ col: 8, row: 5, text: '财务室' },
{ col: 4, row: 10, text: 'P8会议室' },
{ col: 13, row: 5, text: '茶水间' },
]