Files
walkpan a758d48914 refactor(battle): 使用GameConst统一管理魔法数字
将战斗系统中的硬编码数字替换为GameConst中的常量定义,包括AI检测频率、技能延迟、索敌范围等
2026-01-03 09:05:13 +08:00

37 lines
942 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 游戏通用常量定义
* 用于替换硬编码数字,统一管理魔法数字
*/
export const GameConst = {
/** 战斗系统常量 */
Battle: {
/** AI检测频率降低频率以优化性能 */
AI_CHECK_INTERVAL: 0.2,
/** 技能施放延迟(秒):用于动画表现衔接 */
SKILL_CAST_DELAY: 0.3,
/** 默认索敌/攻击范围 */
DEFAULT_SEARCH_RANGE: 300,
/** 默认目标X坐标右侧阵营 */
DEFAULT_TARGET_X_RIGHT: 400,
/** 默认目标X坐标左侧阵营 */
DEFAULT_TARGET_X_LEFT: -400,
/** 默认目标Z坐标 */
DEFAULT_TARGET_Z: 1,
/** 索敌时的Y轴偏移修正 */
SEARCH_Y_OFFSET: 30,
},
/** 技能相关常量 */
Skill: {
/** 最小目标数量 */
MIN_TARGET_COUNT: 1,
}
};