Java Code Examples for com.badlogic.gdx.assets.AssetManager#finishLoading()

The following examples show how to use com.badlogic.gdx.assets.AssetManager#finishLoading() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Assets.java    From ud406 with MIT License 6 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);

    // TODO: Initialize bulletAssets, explosionAssets, and powerupAssets
    bulletAssets = new BulletAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
}
 
Example 2
Source File: Assets.java    From ud406 with MIT License 6 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(atlas);
    onscreenControlsAssets = new OnscreenControlsAssets(atlas);
}
 
Example 3
Source File: Assets.java    From ud406 with MIT License 6 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(atlas);
    onscreenControlsAssets = new OnscreenControlsAssets(atlas);
}
 
Example 4
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
}
 
Example 5
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);

    // TODO: Initialize enemyAssets
    enemyAssets = new EnemyAssets(atlas);
}
 
Example 6
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(atlas);
}
 
Example 7
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
}
 
Example 8
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(atlas);
}
 
Example 9
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
}
 
Example 10
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
}
 
Example 11
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
}
 
Example 12
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
}
 
Example 13
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);

    // TODO: Initialize platformAssets, passing in the atlas

}
 
Example 14
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
}
 
Example 15
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(atlas);
}
 
Example 16
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
    platformAssets = new PlatformAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
}
 
Example 17
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
}
 
Example 18
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
}
 
Example 19
Source File: Assets.java    From ud406 with MIT License 5 votes vote down vote up
public void init(AssetManager assetManager) {
    this.assetManager = assetManager;
    assetManager.setErrorListener(this);
    assetManager.load(Constants.TEXTURE_ATLAS, TextureAtlas.class);
    assetManager.finishLoading();

    TextureAtlas atlas = assetManager.get(Constants.TEXTURE_ATLAS);
    gigaGalAssets = new GigaGalAssets(atlas);
}
 
Example 20
Source File: DemoScreen.java    From gdx-vfx with Apache License 2.0 4 votes vote down vote up
public DemoScreen() {
    // Asset initialization.
    {
        assets = new AssetManager();
        assets.load("skin/uiskin.json", Skin.class, null);

        // Textures
        {
            TextureLoader.TextureParameter paramsRegular = new TextureLoader.TextureParameter();
            paramsRegular.minFilter = Texture.TextureFilter.Nearest;
            paramsRegular.magFilter = Texture.TextureFilter.Nearest;
            paramsRegular.wrapU = Texture.TextureWrap.ClampToEdge;
            paramsRegular.wrapV = Texture.TextureWrap.ClampToEdge;

            TextureLoader.TextureParameter paramsRepeat = new TextureLoader.TextureParameter();
            paramsRepeat.minFilter = Texture.TextureFilter.Nearest;
            paramsRepeat.magFilter = Texture.TextureFilter.Nearest;
            paramsRepeat.wrapU = Texture.TextureWrap.Repeat;
            paramsRepeat.wrapV = Texture.TextureWrap.Repeat;

            assets.load("gdx-vfx-logo.png", Texture.class, paramsRegular);
            assets.load("bg-scene-pattern.png", Texture.class, paramsRepeat);
            assets.load("bg-transparency-tile.png", Texture.class, paramsRegular);
        }

        assets.finishLoading();
    }

    batch = new SpriteBatch();
    stage = new Stage(new ExtendViewport(640f, 480f), batch);
    stage.addListener(new StageDebugInputListener());

    lmlParser = (CommonLmlParser)new CommonLmlParserBuilder()
            .syntax(new CommonLmlSyntax())
            .skin(assets.get("skin/uiskin.json", Skin.class))
            .action(":empty", new EmptyActorConsumer())
            .build();

    viewControllers = new ViewControllerManager(stage);
    viewControllers.add(new ScreenBackgroundViewController(lmlParser, assets));
    viewControllers.add(new VfxViewController(viewControllers, lmlParser));
    viewControllers.add(new CanvasContentViewController(viewControllers, lmlParser, assets));
    viewControllers.add(new EffectRosterViewController(viewControllers, lmlParser));
    viewControllers.add(new StatisticPanelViewController(viewControllers, lmlParser));

    Group sceneRoot = (Group)lmlParser.parseTemplate(
            Gdx.files.internal("lml/screen-demo/root.lml")).first();
    stage.addActor(sceneRoot);

    viewControllers.onViewCreated(sceneRoot);
}