Files
esengine/.changeset/add-behavior-tree-plugin.md
YHH d2af9caae9 feat(behavior-tree): add pure BehaviorTreePlugin for Cocos/Laya integration (#400)
- Add BehaviorTreePlugin class that only depends on @esengine/ecs-framework
- Implement IPlugin interface with install(), uninstall(), setupScene() methods
- Remove esengine/ subdirectory that incorrectly depended on engine-core
- Update package documentation with correct usage examples
2025-12-30 20:31:52 +08:00

25 lines
800 B
Markdown

---
"@esengine/behavior-tree": minor
---
feat(behavior-tree): add pure BehaviorTreePlugin class for Cocos/Laya integration
- Added `BehaviorTreePlugin` class that only depends on `@esengine/ecs-framework`
- Implements `IPlugin` interface with `install()`, `uninstall()`, and `setupScene()` methods
- Removed `esengine/` subdirectory that incorrectly depended on `@esengine/engine-core`
- Updated package documentation with correct usage examples
Usage:
```typescript
import { Core, Scene } from '@esengine/ecs-framework';
import { BehaviorTreePlugin, BehaviorTreeBuilder, BehaviorTreeStarter } from '@esengine/behavior-tree';
Core.create();
const plugin = new BehaviorTreePlugin();
await Core.installPlugin(plugin);
const scene = new Scene();
plugin.setupScene(scene);
Core.setScene(scene);
```