示例#1
0
文件: nodes.cs 项目: bitdotgames/bhl
 public static void Stop(this IBehaviorTreeNode node)
 {
     if (node.last_status == BHS.RUNNING)
     {
         node.Deinit();
     }
     if (node.last_status != BHS.NONE)
     {
         node.Defer();
     }
     node.last_status = BHS.NONE;
 }
示例#2
0
文件: nodes.cs 项目: bitdotgames/bhl
 public static BHS Run(this IBehaviorTreeNode node)
 {
     if (node.last_status != BHS.RUNNING)
     {
         node.Init();
     }
     node.last_status = node.Execute();
     if (node.last_status != BHS.RUNNING)
     {
         node.Deinit();
     }
     return(node.last_status);
 }