@esengine/behavior-tree 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/{index.d.ts → dist/index.d.ts} +361 -73
- package/dist/index.js +4692 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -29
- package/index.cjs +0 -2
- package/index.cjs.map +0 -1
- package/index.es5.js +0 -4
- package/index.es5.js.map +0 -1
- package/index.mjs +0 -2
- package/index.mjs.map +0 -1
- package/index.umd.js +0 -2
- package/index.umd.js.map +0 -1
package/index.es5.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t=require("@esengine/ecs-framework");exports.TaskStatus=void 0,(e=exports.TaskStatus||(exports.TaskStatus={}))[e.Invalid=0]="Invalid",e[e.Success=1]="Success",e[e.Failure=2]="Failure",e[e.Running=3]="Running";var r,n,o,a,i={Composite:"composite",Decorator:"decorator",Action:"action",Condition:"condition"};function s(){return{status:exports.TaskStatus.Invalid,currentChildIndex:0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,s,"next",e)}function s(e){c(a,n,o,i,s,"throw",e)}i(void 0)}))}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(null,arguments)}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function h(){
|
|
2
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return v(c,"_invoke",function(r,n,o){var a,s,u,c=0,d=o||[],l=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,r){return a=t,s=0,u=e,p.n=r,i}};function f(r,n){for(s=r,u=n,t=0;!l&&c&&!o&&t<d.length;t++){var o,a=d[t],f=p.p,h=a[2];r>3?(o=h===n)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=f&&((o=r<2&&f<a[1])?(s=0,p.v=n,p.n=a[1]):f<h&&(o=r<3||a[0]>n||n>h)&&(a[4]=r,a[5]=n,p.n=h,s=0))}if(o||r>1)return i;throw l=!0,n}return function(o,d,h){if(c>1)throw TypeError("Generator is already running");for(l&&1===d&&f(d,h),s=d,u=h;(t=s<2?e:u)||!l;){a||(s?s<3?(s>1&&(p.n=-1),f(s,u)):p.n=u:p.v=u);try{if(c=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(l=p.n<0)?u:r.call(n,p))!==i)break}catch(t){a=e,s=1,u=t}finally{c=1}}return{value:t,done:l}}}(r,o,a),!0),c}var i={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(v(t={},n,(function(){return this})),t),l=c.prototype=s.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return u.prototype=c,v(l,"constructor",c),v(c,"constructor",u),u.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(l),v(l,o,"Generator"),v(l,n,(function(){return this})),v(l,"toString",(function(){return"[object Generator]"})),(h=function(){return{w:a,m:p}})()}function v(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,r,n){function a(t,r){v(e,t,(function(e){return this._invoke(t,r,e)}))}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},v(e,t,r,n)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}exports.CompositeType=void 0,(r=exports.CompositeType||(exports.CompositeType={})).Sequence="sequence",r.Selector="selector",r.Parallel="parallel",r.ParallelSelector="parallel-selector",r.RandomSequence="random-sequence",r.RandomSelector="random-selector",exports.DecoratorType=void 0,(n=exports.DecoratorType||(exports.DecoratorType={})).Inverter="inverter",n.Repeater="repeater",n.UntilSuccess="until-success",n.UntilFail="until-fail",n.AlwaysSucceed="always-succeed",n.AlwaysFail="always-fail",n.Conditional="conditional",n.Cooldown="cooldown",n.Timeout="timeout",exports.AbortType=void 0,(o=exports.AbortType||(exports.AbortType={})).None="none",o.Self="self",o.LowerPriority="lower-priority",o.Both="both",exports.BlackboardValueType=void 0,(a=exports.BlackboardValueType||(exports.BlackboardValueType={})).String="string",a.Number="number",a.Boolean="boolean",a.Vector2="vector2",a.Vector3="vector3",a.Object="object",a.Array="array","function"==typeof SuppressedError&&SuppressedError,exports.BehaviorTreeRuntimeComponent=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).treeAssetId="",t.autoStart=!0,t.isRunning=!1,t.nodeStates=new Map,t.blackboard=new Map,t.blackboardObservers=new Map,t.activeNodeIds=new Set,t.needsReset=!1,t.nodesToAbort=new Set,t}f(t,e);var r=t.prototype;return r.getNodeState=function(e){return this.nodeStates.has(e)||this.nodeStates.set(e,s()),this.nodeStates.get(e)},r.resetNodeState=function(e){var t=this.getNodeState(e);t.status=exports.TaskStatus.Invalid,t.currentChildIndex=0,delete t.startTime,delete t.lastExecutionTime,delete t.repeatCount,delete t.cachedResult,delete t.shuffledIndices,delete t.isAborted,delete t.lastConditionResult,delete t.observedKeys},r.resetAllStates=function(){this.nodeStates.clear(),this.activeNodeIds.clear()},r.getBlackboardValue=function(e){return this.blackboard.get(e)},r.setBlackboardValue=function(e,t){var r=this.blackboard.get(e);this.blackboard.set(e,t),r!==t&&this.notifyBlackboardChange(e,t,r)},r.hasBlackboardKey=function(e){return this.blackboard.has(e)},r.initializeBlackboard=function(e){var t=this;e&&e.forEach((function(e,r){t.blackboard.has(r)||t.blackboard.set(r,e)}))},r.clearBlackboard=function(){this.blackboard.clear()},r.start=function(){this.isRunning=!0,this.resetAllStates()},r.stop=function(){this.isRunning=!1,this.activeNodeIds.clear()},r.pause=function(){this.isRunning=!1},r.resume=function(){this.isRunning=!0},r.observeBlackboard=function(e,t,r){for(var n,o={nodeId:e,keys:new Set(t),callback:r},a=l(t);!(n=a()).done;){var i=n.value;this.blackboardObservers.has(i)||this.blackboardObservers.set(i,[]),this.blackboardObservers.get(i).push(o)}},r.unobserveBlackboard=function(e){for(var t,r=l(this.blackboardObservers.values());!(t=r()).done;){var n=t.value,o=n.findIndex((function(t){return t.nodeId===e}));-1!==o&&n.splice(o,1)}},r.notifyBlackboardChange=function(e,t,r){var n=this.blackboardObservers.get(e);if(n)for(var o,a=l(n);!(o=a()).done;){var i=o.value;try{i.callback(e,t,r)}catch(e){console.error("黑板观察者回调错误 (节点: "+i.nodeId+"):",e)}}},r.requestAbort=function(e){this.nodesToAbort.add(e)},r.shouldAbort=function(e){return this.nodesToAbort.has(e)},r.clearAbortRequest=function(e){this.nodesToAbort.delete(e)},r.clearAllAbortRequests=function(){this.nodesToAbort.clear()},t}(t.Component),g([t.Serialize(),y("design:type",String)],exports.BehaviorTreeRuntimeComponent.prototype,"treeAssetId",void 0),g([t.Serialize(),y("design:type",Boolean)],exports.BehaviorTreeRuntimeComponent.prototype,"autoStart",void 0),g([t.IgnoreSerialization(),y("design:type",Boolean)],exports.BehaviorTreeRuntimeComponent.prototype,"isRunning",void 0),g([t.IgnoreSerialization(),y("design:type",Map)],exports.BehaviorTreeRuntimeComponent.prototype,"nodeStates",void 0),g([t.IgnoreSerialization(),y("design:type",Map)],exports.BehaviorTreeRuntimeComponent.prototype,"blackboard",void 0),g([t.IgnoreSerialization(),y("design:type",Map)],exports.BehaviorTreeRuntimeComponent.prototype,"blackboardObservers",void 0),g([t.IgnoreSerialization(),y("design:type",Set)],exports.BehaviorTreeRuntimeComponent.prototype,"activeNodeIds",void 0),g([t.IgnoreSerialization(),y("design:type",Boolean)],exports.BehaviorTreeRuntimeComponent.prototype,"needsReset",void 0),g([t.IgnoreSerialization(),y("design:type",Set)],exports.BehaviorTreeRuntimeComponent.prototype,"nodesToAbort",void 0),exports.BehaviorTreeRuntimeComponent=g([t.ECSComponent("BehaviorTreeRuntime"),t.Serializable({version:1})],exports.BehaviorTreeRuntimeComponent);var x=t.createLogger("BehaviorTreeAssetManager"),S=function(){function e(){this.assets=new Map}var t=e.prototype;return t.loadAsset=function(e){this.assets.has(e.id)&&x.warn("行为树资产已存在,将被覆盖: "+e.id),this.assets.set(e.id,e),x.info("行为树资产已加载: "+e.name+" ("+e.nodes.size+"个节点)")},t.getAsset=function(e){return this.assets.get(e)},t.hasAsset=function(e){return this.assets.has(e)},t.unloadAsset=function(e){var t=this.assets.delete(e);return t&&x.info("行为树资产已卸载: "+e),t},t.clearAll=function(){this.assets.clear(),x.info("所有行为树资产已清空")},t.getAssetCount=function(){return this.assets.size},t.getAllAssetIds=function(){return Array.from(this.assets.keys())},t.dispose=function(){this.clearAll()},e}(),T=function(){function e(){}return e.getValue=function(e,t,r){var n=e.nodeData,o=e.runtime;if(n.bindings&&n.bindings[t]){var a=n.bindings[t],i=o.getBlackboardValue(a);return void 0!==i?i:r}var s=n.config[t];return void 0!==s?s:r},e.hasBinding=function(e,t){return!(!e.nodeData.bindings||!e.nodeData.bindings[t])},e.getBindingKey=function(e,t){var r;return null===(r=e.nodeData.bindings)||void 0===r?void 0:r[t]},e}(),b=function(){function e(){this.executors=new Map}var t=e.prototype;return t.register=function(e,t){this.executors.has(e)&&console.warn("执行器已存在,将被覆盖: "+e),this.executors.set(e,t)},t.get=function(e){return this.executors.get(e)},t.has=function(e){return this.executors.has(e)},t.unregister=function(e){return this.executors.delete(e)},t.clear=function(){this.executors.clear()},e}(),k=function(){function e(){}return e.register=function(e,t){this.metadataMap.set(t.implementationType,t),this.executorClassMap.set(e,t.implementationType),this.executorConstructors.set(t.implementationType,e)},e.getMetadata=function(e){return this.metadataMap.get(e)},e.getAllMetadata=function(){return Array.from(this.metadataMap.values())},e.getByCategory=function(e){return this.getAllMetadata().filter((function(t){return t.category===e}))},e.getByNodeType=function(e){return this.getAllMetadata().filter((function(t){return t.nodeType===e}))},e.getImplementationType=function(e){return this.executorClassMap.get(e)},e.getExecutorConstructor=function(e){return this.executorConstructors.get(e)},e.getAllExecutorConstructors=function(){return new Map(this.executorConstructors)},e}();function C(e){return function(t){k.register(t,e)}}k.metadataMap=new Map,k.executorClassMap=new Map,k.executorConstructors=new Map,exports.SequenceExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state;if(!t.children||0===t.children.length)return exports.TaskStatus.Success;for(;r.currentChildIndex<t.children.length;){var n=t.children[r.currentChildIndex],o=e.executeChild(n);if(o===exports.TaskStatus.Running)return exports.TaskStatus.Running;if(o===exports.TaskStatus.Failure)return r.currentChildIndex=0,exports.TaskStatus.Failure;r.currentChildIndex++}return r.currentChildIndex=0,exports.TaskStatus.Success},t.reset=function(e){e.state.currentChildIndex=0},e}(),exports.SequenceExecutor=g([C({implementationType:"Sequence",nodeType:i.Composite,displayName:"序列",description:"按顺序执行子节点,全部成功才成功",category:"Composite"})],exports.SequenceExecutor),exports.SelectorExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;for(;r.currentChildIndex<t.children.length;){var n=t.children[r.currentChildIndex],o=e.executeChild(n);if(o===exports.TaskStatus.Running)return exports.TaskStatus.Running;if(o===exports.TaskStatus.Success)return r.currentChildIndex=0,exports.TaskStatus.Success;r.currentChildIndex++}return r.currentChildIndex=0,exports.TaskStatus.Failure},t.reset=function(e){e.state.currentChildIndex=0},e}(),exports.SelectorExecutor=g([C({implementationType:"Selector",nodeType:i.Composite,displayName:"选择器",description:"按顺序执行子节点,任一成功则成功",category:"Composite"})],exports.SelectorExecutor),exports.ParallelExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=T.getValue(e,"successPolicy","all"),n=T.getValue(e,"failurePolicy","one");if(!t.children||0===t.children.length)return exports.TaskStatus.Success;for(var o,a=!1,i=0,s=0,u=l(t.children);!(o=u()).done;){var c=o.value,d=e.executeChild(c);d===exports.TaskStatus.Running?a=!0:d===exports.TaskStatus.Success?i++:d===exports.TaskStatus.Failure&&s++}return"one"===r&&i>0?(this.stopAllChildren(e),exports.TaskStatus.Success):"all"===r&&i===t.children.length?exports.TaskStatus.Success:"one"===n&&s>0?(this.stopAllChildren(e),exports.TaskStatus.Failure):"all"===n&&s===t.children.length?exports.TaskStatus.Failure:a?exports.TaskStatus.Running:exports.TaskStatus.Success},t.stopAllChildren=function(e){var t=e.nodeData,r=e.runtime;if(t.children)for(var n,o=l(t.children);!(n=o()).done;){var a=n.value;r.activeNodeIds.delete(a),r.resetNodeState(a)}},t.reset=function(e){var t=e.nodeData,r=e.runtime;if(t.children)for(var n,o=l(t.children);!(n=o()).done;){var a=n.value;r.resetNodeState(a)}},e}(),exports.ParallelExecutor=g([C({implementationType:"Parallel",nodeType:i.Composite,displayName:"并行",description:"同时执行所有子节点",category:"Composite",configSchema:{successPolicy:{type:"string",default:"all",description:"成功策略",options:["all","one"]},failurePolicy:{type:"string",default:"one",description:"失败策略",options:["all","one"]}}})],exports.ParallelExecutor),exports.ParallelSelectorExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=T.getValue(e,"failurePolicy","all");if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;for(var n,o=!1,a=0,i=0,s=l(t.children);!(n=s()).done;){var u=n.value,c=e.executeChild(u);c===exports.TaskStatus.Running?o=!0:c===exports.TaskStatus.Success?a++:c===exports.TaskStatus.Failure&&i++}return a>0?(this.stopAllChildren(e),exports.TaskStatus.Success):"one"===r&&i>0?(this.stopAllChildren(e),exports.TaskStatus.Failure):"all"===r&&i===t.children.length?exports.TaskStatus.Failure:o?exports.TaskStatus.Running:exports.TaskStatus.Failure},t.stopAllChildren=function(e){var t=e.nodeData,r=e.runtime;if(t.children)for(var n,o=l(t.children);!(n=o()).done;){var a=n.value;r.activeNodeIds.delete(a),r.resetNodeState(a)}},t.reset=function(e){var t=e.nodeData,r=e.runtime;if(t.children)for(var n,o=l(t.children);!(n=o()).done;){var a=n.value;r.resetNodeState(a)}},e}(),exports.ParallelSelectorExecutor=g([C({implementationType:"ParallelSelector",nodeType:i.Composite,displayName:"并行选择器",description:"并行执行子节点,任一成功则成功",category:"Composite",configSchema:{failurePolicy:{type:"string",default:"all",description:"失败策略",options:["all","one"]}}})],exports.ParallelSelectorExecutor),exports.RandomSequenceExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state;if(!t.children||0===t.children.length)return exports.TaskStatus.Success;for(r.shuffledIndices&&0!==r.shuffledIndices.length||(r.shuffledIndices=this.shuffleIndices(t.children.length));r.currentChildIndex<r.shuffledIndices.length;){var n=r.shuffledIndices[r.currentChildIndex],o=t.children[n],a=e.executeChild(o);if(a===exports.TaskStatus.Running)return exports.TaskStatus.Running;if(a===exports.TaskStatus.Failure)return r.currentChildIndex=0,delete r.shuffledIndices,exports.TaskStatus.Failure;r.currentChildIndex++}return r.currentChildIndex=0,delete r.shuffledIndices,exports.TaskStatus.Success},t.shuffleIndices=function(e){for(var t=Array.from({length:e},(function(e,t){return t})),r=t.length-1;r>0;r--){var n=Math.floor(Math.random()*(r+1)),o=t[r];t[r]=t[n],t[n]=o}return t},t.reset=function(e){e.state.currentChildIndex=0,delete e.state.shuffledIndices},e}(),exports.RandomSequenceExecutor=g([C({implementationType:"RandomSequence",nodeType:i.Composite,displayName:"随机序列",description:"随机顺序执行子节点,全部成功才成功",category:"Composite"})],exports.RandomSequenceExecutor),exports.RandomSelectorExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;for(r.shuffledIndices&&0!==r.shuffledIndices.length||(r.shuffledIndices=this.shuffleIndices(t.children.length));r.currentChildIndex<r.shuffledIndices.length;){var n=r.shuffledIndices[r.currentChildIndex],o=t.children[n],a=e.executeChild(o);if(a===exports.TaskStatus.Running)return exports.TaskStatus.Running;if(a===exports.TaskStatus.Success)return r.currentChildIndex=0,delete r.shuffledIndices,exports.TaskStatus.Success;r.currentChildIndex++}return r.currentChildIndex=0,delete r.shuffledIndices,exports.TaskStatus.Failure},t.shuffleIndices=function(e){for(var t=Array.from({length:e},(function(e,t){return t})),r=t.length-1;r>0;r--){var n=Math.floor(Math.random()*(r+1)),o=t[r];t[r]=t[n],t[n]=o}return t},t.reset=function(e){e.state.currentChildIndex=0,delete e.state.shuffledIndices},e}(),exports.RandomSelectorExecutor=g([C({implementationType:"RandomSelector",nodeType:i.Composite,displayName:"随机选择器",description:"随机顺序执行子节点,任一成功则成功",category:"Composite"})],exports.RandomSelectorExecutor),exports.InverterExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var r=t.children[0],n=e.executeChild(r);return n===exports.TaskStatus.Running?exports.TaskStatus.Running:n===exports.TaskStatus.Success?exports.TaskStatus.Failure:n===exports.TaskStatus.Failure?exports.TaskStatus.Success:exports.TaskStatus.Failure},t.reset=function(e){e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.InverterExecutor=g([C({implementationType:"Inverter",nodeType:i.Decorator,displayName:"反转",description:"反转子节点的执行结果",category:"Decorator"})],exports.InverterExecutor),exports.RepeaterExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state,n=e.runtime,o=T.getValue(e,"repeatCount",1),a=T.getValue(e,"endOnFailure",!1);if(!t.children||0===t.children.length)return exports.TaskStatus.Success;var i=t.children[0];r.repeatCount||(r.repeatCount=0);var s=e.executeChild(i);return s===exports.TaskStatus.Running?exports.TaskStatus.Running:s===exports.TaskStatus.Failure&&a?(r.repeatCount=0,exports.TaskStatus.Failure):(r.repeatCount++,n.resetNodeState(i),-1===o||r.repeatCount<o?exports.TaskStatus.Running:(r.repeatCount=0,exports.TaskStatus.Success))},t.reset=function(e){delete e.state.repeatCount,e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.RepeaterExecutor=g([C({implementationType:"Repeater",nodeType:i.Decorator,displayName:"重复",description:"重复执行子节点指定次数",category:"Decorator",configSchema:{repeatCount:{type:"number",default:1,description:"重复次数(-1表示无限循环)",supportBinding:!0},endOnFailure:{type:"boolean",default:!1,description:"子节点失败时是否结束"}}})],exports.RepeaterExecutor),exports.AlwaysSucceedExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData;if(!t.children||0===t.children.length)return exports.TaskStatus.Success;var r=t.children[0];return e.executeChild(r)===exports.TaskStatus.Running?exports.TaskStatus.Running:exports.TaskStatus.Success},t.reset=function(e){e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.AlwaysSucceedExecutor=g([C({implementationType:"AlwaysSucceed",nodeType:i.Decorator,displayName:"总是成功",description:"无论子节点结果如何都返回成功",category:"Decorator"})],exports.AlwaysSucceedExecutor),exports.AlwaysFailExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var r=t.children[0];return e.executeChild(r)===exports.TaskStatus.Running?exports.TaskStatus.Running:exports.TaskStatus.Failure},t.reset=function(e){e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.AlwaysFailExecutor=g([C({implementationType:"AlwaysFail",nodeType:i.Decorator,displayName:"总是失败",description:"无论子节点结果如何都返回失败",category:"Decorator"})],exports.AlwaysFailExecutor),exports.UntilSuccessExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.runtime;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var n=t.children[0],o=e.executeChild(n);return o===exports.TaskStatus.Running?exports.TaskStatus.Running:o===exports.TaskStatus.Success?exports.TaskStatus.Success:(r.resetNodeState(n),exports.TaskStatus.Running)},t.reset=function(e){e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.UntilSuccessExecutor=g([C({implementationType:"UntilSuccess",nodeType:i.Decorator,displayName:"直到成功",description:"重复执行子节点直到成功",category:"Decorator"})],exports.UntilSuccessExecutor),exports.UntilFailExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.runtime;if(!t.children||0===t.children.length)return exports.TaskStatus.Success;var n=t.children[0],o=e.executeChild(n);return o===exports.TaskStatus.Running?exports.TaskStatus.Running:o===exports.TaskStatus.Failure?exports.TaskStatus.Failure:(r.resetNodeState(n),exports.TaskStatus.Running)},t.reset=function(e){e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.UntilFailExecutor=g([C({implementationType:"UntilFail",nodeType:i.Decorator,displayName:"直到失败",description:"重复执行子节点直到失败",category:"Decorator"})],exports.UntilFailExecutor),exports.ConditionalExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.runtime,n=e.state;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var o=T.getValue(e,"blackboardKey",""),a=T.getValue(e,"expectedValue"),i=T.getValue(e,"operator","equals"),s=t.abortType||exports.AbortType.None;if(!o)return exports.TaskStatus.Failure;var u=r.getBlackboardValue(o),c=this.evaluateCondition(u,a,i),d=n.status===exports.TaskStatus.Running;if(s!==exports.AbortType.None&&(n.observedKeys&&0!==n.observedKeys.length||(n.observedKeys=[o],this.setupObserver(e,o,a,i,s)),void 0!==n.lastConditionResult&&n.lastConditionResult!==c&&(c?this.handleConditionBecameTrue(e,s):d&&this.handleConditionBecameFalse(e,s))),n.lastConditionResult=c,!c)return exports.TaskStatus.Failure;var l=t.children[0];return e.executeChild(l)},t.evaluateCondition=function(e,t,r){switch(r){case"equals":return e===t;case"notEquals":return e!==t;case"greaterThan":return e>t;case"lessThan":return e<t;case"greaterOrEqual":return e>=t;case"lessOrEqual":return e<=t;default:return!1}},t.setupObserver=function(e,t,r,n,o){var a=this,i=e.nodeData;e.runtime.observeBlackboard(i.id,[t],(function(t,i){var s=a.evaluateCondition(i,r,n),u=e.state.lastConditionResult;void 0!==u&&u!==s&&(s?a.handleConditionBecameTrue(e,o):a.handleConditionBecameFalse(e,o)),e.state.lastConditionResult=s}))},t.handleConditionBecameTrue=function(e,t){t!==exports.AbortType.LowerPriority&&t!==exports.AbortType.Both||this.requestAbortLowerPriority(e)},t.handleConditionBecameFalse=function(e,t){var r=e.nodeData,n=e.runtime;t!==exports.AbortType.Self&&t!==exports.AbortType.Both||r.children&&r.children.length>0&&n.requestAbort(r.children[0])},t.requestAbortLowerPriority=function(e){e.runtime.requestAbort("__lower_priority__")},t.reset=function(e){var t=e.nodeData,r=e.runtime,n=e.state;n.observedKeys&&n.observedKeys.length>0&&(r.unobserveBlackboard(t.id),delete n.observedKeys),delete n.lastConditionResult,t.children&&t.children.length>0&&r.resetNodeState(t.children[0])},e}(),exports.ConditionalExecutor=g([C({implementationType:"Conditional",nodeType:i.Decorator,displayName:"条件",description:"根据条件决定是否执行子节点",category:"Decorator",configSchema:{blackboardKey:{type:"string",default:"",description:"黑板变量名"},expectedValue:{type:"object",description:"期望值",supportBinding:!0},operator:{type:"string",default:"equals",description:"比较运算符",options:["equals","notEquals","greaterThan","lessThan","greaterOrEqual","lessOrEqual"]},abortType:{type:"string",default:"none",description:"中止类型",options:["none","self","lower-priority","both"]}}})],exports.ConditionalExecutor),exports.CooldownExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state,n=e.totalTime;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var o=T.getValue(e,"cooldownTime",1);if(void 0!==r.lastExecutionTime&&n-r.lastExecutionTime<o)return exports.TaskStatus.Failure;var a=t.children[0],i=e.executeChild(a);return i===exports.TaskStatus.Running?exports.TaskStatus.Running:i===exports.TaskStatus.Success?(r.lastExecutionTime=n,exports.TaskStatus.Success):exports.TaskStatus.Failure},t.reset=function(e){delete e.state.lastExecutionTime,e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.CooldownExecutor=g([C({implementationType:"Cooldown",nodeType:i.Decorator,displayName:"冷却",description:"子节点执行成功后进入冷却时间",category:"Decorator",configSchema:{cooldownTime:{type:"number",default:1,description:"冷却时间(秒)",min:0,supportBinding:!0}}})],exports.CooldownExecutor),exports.TimeoutExecutor=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state,n=e.totalTime;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var o=T.getValue(e,"timeout",1);if(void 0===r.startTime&&(r.startTime=n),n-r.startTime>=o)return delete r.startTime,exports.TaskStatus.Failure;var a=t.children[0],i=e.executeChild(a);return i===exports.TaskStatus.Running?exports.TaskStatus.Running:(delete r.startTime,i)},t.reset=function(e){delete e.state.startTime,e.nodeData.children&&e.nodeData.children.length>0&&e.runtime.resetNodeState(e.nodeData.children[0])},e}(),exports.TimeoutExecutor=g([C({implementationType:"Timeout",nodeType:i.Decorator,displayName:"超时",description:"限制子节点的执行时间",category:"Decorator",configSchema:{timeout:{type:"number",default:1,description:"超时时间(秒)",min:0,supportBinding:!0}}})],exports.TimeoutExecutor);var N=function(){function e(){}return e.register=function(e,t){this.services.set(e,t)},e.get=function(e){return this.services.get(e)},e.has=function(e){return this.services.has(e)},e.unregister=function(e){return this.services.delete(e)},e}();N.services=new Map,exports.ServiceDecorator=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.nodeData,r=e.state,n=e.totalTime;if(!t.children||0===t.children.length)return exports.TaskStatus.Failure;var o=T.getValue(e,"serviceName",""),a=T.getValue(e,"tickInterval",0);if(!o)return exports.TaskStatus.Failure;var i=N.get(o);if(!i)return console.warn("未找到Service: "+o),exports.TaskStatus.Failure;r.status!==exports.TaskStatus.Running&&(r.startTime=n,r.lastExecutionTime=n,i.onServiceStart&&i.onServiceStart(e)),(0===a||void 0!==r.lastExecutionTime&&n-r.lastExecutionTime>=a)&&(i.onServiceTick(e),r.lastExecutionTime=n);var s=t.children[0],u=e.executeChild(s);return u!==exports.TaskStatus.Running&&i.onServiceEnd&&i.onServiceEnd(e),u},t.reset=function(e){var t=e.nodeData,r=e.runtime,n=e.state,o=T.getValue(e,"serviceName","");if(o){var a=N.get(o);a&&a.onServiceEnd&&a.onServiceEnd(e)}delete n.startTime,delete n.lastExecutionTime,t.children&&t.children.length>0&&r.resetNodeState(t.children[0])},e}(),exports.ServiceDecorator=g([C({implementationType:"Service",nodeType:i.Decorator,displayName:"Service",description:"在子节点执行期间持续运行后台逻辑",category:"Decorator",configSchema:{serviceName:{type:"string",default:"",description:"Service名称"},tickInterval:{type:"number",default:0,description:"Service更新间隔(秒,0表示每帧更新)",supportBinding:!0}}})],exports.ServiceDecorator),exports.WaitAction=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.state,r=e.totalTime,n=T.getValue(e,"duration",1);return t.startTime?r-t.startTime>=n?exports.TaskStatus.Success:exports.TaskStatus.Running:(t.startTime=r,exports.TaskStatus.Running)},t.reset=function(e){delete e.state.startTime},e}(),exports.WaitAction=g([C({implementationType:"Wait",nodeType:i.Action,displayName:"等待",description:"等待指定时间后返回成功",category:"Action",configSchema:{duration:{type:"number",default:1,description:"等待时长(秒)",min:0,supportBinding:!0}}})],exports.WaitAction),exports.LogAction=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.runtime,r=T.getValue(e,"message",""),n=T.getValue(e,"logLevel","info"),o=this.replaceBlackboardVariables(r,t);return this.log(o,n),exports.TaskStatus.Success},t.replaceBlackboardVariables=function(e,t){return e.includes("{")&&e.includes("}")?e.replace(/\{([\w.]{1,100})\}/g,(function(e,r){var n=t.getBlackboardValue(r.trim());return void 0!==n?String(n):"{"+r+"}"})):e},t.log=function(e,t){switch(t){case"error":console.error(e);break;case"warn":console.warn(e);break;default:console.log(e)}},e}(),exports.LogAction=g([C({implementationType:"Log",nodeType:i.Action,displayName:"日志",description:"输出日志信息",category:"Action",configSchema:{message:{type:"string",default:"",description:"日志消息,支持{key}占位符引用黑板变量",supportBinding:!0},logLevel:{type:"string",default:"info",description:"日志级别",options:["info","warn","error"]}}})],exports.LogAction),exports.SetBlackboardValue=function(){function e(){}return e.prototype.execute=function(e){var t=e.runtime,r=T.getValue(e,"key",""),n=T.getValue(e,"value");return r?(t.setBlackboardValue(r,n),exports.TaskStatus.Success):exports.TaskStatus.Failure},e}(),exports.SetBlackboardValue=g([C({implementationType:"SetBlackboardValue",nodeType:i.Action,displayName:"设置黑板值",description:"设置黑板中的变量值",category:"Action",configSchema:{key:{type:"string",default:"",description:"黑板变量名"},value:{type:"object",description:"要设置的值",supportBinding:!0}}})],exports.SetBlackboardValue),exports.ModifyBlackboardValue=function(){function e(){}return e.prototype.execute=function(e){var t=e.runtime,r=T.getValue(e,"key",""),n=T.getValue(e,"operation","add"),o=T.getValue(e,"value",0);if(!r)return exports.TaskStatus.Failure;var a,i=t.getBlackboardValue(r)||0;switch(n){case"add":a=i+o;break;case"subtract":a=i-o;break;case"multiply":a=i*o;break;case"divide":a=0!==o?i/o:i;break;case"set":a=o;break;default:return exports.TaskStatus.Failure}return t.setBlackboardValue(r,a),exports.TaskStatus.Success},e}(),exports.ModifyBlackboardValue=g([C({implementationType:"ModifyBlackboardValue",nodeType:i.Action,displayName:"修改黑板值",description:"对黑板中的数值进行运算",category:"Action",configSchema:{key:{type:"string",default:"",description:"黑板变量名"},operation:{type:"string",default:"add",description:"运算类型",options:["add","subtract","multiply","divide","set"]},value:{type:"number",default:0,description:"操作数",supportBinding:!0}}})],exports.ModifyBlackboardValue),exports.ExecuteAction=function(){function e(){}return e.prototype.execute=function(e){var t=e.runtime,r=e.entity,n=T.getValue(e,"actionName","");if(!n)return exports.TaskStatus.Failure;var o=t.getBlackboardValue("action_"+n);if(!o||"function"!=typeof o)return exports.TaskStatus.Failure;try{return o(r)}catch(e){return console.error("ExecuteAction failed: "+e),exports.TaskStatus.Failure}},e}(),exports.ExecuteAction=g([C({implementationType:"ExecuteAction",nodeType:i.Action,displayName:"执行动作",description:"执行自定义动作逻辑",category:"Action",configSchema:{actionName:{type:"string",default:"",description:"动作名称(黑板中action_前缀的函数)"}}})],exports.ExecuteAction),exports.SubTreeExecutor=function(){function e(){this.assetManager=null}var r=e.prototype;return r.getAssetManager=function(){return this.assetManager||(this.assetManager=t.Core.services.resolve(S)),this.assetManager},r.execute=function(e){var t=this,r=e.runtime,n=e.state,o=e.entity,a=T.getValue(e,"treeAssetId",""),i=T.getValue(e,"shareBlackboard",!0);if(!a)return exports.TaskStatus.Failure;var s=this.getAssetManager().getAsset(a);if(!s)return console.warn("未找到子树资产: "+a),exports.TaskStatus.Failure;var u=s.nodes.get(s.rootNodeId);if(!u)return console.warn("子树根节点未找到: "+s.rootNodeId),exports.TaskStatus.Failure;if(!i&&n.status!==exports.TaskStatus.Running&&s.blackboardVariables)for(var c,d=l(s.blackboardVariables.entries());!(c=d()).done;){var p=c.value,f=p[0],h=p[1];r.hasBlackboardKey(f)||r.setBlackboardValue(f,h)}var v={entity:o,nodeData:u,state:r.getNodeState(u.id),runtime:r,treeData:s,deltaTime:e.deltaTime,totalTime:e.totalTime,executeChild:function(n){var a=s.nodes.get(n);if(!a)return console.warn("子树节点未找到: "+n),exports.TaskStatus.Failure;var i={entity:o,nodeData:a,state:r.getNodeState(n),runtime:r,treeData:s,deltaTime:e.deltaTime,totalTime:e.totalTime,executeChild:v.executeChild};return t.executeSubTreeNode(i)}};return this.executeSubTreeNode(v)},r.executeSubTreeNode=function(e){var t=e.nodeData,r=e.runtime.getNodeState(t.id);if(!t.children||0===t.children.length)return exports.TaskStatus.Success;var n=t.children[r.currentChildIndex],o=e.executeChild(n);return o===exports.TaskStatus.Running?exports.TaskStatus.Running:o===exports.TaskStatus.Failure?(r.currentChildIndex=0,exports.TaskStatus.Failure):(r.currentChildIndex++,r.currentChildIndex>=t.children.length?(r.currentChildIndex=0,exports.TaskStatus.Success):exports.TaskStatus.Running)},r.reset=function(e){var t=T.getValue(e,"treeAssetId","");if(t){var r=this.getAssetManager().getAsset(t);if(r){var n=r.nodes.get(r.rootNodeId);if(n&&(e.runtime.resetNodeState(n.id),n.children))for(var o,a=l(n.children);!(o=a()).done;){var i=o.value;e.runtime.resetNodeState(i)}}}},e}(),exports.SubTreeExecutor=g([C({implementationType:"SubTree",nodeType:i.Action,displayName:"子树",description:"引用并执行其他行为树",category:"Special",configSchema:{treeAssetId:{type:"string",default:"",description:"要执行的行为树资产ID",supportBinding:!0},shareBlackboard:{type:"boolean",default:!0,description:"是否共享黑板数据"}}})],exports.SubTreeExecutor),exports.BlackboardCompare=function(){function e(){}var t=e.prototype;return t.execute=function(e){var t=e.runtime,r=T.getValue(e,"key",""),n=T.getValue(e,"compareValue"),o=T.getValue(e,"operator","equals");if(!r)return exports.TaskStatus.Failure;var a=t.getBlackboardValue(r);return this.compare(a,n,o)?exports.TaskStatus.Success:exports.TaskStatus.Failure},t.compare=function(e,t,r){switch(r){case"equals":return e===t;case"notEquals":return e!==t;case"greaterThan":return e>t;case"lessThan":return e<t;case"greaterOrEqual":return e>=t;case"lessOrEqual":return e<=t;default:return!1}},e}(),exports.BlackboardCompare=g([C({implementationType:"BlackboardCompare",nodeType:i.Condition,displayName:"黑板比较",description:"比较黑板中的值",category:"Condition",configSchema:{key:{type:"string",default:"",description:"黑板变量名"},compareValue:{type:"object",description:"比较值",supportBinding:!0},operator:{type:"string",default:"equals",description:"比较运算符",options:["equals","notEquals","greaterThan","lessThan","greaterOrEqual","lessOrEqual"]}}})],exports.BlackboardCompare),exports.BlackboardExists=function(){function e(){}return e.prototype.execute=function(e){var t=e.runtime,r=T.getValue(e,"key",""),n=T.getValue(e,"checkNull",!1);if(!r)return exports.TaskStatus.Failure;var o=t.getBlackboardValue(r);return void 0===o||n&&null===o?exports.TaskStatus.Failure:exports.TaskStatus.Success},e}(),exports.BlackboardExists=g([C({implementationType:"BlackboardExists",nodeType:i.Condition,displayName:"黑板存在",description:"检查黑板中是否存在指定的键",category:"Condition",configSchema:{key:{type:"string",default:"",description:"黑板变量名"},checkNull:{type:"boolean",default:!1,description:"检查是否为null"}}})],exports.BlackboardExists),exports.RandomProbability=function(){function e(){}return e.prototype.execute=function(e){var t=T.getValue(e,"probability",.5),r=Math.max(0,Math.min(1,t));return Math.random()<r?exports.TaskStatus.Success:exports.TaskStatus.Failure},e}(),exports.RandomProbability=g([C({implementationType:"RandomProbability",nodeType:i.Condition,displayName:"随机概率",description:"根据概率返回成功或失败",category:"Condition",configSchema:{probability:{type:"number",default:.5,description:"成功概率(0-1)",min:0,max:1,supportBinding:!0}}})],exports.RandomProbability),exports.ExecuteCondition=function(){function e(){}return e.prototype.execute=function(e){var t=e.runtime,r=e.entity,n=T.getValue(e,"conditionName","");if(!n)return exports.TaskStatus.Failure;var o=t.getBlackboardValue("condition_"+n);if(!o||"function"!=typeof o)return exports.TaskStatus.Failure;try{return o(r)?exports.TaskStatus.Success:exports.TaskStatus.Failure}catch(e){return console.error("ExecuteCondition failed: "+e),exports.TaskStatus.Failure}},e}(),exports.ExecuteCondition=g([C({implementationType:"ExecuteCondition",nodeType:i.Condition,displayName:"执行条件",description:"执行自定义条件逻辑",category:"Condition",configSchema:{conditionName:{type:"string",default:"",description:"条件名称(黑板中condition_前缀的函数)"}}})],exports.ExecuteCondition),exports.BehaviorTreeExecutionSystem=function(e){function r(){var r;return(r=e.call(this,t.Matcher.empty().all(exports.BehaviorTreeRuntimeComponent))||this).assetManager=t.Core.services.resolve(S),r.executorRegistry=new b,r.registerBuiltInExecutors(),r}f(r,e);var n=r.prototype;return n.registerBuiltInExecutors=function(){for(var e,t=l(k.getAllExecutorConstructors());!(e=t()).done;){var r=e.value,n=r[0],o=r[1];try{var a=new o;this.executorRegistry.register(n,a)}catch(e){this.logger.error("注册执行器失败: "+n,e)}}},n.getExecutorRegistry=function(){return this.executorRegistry},n.process=function(e){for(var t,r=l(e);!(t=r()).done;){var n=t.value,o=n.getComponent(exports.BehaviorTreeRuntimeComponent);if(o.isRunning){var a=this.assetManager.getAsset(o.treeAssetId);a?(o.needsReset&&(o.resetAllStates(),o.needsReset=!1),this.executeTree(n,o,a)):this.logger.warn("未找到行为树资产: "+o.treeAssetId)}}},n.executeTree=function(e,t,r){var n=r.nodes.get(r.rootNodeId);n?this.executeNode(e,t,n,r)!==exports.TaskStatus.Running?t.needsReset=!0:t.needsReset=!1:this.logger.error("未找到根节点: "+r.rootNodeId)},n.executeNode=function(e,t,r,n){var o=t.getNodeState(r.id);if(t.shouldAbort(r.id)){t.clearAbortRequest(r.id),o.isAborted=!0;var a=this.executorRegistry.get(r.implementationType);if(a&&a.reset){var i=this.createContext(e,t,r,n);a.reset(i)}return t.activeNodeIds.delete(r.id),o.status=exports.TaskStatus.Failure,exports.TaskStatus.Failure}t.activeNodeIds.add(r.id),o.isAborted=!1;var s=this.executorRegistry.get(r.implementationType);if(!s)return this.logger.error("未找到执行器: "+r.implementationType),o.status=exports.TaskStatus.Failure,exports.TaskStatus.Failure;var u=this.createContext(e,t,r,n);try{var c=s.execute(u);return o.status=c,c!==exports.TaskStatus.Running&&(t.activeNodeIds.delete(r.id),s.reset&&s.reset(u)),c}catch(e){return this.logger.error("执行节点时发生错误: "+r.name,e),o.status=exports.TaskStatus.Failure,t.activeNodeIds.delete(r.id),exports.TaskStatus.Failure}},n.createContext=function(e,r,n,o){var a=this;return{entity:e,nodeData:n,state:r.getNodeState(n.id),runtime:r,treeData:o,deltaTime:t.Time.deltaTime,totalTime:t.Time.totalTime,executeChild:function(t){var n=o.nodes.get(t);return n?a.executeNode(e,r,n,o):(a.logger.warn("未找到子节点: "+t),exports.TaskStatus.Failure)}}},n.executeChildren=function(e,t){var r=e.nodeData,n=e.treeData,o=e.entity,a=e.runtime;if(!r.children||0===r.children.length)return[];for(var i,s=[],u=l(t||Array.from({length:r.children.length},(function(e,t){return t})));!(i=u()).done;){var c=i.value;if(!(c>=r.children.length)){var d=r.children[c],p=n.nodes.get(d);if(p){var f=this.executeNode(o,a,p,n);s.push(f)}else this.logger.warn("未找到子节点: "+d),s.push(exports.TaskStatus.Failure)}}return s},r}(t.EntitySystem),exports.BehaviorTreeExecutionSystem=g([t.ECSSystem("BehaviorTreeExecution"),y("design:paramtypes",[])],exports.BehaviorTreeExecutionSystem);var A=function(){function e(){}return e.start=function(e,r,n){void 0===n&&(n=!0),t.Core.services.resolve(S).loadAsset(r);var o=e.getComponent(exports.BehaviorTreeRuntimeComponent);if(o||(o=new exports.BehaviorTreeRuntimeComponent,e.addComponent(o)),o.treeAssetId=r.id,o.autoStart=n,r.blackboardVariables)for(var a,i=l(r.blackboardVariables.entries());!(a=i()).done;){var s=a.value,u=s[0],c=s[1];o.setBlackboardValue(u,c)}n&&(o.isRunning=!0)},e.stop=function(e){var t=e.getComponent(exports.BehaviorTreeRuntimeComponent);t&&(t.isRunning=!1,t.resetAllStates())},e.pause=function(e){var t=e.getComponent(exports.BehaviorTreeRuntimeComponent);t&&(t.isRunning=!1)},e.resume=function(e){var t=e.getComponent(exports.BehaviorTreeRuntimeComponent);t&&(t.isRunning=!0)},e.restart=function(e){var t=e.getComponent(exports.BehaviorTreeRuntimeComponent);t&&(t.resetAllStates(),t.isRunning=!0)},e}(),B=function(){function e(e){this.nodeStack=[],this.nodeIdCounter=0,this.treeData={id:"tree_"+Date.now(),name:e,rootNodeId:"",nodes:new Map,blackboardVariables:new Map}}e.create=function(t){return void 0===t&&(t="BehaviorTree"),new e(t)};var t=e.prototype;return t.defineBlackboardVariable=function(e,t){return this.treeData.blackboardVariables||(this.treeData.blackboardVariables=new Map),this.treeData.blackboardVariables.set(e,t),this},t.sequence=function(e){return this.addCompositeNode("Sequence",e||"Sequence")},t.selector=function(e){return this.addCompositeNode("Selector",e||"Selector")},t.parallel=function(e,t){return this.addCompositeNode("Parallel",e||"Parallel",t)},t.parallelSelector=function(e,t){return this.addCompositeNode("ParallelSelector",e||"ParallelSelector",t)},t.randomSequence=function(e){return this.addCompositeNode("RandomSequence",e||"RandomSequence")},t.randomSelector=function(e){return this.addCompositeNode("RandomSelector",e||"RandomSelector")},t.inverter=function(e){return this.addDecoratorNode("Inverter",e||"Inverter")},t.repeater=function(e,t){return this.addDecoratorNode("Repeater",t||"Repeater",{repeatCount:e})},t.alwaysSucceed=function(e){return this.addDecoratorNode("AlwaysSucceed",e||"AlwaysSucceed")},t.alwaysFail=function(e){return this.addDecoratorNode("AlwaysFail",e||"AlwaysFail")},t.untilSuccess=function(e){return this.addDecoratorNode("UntilSuccess",e||"UntilSuccess")},t.untilFail=function(e){return this.addDecoratorNode("UntilFail",e||"UntilFail")},t.conditional=function(e,t,r,n){return this.addDecoratorNode("Conditional",n||"Conditional",{blackboardKey:e,expectedValue:t,operator:r||"equals"})},t.cooldown=function(e,t){return this.addDecoratorNode("Cooldown",t||"Cooldown",{cooldownTime:e})},t.timeout=function(e,t){return this.addDecoratorNode("Timeout",t||"Timeout",{timeout:e})},t.wait=function(e,t){return this.addActionNode("Wait",t||"Wait",{duration:e})},t.log=function(e,t){return this.addActionNode("Log",t||"Log",{message:e})},t.setBlackboardValue=function(e,t,r){return this.addActionNode("SetBlackboardValue",r||"SetBlackboardValue",{key:e,value:t})},t.modifyBlackboardValue=function(e,t,r,n){return this.addActionNode("ModifyBlackboardValue",n||"ModifyBlackboardValue",{key:e,operation:t,value:r})},t.executeAction=function(e,t){return this.addActionNode("ExecuteAction",t||"ExecuteAction",{actionName:e})},t.blackboardCompare=function(e,t,r,n){return this.addConditionNode("BlackboardCompare",n||"BlackboardCompare",{key:e,compareValue:t,operator:r||"equals"})},t.blackboardExists=function(e,t){return this.addConditionNode("BlackboardExists",t||"BlackboardExists",{key:e})},t.randomProbability=function(e,t){return this.addConditionNode("RandomProbability",t||"RandomProbability",{probability:e})},t.executeCondition=function(e,t){return this.addConditionNode("ExecuteCondition",t||"ExecuteCondition",{conditionName:e})},t.end=function(){return this.nodeStack.length>0&&this.nodeStack.pop(),this},t.build=function(){if(!this.treeData.rootNodeId)throw new Error("No root node defined. Add at least one node to the tree.");return this.treeData},t.addCompositeNode=function(e,t,r){void 0===r&&(r={});var n=this.generateNodeId(),o={id:n,name:t,nodeType:i.Composite,implementationType:e,children:[],config:r};if(this.treeData.nodes.set(n,o),this.treeData.rootNodeId||(this.treeData.rootNodeId=n),this.nodeStack.length>0){var a=this.nodeStack[this.nodeStack.length-1],s=this.treeData.nodes.get(a);s&&s.children&&s.children.push(n)}return this.nodeStack.push(n),this},t.addDecoratorNode=function(e,t,r){void 0===r&&(r={});var n=this.generateNodeId(),o={id:n,name:t,nodeType:i.Decorator,implementationType:e,children:[],config:r};if(this.treeData.nodes.set(n,o),this.treeData.rootNodeId||(this.treeData.rootNodeId=n),this.nodeStack.length>0){var a=this.nodeStack[this.nodeStack.length-1],s=this.treeData.nodes.get(a);s&&s.children&&s.children.push(n)}return this.nodeStack.push(n),this},t.addActionNode=function(e,t,r){void 0===r&&(r={});var n=this.generateNodeId(),o={id:n,name:t,nodeType:i.Action,implementationType:e,config:r};if(this.treeData.nodes.set(n,o),this.treeData.rootNodeId||(this.treeData.rootNodeId=n),this.nodeStack.length>0){var a=this.nodeStack[this.nodeStack.length-1],s=this.treeData.nodes.get(a);s&&s.children&&s.children.push(n)}return this},t.addConditionNode=function(e,t,r){void 0===r&&(r={});var n=this.generateNodeId(),o={id:n,name:t,nodeType:i.Condition,implementationType:e,config:r};if(this.treeData.nodes.set(n,o),this.treeData.rootNodeId||(this.treeData.rootNodeId=n),this.nodeStack.length>0){var a=this.nodeStack[this.nodeStack.length-1],s=this.treeData.nodes.get(a);s&&s.children&&s.children.push(n)}return this},t.generateNodeId=function(){return"node_"+this.nodeIdCounter++},e}(),w={String:"string",Number:"number",Boolean:"boolean",Select:"select",Blackboard:"blackboard",Code:"code",Variable:"variable",Asset:"asset"},I=function(){function e(){}return e.getAllTemplates=function(){var e=this;return k.getAllMetadata().map((function(t){return e.convertMetadataToTemplate(t)}))},e.getTemplate=function(e,t){return this.getAllTemplates().find((function(r){if(r.type!==e)return!1;var n=r.defaultConfig;switch(e){case i.Composite:return n.compositeType===t;case i.Decorator:return n.decoratorType===t;case i.Action:return n.actionType===t;case i.Condition:return n.conditionType===t;default:return!1}}))},e.convertMetadataToTemplate=function(e){var t=this.convertConfigSchemaToProperties(e.configSchema||{}),r={nodeType:this.nodeTypeToString(e.nodeType)};switch(e.nodeType){case i.Composite:r.compositeType=e.implementationType;break;case i.Decorator:r.decoratorType=e.implementationType;break;case i.Action:r.actionType=e.implementationType;break;case i.Condition:r.conditionType=e.implementationType}if(e.configSchema)for(var n=0,o=Object.entries(e.configSchema);n<o.length;n++){var a=o[n],s=a[0],u=a[1];void 0!==u.default&&(r[s]=u.default)}var c=this.getIconAndColorByType(e.nodeType,e.category||""),d=c.icon,l=c.color;return{type:e.nodeType,displayName:e.displayName,category:e.category||this.getCategoryByNodeType(e.nodeType),description:e.description||"",className:e.implementationType,icon:d,color:l,defaultConfig:r,properties:t}},e.convertConfigSchemaToProperties=function(e){for(var t=[],r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],a=o[0],i=o[1],s={name:a,type:this.mapFieldTypeToPropertyType(i),label:a};void 0!==i.description&&(s.description=i.description),void 0!==i.default&&(s.defaultValue=i.default),void 0!==i.min&&(s.min=i.min),void 0!==i.max&&(s.max=i.max),void 0!==i.allowMultipleConnections&&(s.allowMultipleConnections=i.allowMultipleConnections),i.options&&(s.options=i.options.map((function(e){return{label:e,value:e}}))),i.supportBinding&&(s.renderConfig={component:"BindableInput",props:{supportBinding:!0}}),t.push(s)}return t},e.mapFieldTypeToPropertyType=function(e){if(e.options&&e.options.length>0)return w.Select;switch(e.type){case"string":case"array":case"object":default:return w.String;case"number":return w.Number;case"boolean":return w.Boolean}},e.nodeTypeToString=function(e){switch(e){case i.Composite:return"composite";case i.Decorator:return"decorator";case i.Action:return"action";case i.Condition:return"condition";default:return"unknown"}},e.getCategoryByNodeType=function(e){switch(e){case i.Composite:return"组合";case i.Decorator:return"装饰器";case i.Action:return"动作";case i.Condition:return"条件";default:return"其他"}},e.getIconAndColorByType=function(e,t){switch(e){case i.Composite:return{icon:"GitBranch",color:"#1976d2"};case i.Decorator:return{icon:"Settings",color:"#fb8c00"};case i.Action:return{icon:"Play",color:"#388e3c"};case i.Condition:return{icon:"HelpCircle",color:"#d32f2f"};default:return{icon:"Circle",color:"#757575"}}},e}(),R=function(){function e(){}return e.validate=function(e){var t=[],r=[];if(e.version||t.push("Missing version field"),e.metadata&&e.metadata.name||t.push("Missing or invalid metadata"),e.rootNodeId||t.push("Missing rootNodeId"),e.nodes&&Array.isArray(e.nodes)){var n=new Set;e.nodes.find((function(t){return t.id===e.rootNodeId}))||t.push("Root node '"+e.rootNodeId+"' not found in nodes array");for(var o,a=l(e.nodes);!(o=a()).done;){var i=o.value;if(i.id){if(n.has(i.id)&&t.push("Duplicate node id: "+i.id),n.add(i.id),i.nodeType||t.push("Node "+i.id+" missing nodeType"),i.children)for(var s,u=function(){var r=s.value;e.nodes.find((function(e){return e.id===r}))||t.push("Node "+i.id+" references non-existent child: "+r)},c=l(i.children);!(s=c()).done;)u()}else t.push("Node missing id field")}var d=new Set([e.rootNodeId]),p=function(t){var r=e.nodes.find((function(e){return e.id===t}));if(r&&r.children)for(var n,o=l(r.children);!(n=o()).done;){var a=n.value;d.add(a),p(a)}};p(e.rootNodeId);for(var f,h=l(e.nodes);!(f=h()).done;){var v=f.value;d.has(v.id)||r.push("Orphaned node detected: "+v.id+" ("+v.name+")")}}else t.push("Missing or invalid nodes array");if(e.blackboard&&Array.isArray(e.blackboard))for(var m,g=new Set,y=l(e.blackboard);!(m=y()).done;){var x=m.value;x.name?(g.has(x.name)&&t.push("Duplicate blackboard variable: "+x.name),g.add(x.name),x.type||t.push("Blackboard variable "+x.name+" missing type")):t.push("Blackboard variable missing name")}if(e.propertyBindings&&Array.isArray(e.propertyBindings))for(var S,T,b=new Set(e.nodes.map((function(e){return e.id}))),k=new Set((null===(S=e.blackboard)||void 0===S?void 0:S.map((function(e){return e.name})))||[]),C=l(e.propertyBindings);!(T=C()).done;){var N=T.value;b.has(N.nodeId)||t.push("Property binding references non-existent node: "+N.nodeId),k.has(N.variableName)||t.push("Property binding references non-existent variable: "+N.variableName),N.propertyName||t.push("Property binding missing propertyName")}var A={valid:0===t.length};return t.length>0&&(A.errors=t),r.length>0&&(A.warnings=r),A},e.getStats=function(e){for(var t,r,n,o=0,a=0,s=0,u=0,c=l(e.nodes);!(n=c()).done;){switch(n.value.nodeType){case i.Action:o++;break;case i.Condition:a++;break;case i.Composite:s++;break;case i.Decorator:u++}}var d=function(t,r){void 0===r&&(r=0);var n=e.nodes.find((function(e){return e.id===t}));if(!n||!n.children||0===n.children.length)return r;for(var o,a=r,i=l(n.children);!(o=i()).done;){var s=o.value,u=d(s,r+1);a=Math.max(a,u)}return a};return{nodeCount:e.nodes.length,actionCount:o,conditionCount:a,compositeCount:s,decoratorCount:u,blackboardVariableCount:(null===(t=e.blackboard)||void 0===t?void 0:t.length)||0,propertyBindingCount:(null===(r=e.propertyBindings)||void 0===r?void 0:r.length)||0,maxDepth:d(e.rootNodeId)}},e}(),D=t.createLogger("EditorFormatConverter"),E=function(){function e(){}return e.toAsset=function(e,t){var r,n,o;D.info("开始转换编辑器格式到资产格式");var a=this.findRootNode(e.nodes);if(!a)throw new Error("未找到根节点");var i={name:(null==t?void 0:t.name)||(null===(r=e.metadata)||void 0===r?void 0:r.name)||"Untitled Behavior Tree",version:(null==t?void 0:t.version)||e.version||"1.0.0"},s=(null==t?void 0:t.description)||(null===(n=e.metadata)||void 0===n?void 0:n.description);s&&(i.description=s);var u=(null==t?void 0:t.createdAt)||(null===(o=e.metadata)||void 0===o?void 0:o.createdAt);u&&(i.createdAt=u);var c=(null==t?void 0:t.modifiedAt)||(new Date).toISOString();c&&(i.modifiedAt=c);var d=this.convertNodes(e.nodes),l=this.convertBlackboard(e.blackboard),p=this.convertPropertyBindings(e.connections,e.nodes,l),f={version:"1.0.0",metadata:i,rootNodeId:a.id,nodes:d,blackboard:l};return p.length>0&&(f.propertyBindings=p),D.info("转换完成: "+d.length+"个节点, "+l.length+"个黑板变量, "+p.length+"个属性绑定"),f},e.findRootNode=function(e){return e.find((function(e){return"根节点"===e.template.category||"root"===e.data.nodeType}))||null},e.convertNodes=function(e){var t=this;return e.map((function(e){return t.convertNode(e)}))},e.convertNode=function(e){var t=p({},e.data);return delete t.nodeType,e.template.className&&(t.className=e.template.className),{id:e.id,name:e.template.displayName||e.data.name||"Node",nodeType:e.template.type,data:t,children:e.children||[]}},e.convertBlackboard=function(e){for(var t=[],r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],a=o[0],i=o[1],s=this.inferBlackboardType(i);t.push({name:a,type:s,defaultValue:i})}return t},e.inferBlackboardType=function(e){return"number"==typeof e?exports.BlackboardValueType.Number:"string"==typeof e?exports.BlackboardValueType.String:"boolean"==typeof e?exports.BlackboardValueType.Boolean:exports.BlackboardValueType.Object},e.convertPropertyBindings=function(e,t,r){for(var n,o=[],a=new Set(r.map((function(e){return e.name}))),i=function(){var e,r=n.value,i=t.find((function(e){return e.id===r.from})),s=t.find((function(e){return e.id===r.to}));return i&&s&&r.toProperty?("blackboard-variable"===i.data.nodeType?e=i.data.variableName:r.fromProperty&&(e=r.fromProperty),e?a.has(e)?void o.push({nodeId:s.id,propertyName:r.toProperty,variableName:e}):(D.warn("属性绑定引用了不存在的黑板变量: "+e),0):(D.warn("无法确定变量名: from节点="+i.template.displayName),0)):(D.warn("跳过无效的属性连接: from="+r.from+", to="+r.to),0)},s=l(e.filter((function(e){return"property"===e.connectionType})));!(n=s()).done;)i();return o},e.fromAsset=function(e){D.info("开始转换资产格式到编辑器格式");for(var t,r=this.convertNodesFromAsset(e.nodes),n={},o=l(e.blackboard);!(t=o()).done;){var a=t.value;n[a.name]=a.defaultValue}var i=this.convertPropertyBindingsToConnections(e.propertyBindings||[]),s=this.buildNodeConnections(e.nodes);i.push.apply(i,s);var u={name:e.metadata.name};e.metadata.description&&(u.description=e.metadata.description),e.metadata.createdAt&&(u.createdAt=e.metadata.createdAt),e.metadata.modifiedAt&&(u.modifiedAt=e.metadata.modifiedAt);var c={version:e.metadata.version,metadata:u,nodes:r,connections:i,blackboard:n,canvasState:{offset:{x:0,y:0},scale:1}};return D.info("转换完成: "+r.length+"个节点, "+i.length+"个连接"),c},e.convertNodesFromAsset=function(e){var t=this;return e.map((function(e,r){var n={x:100+r%5*250,y:100+150*Math.floor(r/5)},o={displayName:e.name,category:t.inferCategory(e.nodeType),type:e.nodeType};return e.data.className&&(o.className=e.data.className),{id:e.id,template:o,data:p({},e.data),position:n,children:e.children}}))},e.inferCategory=function(e){switch(e){case i.Action:return"动作";case i.Condition:return"条件";case i.Composite:return"组合";case i.Decorator:return"装饰器";default:return"其他"}},e.convertPropertyBindingsToConnections=function(e){for(var t,r=[],n=l(e);!(t=n()).done;){var o=t.value;r.push({from:"blackboard",to:o.nodeId,toProperty:o.propertyName,connectionType:"property"})}return r},e.buildNodeConnections=function(e){for(var t,r=[],n=l(e);!(t=n()).done;)for(var o,a=t.value,i=l(a.children);!(o=i()).done;){var s=o.value;r.push({from:a.id,to:s,connectionType:"node"})}return r},e}(),F=t.createLogger("BehaviorTreeAssetSerializer"),V=function(){function e(){}return e.serialize=function(e,t){if(void 0===t&&(t={format:"json",pretty:!0}),!1!==t.validate){var r=R.validate(e);if(!r.valid){var n,o=(null===(n=r.errors)||void 0===n?void 0:n.join(", "))||"Unknown error";throw new Error("资产验证失败: "+o)}r.warnings&&r.warnings.length>0&&F.warn("资产验证警告: "+r.warnings.join(", "))}return"json"===t.format?this.serializeToJSON(e,t.pretty):this.serializeToBinary(e)},e.serializeToJSON=function(e,t){void 0===t&&(t=!0);try{var r=t?JSON.stringify(e,null,2):JSON.stringify(e);return F.info("已序列化为JSON: "+r.length+" 字符"),r}catch(e){throw new Error("JSON序列化失败: "+e)}},e.serializeToBinary=function(e){try{var r=t.BinarySerializer.encode(e);return F.info("已序列化为二进制: "+r.length+" 字节"),r}catch(e){throw new Error("二进制序列化失败: "+e)}},e.deserialize=function(e,t){var r;void 0===t&&(t={validate:!0,strict:!0});try{r="string"==typeof e?this.deserializeFromJSON(e):this.deserializeFromBinary(e)}catch(e){throw new Error("反序列化失败: "+e)}if(!1!==t.validate){var n=R.validate(r);if(!n.valid){var o,a=(null===(o=n.errors)||void 0===o?void 0:o.join(", "))||"Unknown error";if(t.strict)throw new Error("资产验证失败: "+a);F.error("资产验证失败: "+a)}n.warnings&&n.warnings.length>0&&F.warn("资产验证警告: "+n.warnings.join(", "))}return r},e.deserializeFromJSON=function(e){try{var t=JSON.parse(e);if(!t.rootNodeId&&t.nodes&&t.connections){F.info("检测到编辑器格式,正在转换为运行时资产格式...");var r=t,n=E.toAsset(r);return F.info("已从编辑器格式转换: "+n.nodes.length+" 个节点"),n}var o=t;return F.info("已从运行时资产格式反序列化: "+o.nodes.length+" 个节点"),o}catch(e){throw new Error("JSON解析失败: "+e)}},e.deserializeFromBinary=function(e){try{var r=t.BinarySerializer.decode(e);return F.info("已从二进制反序列化: "+r.nodes.length+" 个节点"),r}catch(e){throw new Error("二进制解码失败: "+e)}},e.detectFormat=function(e){return"string"==typeof e?"json":"binary"},e.getInfo=function(e){try{var r,n=this.detectFormat(e);r="json"===n?JSON.parse(e):t.BinarySerializer.decode(e);var o=e.length;return{format:n,name:r.metadata.name,version:r.version,nodeCount:r.nodes.length,blackboardVariableCount:r.blackboard.length,size:o}}catch(e){return F.error("获取资产信息失败: "+e),null}},e.convert=function(e,t,r){void 0===r&&(r=!0);var n=this.deserialize(e,{validate:!1});return this.serialize(n,{format:t,pretty:r,validate:!1})},e.compareSize=function(e,t){var r=e.length,n=t.length,o=r-n;return{jsonSize:r,binarySize:n,compressionRatio:o/r*100,savedBytes:o}},e}(),M=function(){function e(){this.variables=new Map}var t=e.prototype;return t.dispose=function(){this.variables.clear()},t.defineVariable=function(e,t,r,n){var o,a={name:e,type:t,value:r,readonly:null!==(o=null==n?void 0:n.readonly)&&void 0!==o&&o};void 0!==(null==n?void 0:n.description)&&(a.description=n.description),this.variables.set(e,a)},t.getValue=function(e){var t=this.variables.get(e);return null==t?void 0:t.value},t.setValue=function(e,t,r){void 0===r&&(r=!1);var n=this.variables.get(e);return!!n&&(!(n.readonly&&!r)&&(n.value=t,!0))},t.hasVariable=function(e){return this.variables.has(e)},t.removeVariable=function(e){return this.variables.delete(e)},t.getVariableNames=function(){return Array.from(this.variables.keys())},t.getAllVariables=function(){return Array.from(this.variables.values())},t.clear=function(){this.variables.clear()},t.setVariables=function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=r[t],o=n[0],a=n[1],i=this.variables.get(o);i&&!i.readonly&&(i.value=a)}},t.getVariables=function(e){for(var t,r={},n=l(e);!(t=n()).done;){var o=t.value,a=this.getValue(o);void 0!==a&&(r[o]=a)}return r},t.exportConfig=function(){return{version:"1.0",variables:Array.from(this.variables.values())}},t.importConfig=function(e){this.variables.clear();for(var t,r=l(e.variables);!(t=r()).done;){var n=t.value;this.variables.set(n.name,n)}},t.toJSON=function(){return JSON.stringify(this.exportConfig(),null,2)},e.fromJSON=function(e){return JSON.parse(e)},e}(),O=function(){function e(){this.name="@esengine/behavior-tree",this.version="1.0.0",this.worldManager=null,this.services=null}var r=e.prototype;return r.install=function(){var e=d(h().m((function e(r,n){return h().w((function(e){for(;;)switch(e.n){case 0:this.services=n,n.registerSingleton(M),n.registerSingleton(S),this.worldManager=n.resolve(t.WorldManager);case 1:return e.a(2)}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.uninstall=function(){var e=d(h().m((function e(){return h().w((function(e){for(;;)switch(e.n){case 0:this.services&&(this.services.unregister(M),this.services.unregister(S)),this.worldManager=null,this.services=null;case 1:return e.a(2)}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.setupScene=function(e){e.addSystem(new exports.BehaviorTreeExecutionSystem)},r.setupAllScenes=function(){if(!this.worldManager)throw new Error("Plugin not installed");for(var e,t=l(this.worldManager.getAllWorlds());!(e=t()).done;)for(var r,n=l(e.value.getAllScenes());!(r=n()).done;){var o=r.value;this.setupScene(o)}},e}();exports.BehaviorTreeAssetManager=S,exports.BehaviorTreeAssetSerializer=V,exports.BehaviorTreeAssetValidator=R,exports.BehaviorTreeBuilder=B,exports.BehaviorTreePlugin=O,exports.BehaviorTreeStarter=A,exports.BindingHelper=T,exports.EditorFormatConverter=E,exports.GlobalBlackboardService=M,exports.NodeExecutorMetadata=C,exports.NodeExecutorRegistry=b,exports.NodeMetadataRegistry=k,exports.NodeTemplates=I,exports.NodeType=i,exports.PropertyType=w,exports.ServiceRegistry=N,exports.createDefaultRuntimeState=s;
|
|
4
|
-
//# sourceMappingURL=index.es5.js.map
|