// 激活 public virtual void Activate(BTContext _context) { if (isActived) { return; } context = _context; if (precondition != null) { precondition.Activate(_context); } if (children != null) { foreach (BTNode _node in children) { _node.Activate(_context); } } isActived = true; }
public virtual void Activated(BTContext _context) { context = _context; }
protected virtual void Start() { context = GetComponent <BTContext>(); }