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

The following examples show how to use com.badlogic.gdx.assets.AssetManager#get() . 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: SimpleRoom.java    From gdx-vr with Apache License 2.0 6 votes vote down vote up
@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 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);
    enemyAssets = new EnemyAssets(atlas);

    // TODO: Initialize bulletAssets, explosionAssets, and powerupAssets
    bulletAssets = new BulletAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
}
 
Example 3
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 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);
}
 
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);
}
 
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);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(atlas);
    exitPortalAssets = new ExitPortalAssets(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);
    enemyAssets = new EnemyAssets(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);
}
 
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);
}
 
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);
    exitPortalAssets = new ExitPortalAssets(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);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(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);
    platformAssets = new PlatformAssets(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);
    enemyAssets = new EnemyAssets(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);
}
 
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);
    platformAssets = new PlatformAssets(atlas);
    bulletAssets = new BulletAssets(atlas);
    enemyAssets = new EnemyAssets(atlas);
    explosionAssets = new ExplosionAssets(atlas);
    powerupAssets = new PowerupAssets(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);
    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 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);
    platformAssets = new PlatformAssets(atlas);
}
 
Example 20
Source File: Fonts.java    From riiablo with Apache License 2.0 4 votes vote down vote up
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);
}