refactor(behavior-tree)!: 迁移到 Runtime 执行器架构 (#196)

* refactor(behavior-tree)!: 迁移到 Runtime 执行器架构

* fix(behavior-tree): 修复LogAction中的ReDoS安全漏洞

* feat(behavior-tree): 完善行为树核心功能并修复类型错误
This commit is contained in:
YHH
2025-10-31 17:27:38 +08:00
committed by GitHub
parent c58e3411fd
commit 61813e67b6
113 changed files with 7795 additions and 10564 deletions

View File

@@ -1,6 +1,5 @@
import { IService } from '@esengine/ecs-framework';
import { BlackboardValueType } from '../Types/TaskStatus';
import { BlackboardVariable } from '../Components/BlackboardComponent';
import { BlackboardValueType, BlackboardVariable } from '../Types/TaskStatus';
/**
* 全局黑板配置
@@ -43,13 +42,18 @@ export class GlobalBlackboardService implements IService {
description?: string;
}
): void {
this.variables.set(name, {
const variable: BlackboardVariable = {
name,
type,
value: initialValue,
readonly: options?.readonly ?? false,
description: options?.description
});
readonly: options?.readonly ?? false
};
if (options?.description !== undefined) {
variable.description = options.description;
}
this.variables.set(name, variable);
}
/**