private void loadGameGraphics() { BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/game/"); gameTextureAtlas = new BuildableBitmapTextureAtlas( activity.getTextureManager(), 1024, 1024, TextureOptions.REPEATING_NEAREST_PREMULTIPLYALPHA); rockTop_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( gameTextureAtlas, activity, "Red_Rock_Top.png"); rockMid_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( gameTextureAtlas, activity, "Red_Rock_Middle.png"); rockOre_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( gameTextureAtlas, activity, "Ore_Rock.png"); player_region = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset( gameTextureAtlas, activity, "player.png", 1, 1); dpad_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( gameTextureAtlas, activity, "Dpad_Notpressed.png"); try { this.gameTextureAtlas.build( new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource, BitmapTextureAtlas>(0, 0, 0)); this.gameTextureAtlas.load(); } catch (final TextureAtlasBuilderException e) { Debug.e(e); } }
// ------------------------------------------------------------------------------------ // CLASS LOGIC // ------------------------------------------------------------------------------------- public void loadSplashScreen() { BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); splashTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 256, 256, TextureOptions.BILINEAR); splash_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( splashTextureAtlas, activity, "splash.png", 0, 0); splashTextureAtlas.load(); }
private void loadMenuFonts() { FontFactory.setAssetBasePath("font/"); final ITexture mainFontTexture = new BitmapTextureAtlas( activity.getTextureManager(), 256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA); font = FontFactory.createStrokeFromAsset( activity.getFontManager(), mainFontTexture, activity.getAssets(), "font.ttf", 50, true, Color.WHITE, 2, Color.BLACK); font.load(); }
private void loadMenuGraphics() { BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/menu/"); menuTextureAtlas = new BuildableBitmapTextureAtlas( activity.getTextureManager(), 1024, 1024, TextureOptions.BILINEAR); menu_background_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( menuTextureAtlas, activity, "menu_background.png"); play_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( menuTextureAtlas, activity, "play.png"); options_region = BitmapTextureAtlasTextureRegionFactory.createFromAsset( menuTextureAtlas, activity, "options.png"); try { this.menuTextureAtlas.build( new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource, BitmapTextureAtlas>(0, 1, 0)); this.menuTextureAtlas.load(); } catch (final TextureAtlasBuilderException e) { Debug.e(e); } }