Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }