protected BehaviorTree < ? > retrieveArchetypeTree ( String treeReference ) { BehaviorTree < ? > archetypeTree = repository . get ( treeReference ) ; if ( archetypeTree == null ) { // if (assetManager != null) { // // TODO: fix me!!! // // archetypeTree = assetManager.load(name, BehaviorTree.class, null); // repository.put(treeReference, archetypeTree); // return null; // } archetypeTree = parser . parse ( resolver . resolve ( treeReference ) , null ) ; registerArchetypeTree ( treeReference , archetypeTree ) ; } return archetypeTree ; }
Retrieves the archetype tree from the library . If the library doesn t contain the archetype tree it is loaded and added to the library .