重构黑板数据结构

This commit is contained in:
gongxh
2025-09-03 10:54:07 +08:00
parent 7cd19a373b
commit e9a0a15035
11 changed files with 379 additions and 305 deletions

View File

@@ -156,8 +156,8 @@ enum Status {
```typescript
// 在节点中使用黑板
class CustomAction extends BaseNode {
tick<T>(tree: BehaviorTree<T>): Status {
class CustomAction extends BTNode {
tick: Status {
// 获取数据 - 使用节点实例作为命名空间
const data = tree.blackboard.get<string>("key", this);