Cocos Creator 行为树可视化编辑插件[20170319更新]

是啊 想起了这个贴心行为树

看到别的一些版本的行为树的action 有前置条件和后置条件,请问这个版本的用什么来处理前置后置啊?

很奇怪,节点在tick的过程中基本都会执行 enter open tick close exit,但对于Wait、Limiter这样的行为,在open的时候会进行重置计数,等于每个tick都是新的,根本起不到该有的作用,不知道是没开发完成还是我的用法不对……

mark!

这个有没有平行节点?

并行
var successCount = 0;
for (var i=0; i<treeNode.children.length; i++){
var childrenTreeNode = treeNode.children[i];
var status = childrenTreeNode._execute(tick);
if(status == b3.SUCCESS){
successCount++;
}
}
if(successCount == treeNode.children.length){
return b3.SUCCESS;
}else{
return b3.RUNNING;
}
随机权重节点
open: function(tick,b3,treeNode){
this.random = Math.floor(Math.random() * 100);
tick.blackboard.set(‘runningChild’, 0, tick.tree.id, this.id);
tick.blackboard.set(‘WantLeaveTime’, Math.floor(Math.random()*1));
},
tick: function(tick,b3,treeNode){
let child = tick.blackboard.get(‘runningChild’, tick.tree.id, this.id);
for (var i=child; i<treeNode.children.length; i++){
var childrenTreeNode = treeNode.children[i];
childrenTreeNode.parameter;
var randomA = childrenTreeNode.parameter.randomA;
var randomB = childrenTreeNode.parameter.randomB;
if(randomA <= this.random && this.random < randomB){
var status = childrenTreeNode._execute(tick);
if(status !== b3.FAILURE){
if(status == b3.RUNNING){
tick.blackboard.set(‘runningChild’, i, tick.tree.id, this.id);
}
return status;
}
}
}
return b3.FAILURE;
},

有人碰到这个报错吗,跟着例子敲的

为啥那个Behavior.com的链接点进去是一个卖彩票的网站啊