blueshell
Advanced tools
Comparing version 5.0.1-ws746.1 to 5.1.0
@@ -20,3 +20,4 @@ import { ResultCode, BlueshellState, BaseNode, Conditional, NodeStorage } from '../../models'; | ||
protected _afterEvent(res: ResultCode, state: S, event: E): ResultCode; | ||
protected onEvent(state: S, event: E): ResultCode; | ||
get symbol(): string; | ||
} |
@@ -25,3 +25,3 @@ "use strict"; | ||
const storage = this.getNodeStorage(state); | ||
if (storage.running || this.conditional(state, event)) { | ||
if (storage.running !== undefined || this.conditional(state, event)) { | ||
if (storage.beganAtLeastOneLoop) { | ||
@@ -62,2 +62,5 @@ Base_1.Action.treePublisher.publishResult(state, event, false); | ||
} | ||
onEvent(state, event) { | ||
return this.handleChild(state, event); | ||
} | ||
get symbol() { | ||
@@ -64,0 +67,0 @@ return '↻'; |
@@ -72,4 +72,4 @@ "use strict"; | ||
const testAction = new TestAction('testAction', [ | ||
{ rc: lib_1.rc.RUNNING, inc: false }, | ||
{ rc: lib_1.rc.SUCCESS, inc: true }, | ||
{ rc: lib_1.rc.RUNNING, inc: true }, | ||
{ rc: lib_1.rc.SUCCESS, inc: false }, | ||
]); | ||
@@ -85,11 +85,11 @@ const uut = new lib_1.decorators.While('uut', (state, event) => { | ||
chai_1.assert.strictEqual(lib_1.rc.RUNNING, result); | ||
chai_1.assert.strictEqual(state.counter, 0); | ||
chai_1.assert.strictEqual(state.counter, 1); | ||
chai_1.assert.strictEqual(testAction.eventCount, 1); | ||
result = uut.handleEvent(state, 0); | ||
chai_1.assert.strictEqual(lib_1.rc.RUNNING, result); | ||
chai_1.assert.strictEqual(state.counter, 1); | ||
chai_1.assert.strictEqual(state.counter, 2); | ||
chai_1.assert.strictEqual(testAction.eventCount, 3); | ||
result = uut.handleEvent(state, 0); | ||
chai_1.assert.strictEqual(lib_1.rc.RUNNING, result); | ||
chai_1.assert.strictEqual(state.counter, 2); | ||
chai_1.assert.strictEqual(state.counter, 3); | ||
chai_1.assert.strictEqual(testAction.eventCount, 5); | ||
@@ -96,0 +96,0 @@ result = uut.handleEvent(state, 0); |
@@ -35,3 +35,3 @@ import { ResultCode, BlueshellState, BaseNode, rc, Conditional, NodeStorage } from '../../models'; | ||
if (storage.running || this.conditional(state, event)) { | ||
if (storage.running !== undefined || this.conditional(state, event)) { | ||
if (storage.beganAtLeastOneLoop) { | ||
@@ -74,2 +74,6 @@ Action.treePublisher.publishResult(state, event, false); | ||
protected onEvent(state: S, event: E): ResultCode { | ||
return this.handleChild(state, event); | ||
} | ||
get symbol(): string { | ||
@@ -76,0 +80,0 @@ return '↻'; |
@@ -34,3 +34,3 @@ { | ||
"uuid": "3.3.2", | ||
"ws": "7.4.6" | ||
"ws": "7.2.1" | ||
}, | ||
@@ -112,3 +112,3 @@ "description": "A Behavior Tree implementation in modern Javascript", | ||
"types": "dist/index.d.ts", | ||
"version": "5.0.1-ws746.1" | ||
"version": "5.1.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
527213
8586
0