Search in sources :

Example 1 with LibgdxInputMappingBuilder

use of com.gemserk.componentsengine.input.LibgdxInputMappingBuilder in project commons-gdx by gemserk.

the class AdSimulatorApplicationDelegate method create.

@Override
public void create() {
    applicationListener.create();
    Texture.setEnforcePotImages(false);
    Texture texture = new Texture(Gdx.files.internal("test/house-ad.png"));
    texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
    houseAdSprite = new Sprite(texture);
    spriteBatch = new SpriteBatch();
    Texture.setEnforcePotImages(true);
    adsParameters = new AdsParameters().delay(0).horizontalAlign(0).verticalAlign(0);
    inputMonitor = new InputDevicesMonitorImpl<String>();
    new LibgdxInputMappingBuilder<String>(inputMonitor, Gdx.input) {

        {
            monitorKeys("toggleAds", Keys.BACKSPACE, Keys.STAR);
        }
    };
}
Also used : Sprite(com.badlogic.gdx.graphics.g2d.Sprite) AdsParameters(com.gemserk.commons.admob.AdsParameters) Texture(com.badlogic.gdx.graphics.Texture) SpriteBatch(com.badlogic.gdx.graphics.g2d.SpriteBatch) LibgdxInputMappingBuilder(com.gemserk.componentsengine.input.LibgdxInputMappingBuilder)

Aggregations

Texture (com.badlogic.gdx.graphics.Texture)1 Sprite (com.badlogic.gdx.graphics.g2d.Sprite)1 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)1 AdsParameters (com.gemserk.commons.admob.AdsParameters)1 LibgdxInputMappingBuilder (com.gemserk.componentsengine.input.LibgdxInputMappingBuilder)1