Example usage for com.badlogic.gdx.ai.btree.utils BehaviorTreeParser DEBUG_HIGH

List of usage examples for com.badlogic.gdx.ai.btree.utils BehaviorTreeParser DEBUG_HIGH

Introduction

In this page you can find the example usage for com.badlogic.gdx.ai.btree.utils BehaviorTreeParser DEBUG_HIGH.

Prototype

int DEBUG_HIGH

To view the source code for com.badlogic.gdx.ai.btree.utils BehaviorTreeParser DEBUG_HIGH.

Click Source Link

Usage

From source file:com.mygdx.game.overworld.java

private void createplayer() {
    Reader reader = null;//from  w  ww .  ja v  a2s .c  om
    try {
        reader = Gdx.files.internal("player.tree").reader();
        BehaviorTreeParser<player> parser = new BehaviorTreeParser<player>(BehaviorTreeParser.DEBUG_HIGH);
        BehaviorTree<player> btree = parser.parse(reader, p = new player());

        p.btree = btree;
        p.playerlocation = p.playerlocation.Maki;
        p.pstate = p.pstate.overworld;
        p.pdirY = p.pdirY.non;
        p.pdirX = p.pdirX.non;
        p.x = 400;
        p.y = 260;
        owpathfinding = new overworldpathfinding(p, townnodes);
        p.funds = 1000;

    } finally {

        StreamUtils.closeQuietly(reader);
    }
}