Java 类com.badlogic.gdx.ai.btree.utils.BehaviorTreeLibraryManager 实例源码

项目:GdxDemo3D    文件:DogCharacter.java   
public DogCharacter(Model model, String name,
                    Vector3 location, Vector3 rotation, Vector3 scale,
                    btCollisionShape shape, float mass,
                    short belongsToFlag, short collidesWithFlag,
                    boolean callback, boolean noDeactivate) {
    super(model, name,
            location, rotation, scale,
            shape, mass,
            belongsToFlag, collidesWithFlag,
            callback, noDeactivate,
            new DogSteerSettings());

    // Create behavior tree through the library
    BehaviorTreeLibraryManager btlm = BehaviorTreeLibraryManager.getInstance();
    this.tree = btlm.createBehaviorTree("btrees/dog.btree", this);

    // Create animation controller
    animations = new AnimationController(modelInstance);

    // Create path follower
    followPathSteerer = new FollowPathSteerer(this);

    // Create wander steerer
    wanderSteerer = new WanderSteerer(this);

    // Init flags
    humanWantToPlay = false;
    stickThrown = false;
    alreadyCriedForHumanDeath = false;
    humanIsDead = false;
}
项目:gdx-ai    文件:IncludeSubtreeTest.java   
@Override
public Actor createActor (Skin skin) {
    BehaviorTreeLibraryManager libraryManager = BehaviorTreeLibraryManager.getInstance();
    libraryManager.setLibrary(new BehaviorTreeLibrary(BehaviorTreeParser.DEBUG_HIGH));

    String name = lazy ? "data/dogIncludeLazy.tree" : "data/dogInclude.tree";
    BehaviorTree<Dog> tree = libraryManager.createBehaviorTree(name, new Dog("Buddy"));
    BehaviorTreeViewer<?> treeViewer = createTreeViewer(tree.getObject().name, tree, true, skin);

    return new ScrollPane(treeViewer, skin);
}
项目:gdx-ai    文件:ProgrammaticallyCreatedTreeTest.java   
@Override
public Actor createActor (Skin skin) {
    BehaviorTreeLibraryManager libraryManager = BehaviorTreeLibraryManager.getInstance();
    BehaviorTreeLibrary library = new BehaviorTreeLibrary(BehaviorTreeParser.DEBUG_HIGH);
    registerDogBehavior(library);
    libraryManager.setLibrary(library);
    BehaviorTree<Dog> tree = libraryManager.createBehaviorTree("dog", new Dog("Buddy"));
    BehaviorTreeViewer<?> treeViewer = createTreeViewer(tree.getObject().name, tree, true, skin);

    return new ScrollPane(treeViewer, skin);
}
项目:Inspiration    文件:Include.java   
private Task<E> createSubtreeRootTask () {
    return BehaviorTreeLibraryManager.getInstance().createRootTask(subtree);
}
项目:gdx-ai    文件:Include.java   
private Task<E> createSubtreeRootTask () {
    return BehaviorTreeLibraryManager.getInstance().createRootTask(subtree);
}