chore: release packages (#409)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b9ea8d14cf
commit
87f71e2251
@@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
"@esengine/behavior-tree": minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat: add action() and condition() methods to BehaviorTreeBuilder
|
|
||||||
|
|
||||||
Added new methods to support custom executor types directly in the builder:
|
|
||||||
|
|
||||||
- `action(implementationType, name?, config?)` - Use custom action executors registered via `@NodeExecutorMetadata`
|
|
||||||
- `condition(implementationType, name?, config?)` - Use custom condition executors
|
|
||||||
|
|
||||||
This provides a cleaner API for using custom node executors compared to the existing `executeAction()` which only supports blackboard functions.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```typescript
|
|
||||||
// Define custom executor
|
|
||||||
@NodeExecutorMetadata({
|
|
||||||
implementationType: 'AttackAction',
|
|
||||||
nodeType: NodeType.Action,
|
|
||||||
displayName: 'Attack',
|
|
||||||
category: 'Combat'
|
|
||||||
})
|
|
||||||
class AttackAction implements INodeExecutor {
|
|
||||||
execute(context: NodeExecutionContext): TaskStatus {
|
|
||||||
return TaskStatus.Success;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use in builder
|
|
||||||
const tree = BehaviorTreeBuilder.create('AI')
|
|
||||||
.selector('Root')
|
|
||||||
.action('AttackAction', 'Attack', { damage: 50 })
|
|
||||||
.end()
|
|
||||||
.build();
|
|
||||||
```
|
|
||||||
@@ -1,5 +1,41 @@
|
|||||||
# @esengine/behavior-tree
|
# @esengine/behavior-tree
|
||||||
|
|
||||||
|
## 4.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#408](https://github.com/esengine/esengine/pull/408) [`b9ea8d1`](https://github.com/esengine/esengine/commit/b9ea8d14cf38e1480f638c229f9ee150b65f0c60) Thanks [@esengine](https://github.com/esengine)! - feat: add action() and condition() methods to BehaviorTreeBuilder
|
||||||
|
|
||||||
|
Added new methods to support custom executor types directly in the builder:
|
||||||
|
- `action(implementationType, name?, config?)` - Use custom action executors registered via `@NodeExecutorMetadata`
|
||||||
|
- `condition(implementationType, name?, config?)` - Use custom condition executors
|
||||||
|
|
||||||
|
This provides a cleaner API for using custom node executors compared to the existing `executeAction()` which only supports blackboard functions.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Define custom executor
|
||||||
|
@NodeExecutorMetadata({
|
||||||
|
implementationType: 'AttackAction',
|
||||||
|
nodeType: NodeType.Action,
|
||||||
|
displayName: 'Attack',
|
||||||
|
category: 'Combat'
|
||||||
|
})
|
||||||
|
class AttackAction implements INodeExecutor {
|
||||||
|
execute(context: NodeExecutionContext): TaskStatus {
|
||||||
|
return TaskStatus.Success;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use in builder
|
||||||
|
const tree = BehaviorTreeBuilder.create('AI')
|
||||||
|
.selector('Root')
|
||||||
|
.action('AttackAction', 'Attack', { damage: 50 })
|
||||||
|
.end()
|
||||||
|
.build();
|
||||||
|
```
|
||||||
|
|
||||||
## 4.1.2
|
## 4.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@esengine/behavior-tree",
|
"name": "@esengine/behavior-tree",
|
||||||
"version": "4.1.2",
|
"version": "4.2.0",
|
||||||
"description": "ECS-based AI behavior tree system - works with any ECS framework (ESEngine, Cocos, Laya, etc.)",
|
"description": "ECS-based AI behavior tree system - works with any ECS framework (ESEngine, Cocos, Laya, etc.)",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.js",
|
"module": "dist/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user