Пример #1
0
        /// <summary>
        /// Create Optional action node
        /// </summary>
        /// <param name="child">Optional action</param>
        /// <returns>ActionNode</returns>
        public ActionNode <TBlackboard> Optional(ActionNode <TBlackboard> child)
        {
            ActionNode <TBlackboard> node = new OptionalActionNode <TBlackboard>(child, false);

            return(node);
        }
Пример #2
0
        /// <summary>
        /// Create Optional action node
        /// </summary>
        /// <param name="child">Optional action</param>
        /// <param name="startSuccessRequired">If False action will starts even if child.Start failed</param>
        /// <returns>ActionNode</returns>
        public ActionNode <TBlackboard> Optional(ActionNode <TBlackboard> child, bool startSuccessRequired)
        {
            ActionNode <TBlackboard> node = new OptionalActionNode <TBlackboard>(child, startSuccessRequired);

            return(node);
        }