refactor(技能系统): 重构技能施放系统并优化位置初始化

- 将SkillCastSystem重命名为SCastSystem和SACastSystem以区分不同功能
- 优化SMoveComp中位置属性的初始化,改为null避免不必要的对象创建
- 统一日志前缀使用系统名称提高可读性
- 在SACastSystem中添加目标位置检查逻辑
- 修复代码格式问题,统一缩进和注释风格
This commit is contained in:
2025-10-31 11:05:44 +08:00
parent 2b3b80b308
commit 3b21ee4048
3 changed files with 32 additions and 17 deletions

View File

@@ -10,9 +10,9 @@ import { BoxSet } from "../common/config/BoxSet";
@ecs.register('SMoveData')
export class SMoveDataComp extends ecs.Comp {
/** 起始位置 */
startPos: Vec3 = v3();
startPos: Vec3 = null;
/** 目标位置 */
targetPos: Vec3 = v3();
targetPos: Vec3 = null;
/** 移动速度 */
speed: number = 500;
/** 移动持续时间 */