Ejemplo n.º 1
0
        /**
         * Creates a new empty context (with no variables) that contains all the
         * behaviour trees specified in <code>library</code>.
         *
         * @param library
         *            the set of behaviour trees that the returned IContext will
         *            contain.
         * @return a new empty context that contains all the behaviour trees
         *         specified in <code>library</code>.
         */
        public static IContext CreateContext(IBTLibrary library)
        {
            var result = new BasicContext();

            result.AddBTLibrary(library);
            return(result);
        }
Ejemplo n.º 2
0
        /**
         * Creates a new empty context (with no variables) that contains all the
         * behaviour trees in the libraries <code>libraries</code>.
         *
         * @param libraries
         *            the list of libraries whose behaviour trees this context will
         *            contain.
         * @return a new empty context that contains all the behaviour trees in the
         *         libraries <code>libraries</code>.
         */
        public static IContext CreateContext(List <IBTLibrary> libraries)
        {
            var result = new BasicContext();

            foreach (var btLibrary in libraries)
            {
                result.AddBTLibrary(btLibrary);
            }

            return(result);
        }