- 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
800 B
800 B
@esengine/behavior-tree
| @esengine/behavior-tree |
|---|
| minor |
feat(behavior-tree): add pure BehaviorTreePlugin class for Cocos/Laya integration
- Added
BehaviorTreePluginclass that only depends on@esengine/ecs-framework - Implements
IPlugininterface withinstall(),uninstall(), andsetupScene()methods - Removed
esengine/subdirectory that incorrectly depended on@esengine/engine-core - Updated package documentation with correct usage examples
Usage:
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);