本文整理汇总了Java中com.badlogic.gdx.assets.AssetManager.finishLoadingAsset方法的典型用法代码示例。如果您正苦于以下问题:Java AssetManager.finishLoadingAsset方法的具体用法?Java AssetManager.finishLoadingAsset怎么用?Java AssetManager.finishLoadingAsset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.assets.AssetManager
的用法示例。
在下文中一共展示了AssetManager.finishLoadingAsset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInit
import com.badlogic.gdx.assets.AssetManager; //导入方法依赖的package包/类
@Override
protected void onInit(ScreenBasedGame game, AssetManager assetManager) {
// load assets
assetManager.load(MUSIC_PATH, Music.class);
assetManager.load(BACKGROUND_IMAGE_PATH, Texture.class);
assetManager.finishLoadingAsset(MUSIC_PATH);
assetManager.finishLoadingAsset(BACKGROUND_IMAGE_PATH);
// get assets
this.music = assetManager.get(MUSIC_PATH, Music.class);
this.bgTexture = assetManager.get(BACKGROUND_IMAGE_PATH, Texture.class);
// generate fonts
this.titleFont = BitmapFontFactory.createFont("./data/font/spartakus/SparTakus.ttf", 48, Color.WHITE,
Color.BLUE, 3);
// this.font2 =
// BitmapFontFactory.createFont("./data/font/spartakus/SparTakus.ttf",
// 48, Color.RED, Color.WHITE, 3);
this.font1 = BitmapFontFactory.createFont("./data/font/arial/arial.ttf", 18, Color.WHITE);
this.font2 = BitmapFontFactory.createFont("./data/font/arial/arial-bold.ttf", 24, Color.WHITE, Color.RED, 3);
// generate credits text array
try {
this.generateCreditLines();
} catch (IOException e) {
e.printStackTrace();
// TODO: remove this line and handle exception with exception window
System.exit(0);
}
Gdx.input.setInputProcessor(null);
}
示例2: onInit
import com.badlogic.gdx.assets.AssetManager; //导入方法依赖的package包/类
@Override
protected void onInit(ScreenBasedGame game, AssetManager assetManager) {
// generate fonts
this.font1 = BitmapFontFactory.createFont("./data/font/spartakus/SparTakus.ttf", 48, Color.WHITE, Color.BLUE,
3);
this.font2 = BitmapFontFactory.createFont("./data/font/spartakus/SparTakus.ttf", 48, Color.RED, Color.WHITE, 3);
// load & get assets
assetManager.load(TORPEDO_IMAGE_PATH, Texture.class);
assetManager.finishLoadingAsset(TORPEDO_IMAGE_PATH);
this.torpedoTexture = assetManager.get(TORPEDO_IMAGE_PATH, Texture.class);
// create new Head-Up-Display
this.hud = new HUD();
this.filledBar = new FilledBar(this.font1);
this.filledBar.setPosition(game.getViewportWidth() - 400, game.getViewportHeight() - 85);
this.filledBar.setDimension(155, 35);
this.hud.addWidget(this.filledBar);
this.shapeRenderer = new ShapeRenderer();
}
示例3: onInit
import com.badlogic.gdx.assets.AssetManager; //导入方法依赖的package包/类
@Override
protected void onInit(ScreenBasedGame game, AssetManager assetManager) {
assetManager.load(BAR_ORANGE_IMAGE_PATH, Texture.class);
assetManager.load(BAR_BLUE_IMAGE_PATH, Texture.class);
assetManager.load(SPACE_IMAGE_PATH, Texture.class);
assetManager.finishLoadingAsset(BAR_ORANGE_IMAGE_PATH);
assetManager.finishLoadingAsset(BAR_BLUE_IMAGE_PATH);
assetManager.finishLoadingAsset(SPACE_IMAGE_PATH);
this.orangeBarTexture = assetManager.get(BAR_ORANGE_IMAGE_PATH, Texture.class);
this.blueBarTexture = assetManager.get(BAR_BLUE_IMAGE_PATH, Texture.class);
this.bgTexture = assetManager.get(SPACE_IMAGE_PATH, Texture.class);
}
示例4: onInit
import com.badlogic.gdx.assets.AssetManager; //导入方法依赖的package包/类
@Override
protected void onInit(ScreenBasedGame game, AssetManager assetManager) {
assetManager.load(LOGO_IMAGE_PATH, Texture.class);
assetManager.load(SPACE_IMAGE_PATH, Texture.class);
assetManager.finishLoadingAsset(LOGO_IMAGE_PATH);
assetManager.finishLoadingAsset(SPACE_IMAGE_PATH);
this.logoTexture = assetManager.get(LOGO_IMAGE_PATH, Texture.class);
this.bgTexture = assetManager.get(SPACE_IMAGE_PATH, Texture.class);
}