Example usage for com.badlogic.gdx.ai.fsm StackStateMachine StackStateMachine

List of usage examples for com.badlogic.gdx.ai.fsm StackStateMachine StackStateMachine

Introduction

In this page you can find the example usage for com.badlogic.gdx.ai.fsm StackStateMachine StackStateMachine.

Prototype

public StackStateMachine(E owner) 

Source Link

Document

Creates a StackStateMachine for the specified owner.

Usage

From source file:com.jupiter.europa.EuropaGame.java

License:Open Source License

private EuropaGame() {
    this.stateMachine = new StackStateMachine<>(this);

    // Add systems to the engine
    this.movementSystem.priority = MOVEMENT_SYSTEM_PRIORITY;
    this.collisionSystem.priority = COLLISION_SYSTEM_PRIORITY;
    this.renderingSystem.priority = RENDERING_SYSTEM_PRIORITY;
    this.effectsSystem.priority = EFFECTS_SYSTEM_PRIORITY;

    this.entityEngine.addSystem(this.movementSystem);
    this.entityEngine.addSystem(this.collisionSystem);
    this.entityEngine.addSystem(this.renderingSystem);
    this.entityEngine.addSystem(this.effectsSystem);

    for (EntitySystem system : this.entityEngine.getSystems()) {
        if (system instanceof SelfSubscribingListener) {
            ((SelfSubscribingListener) system).subscribe(this.entityEngine, this.getMessageSystem());
        }//w w  w  . jav  a 2 s .  c  o  m
    }
}