Search in sources :

Example 1 with GameStateManager

use of com.mygdx.game.states.GameStateManager in project myFirstGame by Juicebox47.

the class MyFirstGame method create.

@Override
public void create() {
    spriteBatch = new SpriteBatch();
    gameStateManager = new GameStateManager(new Stack<State>(), new OrthographicCamera(), new Vector3());
    Gdx.gl.glClearColor(0, 0, 0, 0);
    gameStateManager.push(new MenuState(gameStateManager));
}
Also used : OrthographicCamera(com.badlogic.gdx.graphics.OrthographicCamera) Vector3(com.badlogic.gdx.math.Vector3) MenuState(com.mygdx.game.states.MenuState) SpriteBatch(com.badlogic.gdx.graphics.g2d.SpriteBatch) GameStateManager(com.mygdx.game.states.GameStateManager) Stack(java.util.Stack)

Aggregations

OrthographicCamera (com.badlogic.gdx.graphics.OrthographicCamera)1 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)1 Vector3 (com.badlogic.gdx.math.Vector3)1 GameStateManager (com.mygdx.game.states.GameStateManager)1 MenuState (com.mygdx.game.states.MenuState)1 Stack (java.util.Stack)1