using System.Collections.Generic; namespace AI.BehaviorTrees { public class CompositeNode : BTNode { protected readonly List children = new List(); public override bool Tick() { foreach (BTNode child in children) { if (!child.Tick()) return false; } return true; } public void AddChild(BTNode child) { if (child != null) children.Add(child); } } }