本文整理汇总了Java中org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException类的典型用法代码示例。如果您正苦于以下问题:Java TextureAtlasBuilderException类的具体用法?Java TextureAtlasBuilderException怎么用?Java TextureAtlasBuilderException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextureAtlasBuilderException类属于org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder包,在下文中一共展示了TextureAtlasBuilderException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadMenuGraphics
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的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);
}
}
示例2: loadGameGraphics
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的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);
}
}
示例3: build
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
@Override
public IBuildableTextureAtlas<S, T> build(final ITextureAtlasBuilder<S, T> pTextureAtlasBuilder) throws TextureAtlasBuilderException {
pTextureAtlasBuilder.build(this.mTextureAtlas, this.mTextureAtlasSourcesToPlace);
this.mTextureAtlasSourcesToPlace.clear();
this.mTextureAtlas.setUpdateOnHardwareNeeded(true);
return this;
}
示例4: loadMainMenuResources
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的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);
}
}
}
示例5: loadOptionResources
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的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);
}
}
}
示例6: loadControllerOptionResources
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的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);
}
}
}
示例7: loadEndingResources
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
public synchronized void loadEndingResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/endings/");
if (endingCreditsBackground == null) {
BitmapTextureAtlas endingCreditsBackgroundT = new BitmapTextureAtlas(this.textureManager,
1920, 1080, mTransparentTextureOption);
endingCreditsBackground = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingCreditsBackgroundT, this.activity, "ending_credits_background.png", 0, 0);
endingCreditsBackgroundT.load();
}
if (endingCreditsCategories == null) {
BuildableBitmapTextureAtlas endingCredCategBit = new BuildableBitmapTextureAtlas(
this.textureManager, 1200, 1020, mTransparentTextureOption);
endingCreditsCategories = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
endingCredCategBit, this.context, "ending_credits_categories.png", 3, 3);
try {
endingCredCategBit.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource,
BitmapTextureAtlas>(0, 0, 0));
}
catch (TextureAtlasBuilderException e) {
e.printStackTrace();
}
endingCredCategBit.load();
}
if (endingCreditsLogoAndengine == null) {
BitmapTextureAtlas endingCreditsLogoAndengineT = new BitmapTextureAtlas(this.textureManager, 389, 389,
mTransparentTextureOption);
endingCreditsLogoAndengine = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingCreditsLogoAndengineT, this.activity, "ending_credits_logo_andengine.png", 0, 0);
endingCreditsLogoAndengineT.load();
}
if (endingCreditsLogoEstudioevergreen == null) {
BitmapTextureAtlas endingCreditsLogoEstudioevergreenT = new BitmapTextureAtlas(this.textureManager, 389, 389,
mTransparentTextureOption);
endingCreditsLogoEstudioevergreen = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingCreditsLogoEstudioevergreenT, this.activity, "ending_credits_logo_estudioevergreen.png", 0, 0);
endingCreditsLogoEstudioevergreenT.load();
}
if (endingRyokoEasyBg == null) {
BitmapTextureAtlas endingRyokoEasyBgT = new BitmapTextureAtlas(this.textureManager, 1920, 1080,
mTransparentTextureOption);
endingRyokoEasyBg = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingRyokoEasyBgT, this.activity, "ending_ryoko_easy_bg.png", 0, 0);
endingRyokoEasyBgT.load();
}
if (endingRyokoEasy == null) {
BitmapTextureAtlas endingRyokoEasyT = new BitmapTextureAtlas(this.textureManager, 633, 989,
mTransparentTextureOption);
endingRyokoEasy = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingRyokoEasyT, this.activity, "ending_ryoko_easy.png", 0, 0);
endingRyokoEasyT.load();
}
if (endingShoEasyBg == null) {
BitmapTextureAtlas endingShoEasyBgT = new BitmapTextureAtlas(this.textureManager, 1920, 1080,
mTransparentTextureOption);
endingShoEasyBg = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingShoEasyBgT, this.activity, "ending_sho_easy_bg.png", 0, 0);
endingShoEasyBgT.load();
}
if (endingShoEasy == null) {
BitmapTextureAtlas endingShoEasyT = new BitmapTextureAtlas(this.textureManager, 813, 1049,
mTransparentTextureOption);
endingShoEasy = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
endingShoEasyT, this.activity, "ending_sho_easy.png", 0, 0);
endingShoEasyT.load();
}
}
示例8: build
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
/**
* May draw over already added {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource}.
*
* @param pTextureAtlasBuilder the {@link org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder} to use for building the {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource} in this {@link IBuildableTextureAtlas}.
* @return itself for method chaining.
* @throws org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException i.e. when the {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource} didn't fit into this {@link IBuildableTextureAtlas}.
*/
public IBuildableTextureAtlas<S, T> build(final ITextureAtlasBuilder<S, T> pTextureAtlasBuilder) throws TextureAtlasBuilderException;
示例9: build
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
/**
* May draw over already added {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource}.
*
* @param pTextureAtlasBuilder the {@link org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder} to use for building the {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource} in this {@link org.andengine.opengl.texture.atlas.buildable.IBuildableTextureAtlas}.
* @return itself for method chaining.
* @throws org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException i.e. when the {@link org.andengine.opengl.texture.atlas.source.ITextureAtlasSource} didn't fit into this {@link org.andengine.opengl.texture.atlas.buildable.IBuildableTextureAtlas}.
*/
public IBuildableTextureAtlas<S, T> build(final ITextureAtlasBuilder<S, T> pTextureAtlasBuilder) throws TextureAtlasBuilderException;
示例10: build
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
/**
* May draw over already added {@link ITextureAtlasSource}.
*
* @param pTextureAtlasBuilder the {@link ITextureAtlasBuilder} to use for building the {@link ITextureAtlasSource} in this {@link BuildableBitmapTextureAtlas}.
* @return itself for method chaining.
* @throws TextureAtlasBuilderException i.e. when the {@link ITextureAtlasSource} didn't fit into this {@link BuildableBitmapTextureAtlas}.
*/
public IBuildableTextureAtlas<S, T> build(final ITextureAtlasBuilder<S, T> pTextureAtlasBuilder) throws TextureAtlasBuilderException;
示例11: build
import org.andengine.opengl.texture.atlas.buildable.builder.ITextureAtlasBuilder.TextureAtlasBuilderException; //导入依赖的package包/类
/**
* May draw over already added {@link ITextureAtlasSource}.
*
* @param pTextureAtlasBuilder the {@link ITextureAtlasBuilder} to use for building the {@link ITextureAtlasSource} in this {@link IBuildableTextureAtlas}.
* @return itself for method chaining.
* @throws TextureAtlasBuilderException i.e. when the {@link ITextureAtlasSource} didn't fit into this {@link IBuildableTextureAtlas}.
*/
public IBuildableTextureAtlas<S, T> build(final ITextureAtlasBuilder<S, T> pTextureAtlasBuilder) throws TextureAtlasBuilderException;