Java Code Examples for com.badlogic.gdx.assets.AssetManager#load()
The following examples show how to use
com.badlogic.gdx.assets.AssetManager#load() .
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 |
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); // TODO: Initialize the exitPortalAssets }
Example 2
Source File: SimpleRoom.java From gdx-vr with Apache License 2.0 | 6 votes |
@Override public void create() { assets = new AssetManager(); String model = "Bambo_House.g3db"; assets.load(model, Model.class); assets.finishLoading(); modelInstance = new ModelInstance(assets.get(model, Model.class), new Matrix4().setToScaling(0.6f, 0.6f, 0.6f)); DefaultShader.Config config = new Config(); config.defaultCullFace = GL20.GL_NONE; ShaderProvider shaderProvider = new DefaultShaderProvider(config); modelBatch = new ModelBatch(shaderProvider); ModelBuilder builder = new ModelBuilder(); float groundSize = 1000f; ground = new ModelInstance(builder.createRect(-groundSize, 0, groundSize, groundSize, 0, groundSize, groundSize, 0, -groundSize, -groundSize, 0, -groundSize, 0, 1, 0, new Material(), Usage.Position | Usage.Normal), new Matrix4().setToTranslation(0, -0.01f, 0)); environment = new Environment(); environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f)); environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f)); VirtualReality.renderer.listeners.add(this); // VirtualReality.head.setCyclops(true); }
Example 3
Source File: Assets.java From ud406 with MIT License | 6 votes |
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 |
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 5
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 6
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 7
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 }
Example 8
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 9
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 10
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 11
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 12
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 13
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 14
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 15
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 16
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 17
Source File: Assets.java From ud406 with MIT License | 5 votes |
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 18
Source File: GameManager.java From Bomberman_libGdx with MIT License | 4 votes |
private GameManager() { // load resources assetManager = new AssetManager(); // load actors assetManager.load("img/actors.pack", TextureAtlas.class); // load sounds assetManager.load("sounds/Pickup.ogg", Sound.class); assetManager.load("sounds/PlaceBomb.ogg", Sound.class); assetManager.load("sounds/KickBomb.ogg", Sound.class); assetManager.load("sounds/Powerup.ogg", Sound.class); assetManager.load("sounds/Explosion.ogg", Sound.class); assetManager.load("sounds/Die.ogg", Sound.class); assetManager.load("sounds/EnemyDie.ogg", Sound.class); assetManager.load("sounds/EnemyDie1.ogg", Sound.class); assetManager.load("sounds/EnemyDie2.ogg", Sound.class); assetManager.load("sounds/Boss1Hammer.ogg", Sound.class); assetManager.load("sounds/PortalAppears.ogg", Sound.class); assetManager.load("sounds/Teleport.ogg", Sound.class); assetManager.load("sounds/Pause.ogg", Sound.class); // load music assetManager.load("music/SuperBomberman-Title.ogg", Music.class); assetManager.load("music/SuperBomberman-Area1.ogg", Music.class); assetManager.load("music/SuperBomberman-Area2.ogg", Music.class); assetManager.load("music/SuperBomberman-Boss.ogg", Music.class); assetManager.load("music/GameOver.ogg", Music.class); assetManager.load("music/Victory.ogg", Music.class); assetManager.load("music/Oops.ogg", Music.class); assetManager.load("music/StageCleared.ogg", Music.class); // load maps assetManager.load("maps/level_1.png", Pixmap.class); assetManager.load("maps/level_2.png", Pixmap.class); assetManager.load("maps/level_3.png", Pixmap.class); assetManager.load("maps/level_4.png", Pixmap.class); assetManager.load("maps/level_5.png", Pixmap.class); assetManager.load("maps/area_1_tiles.pack", TextureAtlas.class); assetManager.load("maps/area_2_tiles.pack", TextureAtlas.class); assetManager.load("maps/area_3_tiles.pack", TextureAtlas.class); assetManager.finishLoading(); playerRespawnPosition = new Vector2(); portalPosition = new Vector2(); remoteBombQueue = new LinkedList<>(); }
Example 19
Source File: Fonts.java From riiablo with Apache License 2.0 | 4 votes |
private FontTBL.BitmapFont load(AssetManager assets, String fontName, int blendMode) { AssetDescriptor<FontTBL.BitmapFont> descriptor = getDescriptor(fontName, blendMode); assets.load(descriptor); assets.finishLoadingAsset(descriptor); return assets.get(descriptor); }
Example 20
Source File: Palettes.java From riiablo with Apache License 2.0 | 4 votes |
private Palette load(AssetManager assets, String fontName) { AssetDescriptor<Palette> descriptor = getDescriptor(fontName); assets.load(descriptor); assets.finishLoadingAsset(descriptor); return assets.get(descriptor); }