BehaviorManager.instance.Tick(behaviorTree); 卸载update里u3d直接卡死 = =
SharedVariable直接赋值会改变他的引用关系,必须用XXX.Value赋值 = =

http://www.opsive.com/assets/BehaviorDesigner/documentation.php


两种自定义Task:  Task 和 Parent Tasks

基础task流程 ( Conditional Task  和   Action Task )


Parent Tasks
  1. // The maximum number of children a parent task can have. Will usually be 1 or int.MaxValue
  2. public virtual int MaxChildren();
  3. // Boolean value to determine if the current task is a parallel task
  4. public virtual bool CanRunParallelChildren();
  5. // The index of the currently active child
  6. public virtual int CurrentChildIndex();
  7. // Boolean value to determine if the current task can execute
  8. public virtual bool CanExecute();
  9. // Apply a decorator to the executed status
  10. public virtual TaskStatus Decorate(TaskStatus status);
  11. // Notifies the parent task that the child has been executed and has a status of childStatus
  12. public virtual void OnChildExecuted(TaskStatus childStatus);
  13. // Notifies the parent task that the child at index childIndex has been executed and has a status of childStatus
  14. public virtual void OnChildExecuted(int childIndex, TaskStatus childStatus);
  15. // Notifies the task that the child has started to run
  16. public virtual void OnChildStarted();
  17. // Notifies the parallel task that the child at index childIndex has started to run
  18. public virtual void OnChildStarted(int childIndex);
  19. // Some parent tasks need to be able to override the status, such as parallel tasks
  20. public virtual TaskStatus OverrideStatus(TaskStatus status);
  21. // The interrupt node will override the status if it has been interrupted.
  22. public virtual TaskStatus OverrideStatus();
  23. // Notifies the composite task that an conditional abort has been triggered and the child index should reset
  24. public virtual void OnConditionalAbort(int childIndex);

父节点基础类ParentTask派生出装饰节点Decorator
  1. // The maximum number of children a parent task can have. Will usually be 1 or int.MaxValue
  2. public virtual int MaxChildren();
  3. // Boolean value to determine if the current task is a parallel task
  4. public virtual bool CanRunParallelChildren();
  5. // The index of the currently active child
  6. public virtual int CurrentChildIndex();
  7. // Boolean value to determine if the current task can execute
  8. public virtual bool CanExecute();
  9. // Apply a decorator to the executed status
  10. public virtual TaskStatus Decorate(TaskStatus status);
  11. // Notifies the parent task that the child has been executed and has a status of childStatus
  12. public virtual void OnChildExecuted(TaskStatus childStatus);
  13. // Notifies the parent task that the child at index childIndex has been executed and has a status of childStatus
  14. public virtual void OnChildExecuted(int childIndex, TaskStatus childStatus);
  15. // Notifies the task that the child has started to run
  16. public virtual void OnChildStarted();
  17. // Notifies the parallel task that the child at index childIndex has started to run
  18. public virtual void OnChildStarted(int childIndex);
  19. // Some parent tasks need to be able to override the status, such as parallel tasks
  20. public virtual TaskStatus OverrideStatus(TaskStatus status);
  21. // The interrupt node will override the status if it has been interrupted.
  22. public virtual TaskStatus OverrideStatus();
  23. // Notifies the composite task that an conditional abort has been triggered and the child index should reset
  24. public virtual void OnConditionalAbort(int childIndex);



Behavior Designer扩展的更多相关文章

  1. 基于行为树的AI 与 Behavior Designer插件

    优点:    0.行为逻辑和状态数据分离,任何节点都可以反复利用.    1.高度模块化状态,去掉状态中的跳转逻辑,使得状态变成一个"行为".    2."行为" ...

  2. Behavior Designer中的内置消息机制

    最近在用Behavior Designer,其中需要用到消息机制,看了一下其中自带了这套东西 注册 Owner.RegisterEvent<string>("Message&qu ...

  3. 【转】利用Behavior Designer制作敌人AI

    http://www.unity.5helpyou.com/3112.html 本篇unity3d教程,我们来学习下利用Behavior Designer行为树插件来制作敌人AI,下面开始! Beha ...

  4. Unity火爆插件Behavior Designer行为树插件学习

    如果要让游戏里的角色或者NPC能执行预设的AI逻辑,最简单的用IF..ELSE...神器既可以实现, 但是再复杂的一般用经典的状态机来切换状态,但是写起来比较麻烦.相对的,行为树(Behavior T ...

  5. Behavior Designer中Wait节点的坑

    某一组行为放在并行节点下,并且包含Wait节点动作.当等待时间不达到时它会返回Runing 造成整个行为树阻塞 应该考虑写一个CD时间装饰器来解决此类问题,当CD时间未到返回Failure

  6. Behavior Designer 学习

    http://www.opsive.com/ 简单Demo Sequence Selector Chase Enemy enemy:player:

  7. 【转】手动写一个Behavior Designer任务节点

    http://blog.csdn.net/qq_33747722/article/details/53539532 自己手写一个类似于CanSeeObject.Seek等任务节点并不是一件难事 下面我 ...

  8. 【Unity笔记】Behaviour Designer的使用方法

    Tasks列表 -- Composites选项 Sequence:图标是“箭头”,相当于And逻辑.下接多个子任务,它们从左到右依次执行.所有子任务执行成功,则Sequence返回成功:任一子任务执行 ...

  9. ThinkPHP框架设计与扩展总结

    详见:http://www.ucai.cn/blogdetail/7028?mid=1&f=5 可在线运行查看效果哦 导言:ThinkPHP框架是国内知名度很高应用很广泛的php框架,我们从一 ...

随机推荐

  1. set解两数之和--P2141 珠心算测验

    题目描述 珠心算是一种通过在脑中模拟算盘变化来完成快速运算的一种计算技术.珠心算训练,既能够开发智力,又能够为日常生活带来很多便利,因而在很多学校得到普及. 某学校的珠心算老师采用一种快速考察珠心算加 ...

  2. buf.readInt16BE()

    buf.readInt16BE(offset[, noAssert]) buf.readInt16LE(offset[, noAssert]) offset {Number} 0 noAssert { ...

  3. 洛谷 1012 拼数(NOIp1998提高组)

    [题解] 我们要做的就是把这些数排序.排序的时候判断两个数是否交换的方法,就是把这两个数相接形成两个长度相同的数字,比较这两个数字的大小. #include<cstdio> #includ ...

  4. Poor Hanamichi

    Poor Hanamichi Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  5. Linear and Logistic Regression in TensorFlow

    Linear and Logistic Regression in TensorFlow Graphs and sessions TF Ops: constants, variables, funct ...

  6. MySQL常用函数(转)

    一.数学函数 ABS(x):返回x的绝对值 BIN(x):返回x的二进制(OCT返回八进制,HEX返回十六进制) CEILING(x):返回大于x的最小整数值 EXP(x):返回值e(自然对数的底)的 ...

  7. SiteMesh基础教程

    SiteMesh是由一个基于Web页面布局.装饰以及与现存Web应用整合的框架.它能帮助我们在由大量页面构成的项目中创建一致的页面布局和外观,如一致的导航条,一致的banner,一致的版权,等等. 教 ...

  8. firebug 扩展介绍和下载

    https://getfirebug.com/wiki/index.php/Firebug_Extensions#Firecookie https://addons.mozilla.org/zh-CN ...

  9. PL/SQL个人学习笔记

    资料1 -- Created on 2014/8/20  declare    -- Local variables here   i integer; begin   i := 12;   -- T ...

  10. 【翻译自mos文章】rman 标准版和企业版的兼容性

    rman 标准版和企业版的兼容性 来源于: RMAN Standard and Enterprise Edition Compatibility (文档 ID 730193.1) 适用于: Oracl ...