This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using SampleBehavirTree;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 只要有一个节点返回Ture,则停止检测其他节点,运行状态为Ture
/// </summary>
public class Selector : Composite
{
public override IEnumerator Execute()
foreach (var node in nodes)
yield return BehaviourCtrl.Instance.StartCoroutine(node.Execute());
if (node.state == State.Succeed) yield break;
}
this.state = SampleBehavirTree.State.Fail;