refactor(属性): 统一默认属性定义并移除调试属性

- 新增 defaultAttrs 对象集中定义 BACK_CHANCE、DODGE、CON_RES 的默认值
- 修改 Hero 和 Monster 初始化逻辑,使用 defaultAttrs 代替硬编码值
- 移除 HeroAttrsComp 中未使用的 debugMode 装饰器属性
- 简化日志消息,移除重复的组件名前缀
- 修复 SingletonModuleComp 中属性名错误(speed 改为 dodge)
This commit is contained in:
walkpan
2026-02-06 20:38:34 +08:00
parent 84963f6a3b
commit 369c10cf62
5 changed files with 16 additions and 12 deletions

View File

@@ -93,6 +93,11 @@ export enum Attrs {
}
export const defaultAttrs = {
[Attrs.BACK_CHANCE]:0,
[Attrs.DODGE]:0,
[Attrs.CON_RES]:0,
}
/**
* 初始化英雄属性对象
* 遍历 Attrs 枚举的所有数字值,返回一个属性初始值为 0 的对象