refactor(config): 合并游戏常量配置并整理代码结构

- 删除 GameConst.ts 文件,将其中的战斗常量迁移至 GameSet.ts
- 在 GameSet.ts 中重新组织 FightSet、IndexSet 和 TooltipTypes 枚举,提升可读性
- 更新 SCastSystem.ts 中技能施放延迟的引用,从 GameConst 改为 FightSet
- 在 CardSet.ts 中添加空行以改善代码格式
This commit is contained in:
walkpan
2026-03-29 12:06:03 +08:00
parent 9e85ded0ef
commit 9a7bafed2f
4 changed files with 44 additions and 80 deletions

View File

@@ -5,9 +5,9 @@ import { HeroViewComp } from "./HeroViewComp";
import { DTType, SkillConfig, SkillKind, SkillSet, SkillUpList, TGroup } from "../common/config/SkillSet";
import { Skill } from "../skill/Skill";
import { smc } from "../common/SingletonModuleComp";
import { GameConst } from "../common/config/GameConst";
import { HType } from "../common/config/heroSet";
import { Attrs } from "../common/config/HeroAttrs";
import { FightSet } from "../common/config/GameSet";
/**
* ==================== 自动施法系统 ====================
@@ -123,7 +123,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
// 优先使用技能配置的前摇时间,否则使用全局默认值
// 注意:这里仍然是基于时间的延迟,受帧率波动影响。
// 若需精确同步,建议在动画中添加帧事件并在 HeroViewComp 中监听。
const delay = config.ready > 0 ? config.ready : GameConst.Battle.SKILL_CAST_DELAY;
const delay = config.ready > 0 ? config.ready : FightSet.SKILL_CAST_DELAY;
heroView.scheduleOnce(() => {
if (!smc.mission.play || smc.mission.pause || !smc.mission.in_fight) return;