Search in sources :

Example 1 with RendererSystem

use of com.ilargia.games.entitas.systems.RendererSystem in project Entitas-Java by Rubentxu.

the class SplashState method initialize.

@Override
public void initialize() {
    // Input
    Camera camera = engine.getManager(BaseSceneManager.class).getDefaultCamera();
    Batch batch = engine.getManager(BaseSceneManager.class).getBatch();
    BitmapFont font = engine.getManager(BaseGUIManager.class).getDefaultFont();
    systems.add(new DelaySystem(context.core)).add(new RendererSystem(context.core, engine.sr, camera, batch, font));
    Texture texture = assetsManager.getTexture(splash);
    context.core.createEntity().addTextureView("Pong", new TextureRegion(texture, 0, 0, texture.getWidth(), texture.getHeight()), new Vector2(), 0, Pong.SCREEN_HEIGHT, Pong.SCREEN_WIDTH).addDelay(3);
}
Also used : TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) Batch(com.badlogic.gdx.graphics.g2d.Batch) Vector2(com.badlogic.gdx.math.Vector2) BaseSceneManager(com.ilargia.games.entitas.egdx.base.managers.BaseSceneManager) BaseGUIManager(com.ilargia.games.entitas.egdx.base.managers.BaseGUIManager) RendererSystem(com.ilargia.games.entitas.systems.RendererSystem) Camera(com.badlogic.gdx.graphics.Camera) BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont) Texture(com.badlogic.gdx.graphics.Texture) DelaySystem(com.ilargia.games.entitas.systems.DelaySystem)

Aggregations

Camera (com.badlogic.gdx.graphics.Camera)1 Texture (com.badlogic.gdx.graphics.Texture)1 Batch (com.badlogic.gdx.graphics.g2d.Batch)1 BitmapFont (com.badlogic.gdx.graphics.g2d.BitmapFont)1 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 Vector2 (com.badlogic.gdx.math.Vector2)1 BaseGUIManager (com.ilargia.games.entitas.egdx.base.managers.BaseGUIManager)1 BaseSceneManager (com.ilargia.games.entitas.egdx.base.managers.BaseSceneManager)1 DelaySystem (com.ilargia.games.entitas.systems.DelaySystem)1 RendererSystem (com.ilargia.games.entitas.systems.RendererSystem)1