Search in sources :

Example 1 with PlatformExampleState

use of com.examples.games.states.PlatformExampleState in project Entitas-Java by Rubentxu.

the class Examples method create.

@Override
public void create() {
    engine = new ExamplesEngine();
    entitas = new Entitas();
    preferencesManager.LOG_LEVEL = LogManager.LOG_DEBUG;
    AssetManager assetsManager = new AssetManager(new TestFileHandleResolver());
    engine.addManager(new AssetsManagerGDX(assetsManager, preferencesManager));
    engine.addManager(new PhysicsManagerGDX(new Vector2(0, -9.8f)));
    engine.addManager(new GUIManagerGDX(new ScreenViewport(), new BitmapFont(), engine));
    engine.addManager(new SceneManagerGDX(engine, entitas));
    engine.addManager(new LogManagerGDX(preferencesManager));
    engine.addManager(new InputManagerGDX(entitas, engine));
    engine.addManager(preferencesManager);
    game = new ExamplesGame(engine, new EventBusGDX(new MBassador()));
    game.init();
    game.pushState(new PlatformExampleState(engine, entitas));
}
Also used : AssetManager(com.badlogic.gdx.assets.AssetManager) TestFileHandleResolver(com.examples.games.util.TestFileHandleResolver) ScreenViewport(com.badlogic.gdx.utils.viewport.ScreenViewport) MBassador(net.engio.mbassy.bus.MBassador) EventBusGDX(ilargia.egdx.impl.EventBusGDX) PlatformExampleState(com.examples.games.states.PlatformExampleState) Vector2(com.badlogic.gdx.math.Vector2) BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont) Entitas(ilargia.egdx.logicbricks.gen.Entitas)

Aggregations

AssetManager (com.badlogic.gdx.assets.AssetManager)1 BitmapFont (com.badlogic.gdx.graphics.g2d.BitmapFont)1 Vector2 (com.badlogic.gdx.math.Vector2)1 ScreenViewport (com.badlogic.gdx.utils.viewport.ScreenViewport)1 PlatformExampleState (com.examples.games.states.PlatformExampleState)1 TestFileHandleResolver (com.examples.games.util.TestFileHandleResolver)1 EventBusGDX (ilargia.egdx.impl.EventBusGDX)1 Entitas (ilargia.egdx.logicbricks.gen.Entitas)1 MBassador (net.engio.mbassy.bus.MBassador)1