List of usage examples for com.badlogic.gdx.ai.steer.behaviors Flee Flee
public Flee(Steerable<T> owner, Steerable<T> target)
From source file:com.mygdx.entities.DynamicEntities.enemies.Enemy_TestMon.java
public Enemy_TestMon(Vector2 pos) { super(pos, 40f, 40f); idleTexture = MainGame.am.get(ResourceManager.ENEMY_PH); deadTexture = MainGame.am.get(ResourceManager.ENEMY_PH_DEAD); texture = idleTexture;//from ww w. j ava2 s . c om //AI wanderSB = new Wander<Vector2>(this).setFaceEnabled(false).setAlignTolerance(0.001f) .setDecelerationRadius(5).setTimeToTarget(0.1f).setWanderOffset(90).setWanderOrientation(10) .setWanderRadius(40f).setWanderRate(MathUtils.PI2 * 4); seekWanderSB = new Seek<Vector2>(this, seekWanderTarget); fleeSB = new Flee<Vector2>(this, EnvironmentManager.player); this.maxLinearSpeed = 150f; this.maxLinearAcceleration = 500f; this.maxAngularSpeed = 30f; this.maxAngularAcceleration = 5f; }