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

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

Introduction

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

Prototype

public DefaultStateMachine(E owner, State<E> initialState) 

Source Link

Document

Creates a DefaultStateMachine for the specified owner and initial state.

Usage

From source file:com.badlogic.gdx.ai.tests.fsm.Bob.java

License:Apache License

public Bob(Elsa elsa) {
    this.elsa = elsa;
    location = Location.SHACK;//from   w  w  w  .  j a v a 2 s .c  o  m
    goldCarried = 0;
    moneyInBank = 0;
    thirst = 0;
    fatigue = 0;

    stateMachine = new DefaultStateMachine<Bob>(this, BobState.GO_HOME_AND_SLEEP_TILL_RESTED);
}