本文整理汇总了Java中org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory.createFromAsset方法的典型用法代码示例。如果您正苦于以下问题:Java BitmapTextureAtlasTextureRegionFactory.createFromAsset方法的具体用法?Java BitmapTextureAtlasTextureRegionFactory.createFromAsset怎么用?Java BitmapTextureAtlasTextureRegionFactory.createFromAsset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory
的用法示例。
在下文中一共展示了BitmapTextureAtlasTextureRegionFactory.createFromAsset方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadMenuGraphics
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
private void loadMenuGraphics() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.bitmapTextureAtlas_background = new BitmapTextureAtlas(activity.getTextureManager(), Constants.width, Constants.height, TextureOptions.NEAREST_PREMULTIPLYALPHA);
this.backgroundTiledTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_background, activity, "bg-tre.png", 0, 0);
this.bitmapTextureAtlas_background.load();
this.bitmapTextureAtlas_logo = new BitmapTextureAtlas(activity.getTextureManager(), logo_width, logo_height , TextureOptions.BILINEAR);
this.textureRegion_logo = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_logo, activity, "logo.png", 0, 0);
this.bitmapTextureAtlas_logo.load();
this.bitmapTextureAtlas_startButton = new BitmapTextureAtlas(activity.getTextureManager(), start_button_width, start_button_height, TextureOptions.BILINEAR);
this.textureRegion_startButton = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_startButton, activity, "start.png", 0, 0);
this.bitmapTextureAtlas_startButton.load();
this.bitmapTextureAtlas_shareButton = new BitmapTextureAtlas(activity.getTextureManager(), share_button_width, share_button_height, TextureOptions.BILINEAR);
this.textureRegion_shareButton = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_shareButton, activity, "share.png", 0, 0);
this.bitmapTextureAtlas_shareButton.load();
this.bitmapTextureAtlas_settingsButton = new BitmapTextureAtlas(activity.getTextureManager(), settings_button_width, settings_button_height, TextureOptions.BILINEAR);
this.textureRegion_settingsButton = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_settingsButton, activity, "setting.png", 0, 0);
this.bitmapTextureAtlas_settingsButton.load();
}
示例2: loadGameGraphics
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
private void loadGameGraphics() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.bitmapTextureAtlas_panda = new BitmapTextureAtlas(activity.getTextureManager(), panda_width, panda_height, TextureOptions.BILINEAR);
this.tiledTextureRegion_panda = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(this.bitmapTextureAtlas_panda, activity, "panda.png", 0, 0, 1, 8);
this.bitmapTextureAtlas_panda.load();
this.bitmapTextureAtlas_pipe1 = new BitmapTextureAtlas(activity.getTextureManager(), pipe_width, pipe_height,TextureOptions.BILINEAR);
this.textureRegion_pipe1 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_pipe1, activity, "column.png", 0, 0);
this.bitmapTextureAtlas_pipe1.load();
this.bitmapTextureAtlas_pipe2 = new BitmapTextureAtlas(activity.getTextureManager(), pipe_width, pipe_height, TextureOptions.BILINEAR);
this.textureRegion_pipe2 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_pipe2, activity, "column1.png", 0, 0);
this.bitmapTextureAtlas_pipe2.load();
this.bitmapTextureAtlas_game_over = new BitmapTextureAtlas(activity.getTextureManager(), game_over_width, game_over_height , TextureOptions.BILINEAR);
this.textureRegion_game_over = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_game_over, activity, "gameover.png", 0, 0);
this.bitmapTextureAtlas_game_over.load();
this.bitmapTextureAtlas_scrore_board = new BitmapTextureAtlas(activity.getTextureManager(), score_board_width, score_board_height, TextureOptions.BILINEAR);
this.textureRegion_score_board = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_scrore_board, activity, "score.png", 0, 0);
this.bitmapTextureAtlas_scrore_board.load();
}
示例3: onCreateResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public static void onCreateResources(SimpleBaseGameActivity activity){
// upper pipe
BitmapTextureAtlas upperPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 60, TextureOptions.BILINEAR);
mUpperPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeTextureAtlas, activity, "pipeupper.png", 0, 0);
upperPipeTextureAtlas.load();
// upper pipe section
BitmapTextureAtlas upperPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
mUpperPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeSectionTextureAtlas, activity, "pipesectionupper.png", 0, 0);
upperPipeSectionTextureAtlas.load();
// lower pipe
BitmapTextureAtlas lowerPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 60, TextureOptions.BILINEAR);
mLowerPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeTextureAtlas, activity, "pipelower.png", 0, 0);
lowerPipeTextureAtlas.load();
// lower pipe section
BitmapTextureAtlas lowerPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
mLowerPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas, activity, "pipesectionlower.png", 0, 0);
lowerPipeSectionTextureAtlas.load();
}
示例4: getTextureRegion
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
private ITextureRegion getTextureRegion(String fileName, BitmapTextureAtlas bta) throws IOException {
InputStream in = null;
try {
in = gameActivity.getResources().getAssets().open("gfx/" + fileName);
return BitmapTextureAtlasTextureRegionFactory.createFromAsset(
bta, gameActivity, fileName, 0, 0);
} catch (IOException e) {
IBitmapTextureAtlasSource ats = FileBitmapTextureAtlasSource.createFromInternalStorage(
gameActivity, "/gfx/" + fileName, 0, 0);
return BitmapTextureAtlasTextureRegionFactory.createFromSource(bta, ats, 0, 0);
} finally {
if (in != null) {
in.close();
}
}
}
示例5: loadHowToPlayResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public synchronized void loadHowToPlayResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
if (howToPlayArrow == null) {
BitmapTextureAtlas howToPlayArrowT = new BitmapTextureAtlas(this.textureManager, 149, 203,
mTransparentTextureOption);
howToPlayArrow = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
howToPlayArrowT, this.activity, "how_to_play_arrow.png", 0, 0);
howToPlayArrowT.load();
}
if (howToPlayButton == null) {
BitmapTextureAtlas howToPlayButtonT = new BitmapTextureAtlas(this.textureManager, 182, 254,
mTransparentTextureOption);
howToPlayButton = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
howToPlayButtonT, this.activity, "how_to_play_button.png", 0, 0);
howToPlayButtonT.load();
}
if (howToPlayDigitalPad == null) {
BitmapTextureAtlas howToPlayDigitalPadT = new BitmapTextureAtlas(this.textureManager, 471, 334,
mTransparentTextureOption);
howToPlayDigitalPad = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
howToPlayDigitalPadT, this.activity, "how_to_play_digital_pad.png", 0, 0);
howToPlayDigitalPadT.load();
}
}
示例6: loadRecordsResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public synchronized void loadRecordsResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/results/");
BitmapTextureAtlas recordHeadsT = new BitmapTextureAtlas(this.textureManager, 100, 100,
mTransparentTextureOption);
BitmapTextureAtlasTextureRegionFactory.createFromAsset(
recordHeadsT, this.activity, "results_records_winner_faces.png", 0, 0);
recordHeadsT.load();
menuRecordsRyokoHead = TextureRegionFactory.
extractFromTexture(recordHeadsT, 0, 0, 50, 50, false);
menuRecordsRyokoHeadGold = TextureRegionFactory.
extractFromTexture(recordHeadsT, 0, 50, 50, 50, false);
menuRecordsShoHead = TextureRegionFactory.
extractFromTexture(recordHeadsT, 50, 0, 50, 50, false);
menuRecordsShoHeadGold = TextureRegionFactory.
extractFromTexture(recordHeadsT, 50, 50, 50, 50, false);
}
示例7: loadMenuGraphics
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
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);
}
}
示例8: loadGameGraphics
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
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);
}
}
示例9: onCreateResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public static void onCreateResources(SimpleBaseGameActivity activity){
// upper pipe
BitmapTextureAtlas upperPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 80, TextureOptions.DEFAULT);
mUpperPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeTextureAtlas, activity, "pipetop.png", 0, 0);
upperPipeTextureAtlas.load();
// upper pipe section
BitmapTextureAtlas upperPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 80, TextureOptions.DEFAULT);
mUpperPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeSectionTextureAtlas, activity, "pipesection.png", 0, 0);
upperPipeSectionTextureAtlas.load();
// lower pipe
BitmapTextureAtlas lowerPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 80, TextureOptions.DEFAULT);
mLowerPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeTextureAtlas, activity, "pipetop.png", 0, 0);
lowerPipeTextureAtlas.load();
// lower pipe section
//BitmapTextureAtlas lowerPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 120, TextureOptions.BILINEAR);
BitmapTextureAtlas lowerPipeSectionTextureAtlas =new BitmapTextureAtlas(activity.getTextureManager(), 120, 80, TextureOptions.DEFAULT);
mLowerPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas, activity, "pipesection.png", 0, 0);
lowerPipeSectionTextureAtlas.load();
BitmapTextureAtlas coinTextureAtlas =new BitmapTextureAtlas(activity.getTextureManager(), 30, 30, TextureOptions.DEFAULT);
coinTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(coinTextureAtlas, activity, "coin.png", 0, 0);
coinTextureAtlas.load();
// BitmapTextureAtlas lowerPipeSectionTextureAtlas2 = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
// mLowerPipeSectionTexture2 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas2, activity, "pipesectionlower.png", 0, 0);
// lowerPipeSectionTextureAtlas2.load();
}
示例10: loadGame
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public void loadGame() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
final BitmapTextureAtlas backgroundTextureAtlas = new BitmapTextureAtlas(mContext.getTextureManager(), 712, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
mBackgroundRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(backgroundTextureAtlas, mContext.getAssets(), "racetrack.png", 0, 0);
backgroundTextureAtlas.load();
final BitmapTextureAtlas raceCarTextureAtlas = new BitmapTextureAtlas(mContext.getTextureManager(), 128, 128, TextureOptions.BILINEAR);
mRaceCarRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(raceCarTextureAtlas, mContext.getAssets(), "race_car.png", 0, 0);
raceCarTextureAtlas.load();
final BitmapTextureAtlas opponentsTextureAtlas = new BitmapTextureAtlas(mContext.getTextureManager(), 256, 256, TextureOptions.BILINEAR);
mOpponentsRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(opponentsTextureAtlas, mContext.getAssets(), "race_car.png", 0, 0);
mExplosionRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(opponentsTextureAtlas, mContext.getAssets(), "explosion.png", 128, 128);
opponentsTextureAtlas.load();
final BitmapTextureAtlas pauseTextureAtlas = new BitmapTextureAtlas(mContext.getTextureManager(), 128, 128, TextureOptions.BILINEAR);
pauseTextureAtlas.load();
loadGameFonts();
loadMenuFonts();
try {
loadMusic();
} catch (IOException e) {
Log.e("MUSIC_EXCEPTION", e.getMessage());
}
}
示例11: loadSettingsGraphics
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
private void loadSettingsGraphics() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.bitmapTextureAtlas_oke = new BitmapTextureAtlas(activity.getTextureManager(), oke_width, oke_height, TextureOptions.BILINEAR);
this.textureRegion_oke = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_oke, activity, "oke.png", 0, 0);
this.bitmapTextureAtlas_oke.load();
this.bitmapTextureAtlas_checkButton = new BitmapTextureAtlas(activity.getTextureManager(), check_button_width, check_button_height, TextureOptions.BILINEAR);
this.textureRegion_checkButton = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(this.bitmapTextureAtlas_checkButton, activity, "check.png", 0, 0, 2, 1);
this.bitmapTextureAtlas_checkButton.load();
this.bitmapTextureAtlas_panel = new BitmapTextureAtlas(activity.getTextureManager(), panel_width, panel_height, TextureOptions.BILINEAR);
this.textureRegion_panel = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bitmapTextureAtlas_panel, activity, "panel.png", 0, 0);
this.bitmapTextureAtlas_panel.load();
}
示例12: AssetsManager
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
public AssetsManager(Context pContext, Engine pEngine) {
this.mVertexBufferObjectManager = pEngine.getVertexBufferObjectManager();
this.mGameAtlas = new BitmapTextureAtlas(pEngine.getTextureManager(), 2048, 2048, TextureOptions.NEAREST_PREMULTIPLYALPHA);
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.mBackgroundTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(mGameAtlas, pContext, "background.png", 0, 0);
this.mGroundTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(mGameAtlas, pContext, "ground.png", 0, 513);
this.mPipesTiledTextureRegion = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mGameAtlas, pContext, "pipes.png", 291, 0, 2, 1);
this.mFlappyTiledTextureRegion = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mGameAtlas,pContext,"flappy.png",401,0, 1, 3);
}
示例13: loadMainMenuResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
/**
* Loads the main menu resources.
*/
public synchronized void loadMainMenuResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/menus/");
// Main Menu Ninja Trials Logo:
if(mainTitle==null) {
BitmapTextureAtlas mainTitleT = new BitmapTextureAtlas(
this.textureManager, 756, 495, mTransparentTextureOption);
mainTitle = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
mainTitleT, this.activity, "menu_main_title.png", 0, 0);
mainTitleT.load();
}
// Main Menu Pattern:
if (mainTitlePattern1 == null) {
BuildableBitmapTextureAtlas mainTitlePattern1T = new BuildableBitmapTextureAtlas(
this.textureManager, 400, 300, TextureOptions.REPEATING_BILINEAR);
mainTitlePattern1 = BitmapTextureAtlasTextureRegionFactory
.createFromAsset(mainTitlePattern1T, this.activity, "menu_main_pattern_1.png");
try {
mainTitlePattern1T.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource,
BitmapTextureAtlas>(0, 0, 0));
mainTitlePattern1T.load();
} catch (TextureAtlasBuilderException e) {
Debug.e(e);
}
}
}
示例14: loadOptionResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
/**
* Loads the main option menu resources.
*/
public synchronized void loadOptionResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/menus/");
// Sound bars:
BitmapTextureAtlas mainOptionsSoundBarsT = new BitmapTextureAtlas(this.textureManager, 575, 220,
mTransparentTextureOption);
BitmapTextureAtlasTextureRegionFactory.createFromAsset(mainOptionsSoundBarsT, this.activity,
"menu_options_volume.png", 0, 0);
mainOptionsSoundBarsT.load();
mainOptionsSoundBarsActive = TextureRegionFactory.
extractFromTexture(mainOptionsSoundBarsT, 0, 0, 575, 110, false);
mainOptionsSoundBarsInactive = TextureRegionFactory.
extractFromTexture(mainOptionsSoundBarsT, 0, 111, 575, 109, false);
// Option Menu Pattern:
if (mainOptionsPattern == null) {
BuildableBitmapTextureAtlas mainOptionsPatternT = new BuildableBitmapTextureAtlas(
this.textureManager, 390, 361, TextureOptions.REPEATING_BILINEAR);
mainOptionsPattern = BitmapTextureAtlasTextureRegionFactory
.createFromAsset(mainOptionsPatternT, this.activity, "menu_main_pattern_2.png");
try {
mainOptionsPatternT.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource,
BitmapTextureAtlas>(0, 0, 0));
mainOptionsPatternT.load();
} catch (TextureAtlasBuilderException e) {
Debug.e(e);
}
}
}
示例15: loadControllerOptionResources
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory; //导入方法依赖的package包/类
/**
* Loads the main option menu resources.
* public static ITextureRegion controllerOuya;
public static ITextureRegion controllerMarks;
*/
public synchronized void loadControllerOptionResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/menus/");
// Controller ouya:
if(controllerOuya==null) {
BitmapTextureAtlas controllerOuyaT = new BitmapTextureAtlas(this.textureManager, 1164, 791,
mTransparentTextureOption);
controllerOuya = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
controllerOuyaT, this.activity, "menu_options_controller_ouya.png", 0, 0);
controllerOuyaT.load();
}
// Controller marks:
if(controllerMarks==null) {
BitmapTextureAtlas controllerMarksT = new BitmapTextureAtlas(this.textureManager, 1195, 717,
mTransparentTextureOption);
controllerMarks = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
controllerMarksT, this.activity, "menu_options_controller_marks.png", 0, 0);
controllerMarksT.load();
}
// Controller Option Pattern:
if (controllerOptionsPattern == null) {
BuildableBitmapTextureAtlas controllerOptionsPatternT = new BuildableBitmapTextureAtlas(
this.textureManager, 319, 319, TextureOptions.REPEATING_BILINEAR);
controllerOptionsPattern = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
controllerOptionsPatternT, this.activity, "menu_main_pattern_3.png");
try {
controllerOptionsPatternT.build(
new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource,
BitmapTextureAtlas>(0, 0, 0));
controllerOptionsPatternT.load();
} catch (TextureAtlasBuilderException e) {
Debug.e(e);
}
}
}