/// <summary>
        /// 初期化
        /// </summary>
        /// <param name="gameObject">設定したいゲームオブジェクト</param>
        /// <param name="rootNode">親ノード</param>
        /// <param name="autoReset">自動的にリセットして再開するか</param>
        /// <returns></returns>
        public static BehaviorTreeComponent RegsterComponent(GameObject gameObject, Node rootNode, bool autoReset = true)
        {
            var behaviorTreeComponent =  gameObject.AddComponent<BehaviorTreeComponent>();

            behaviorTreeComponent.Initialize(rootNode,autoReset);

            return behaviorTreeComponent;
        }
Ejemplo n.º 2
0
 public DecoratorNode(string name,Node node, Func<bool> whereAction)
 {
     NodeName = name;
     _actionNode = node;
     _whereFunc = whereAction;
 }
Ejemplo n.º 3
0
 public DecoratorNode(Node node, Func<bool> whereAction )
 {
     NodeName = "DecoratorNode";
     _actionNode = node;
     _whereFunc = whereAction;
 }
 public void Initialize(Node rootNode, bool autoReset)
 {
     _rootNode = rootNode;
     _autoReset = autoReset;
 }