예제 #1
0
파일: NPC.cs 프로젝트: dakkua/ia-bt-unity
 // Update is called once per frame
 void Update()
 {
     if (root != null)
     {
         root.Execute();
     }
 }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     items.text = "Apple: " + apple + " Orange:" + orange + " Banana:" + banana + " SmoothieM:" + smoothie1;
     if (root != null)
     {
         root.Execute();
     }
 }
예제 #3
0
        public override Status Execute()
        {
            if (lastResult != Status.Running)
            {
                node.Reset();
            }
            var ret = lastResult = node.Execute();

            return(ret != Status.Running ? Status.Success : Status.Running);
        }
예제 #4
0
        public override Status Execute()
        {
            if (lastResult != Status.Running)
            {
                node.Reset();
            }
            var ret = lastResult = node.Execute();

            if (ret == Status.Failure)
            {
                ret = Status.Success;
            }
            else if (ret == Status.Success)
            {
                ret = Status.Failure;
            }

            return(ret);
        }
예제 #5
0
 public Status Execute()
 {
     return(root.Execute());
 }