/// <summary> /// Helper for add new BehaviourTreeCondition node. /// </summary> /// <param name="condition">Condition.</param> public BehaviourTreeCondition <T> When <T>(BehaviourTreeNodeBase condition) where T : class, new() { var node = new BehaviourTreeCondition <T>(condition); AddChild(node); return(node); }
/// <summary> /// Helper for add new BehaviourTreeCondition node. /// </summary> /// <param name="bt">Bt.</param> /// <param name="condition">Condition.</param> public BehaviourTreeCondition <T> When <T>( BehaviourTree <T> bt, Func <BehaviourTree <T>, BehaviourTreeResult> condition) where T : class, new() { var node = new BehaviourTreeCondition <T>(bt, condition); AddChild(node); return(node); }