Created
December 1, 2012 23:58
-
-
Save 4poc/4186006 to your computer and use it in GitHub Desktop.
LOLActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final AssetBitmapTextureAtlasSource sourceAtlas = AssetBitmapTextureAtlasSource.create(getAssets(), path); | |
int width = sourceAtlas.getTextureWidth(); | |
int height = sourceAtlas.getTextureHeight(); | |
BitmapTextureAtlas atlas = new BitmapTextureAtlas(getTextureManager(), width, height); | |
TiledTextureRegion texture = BitmapTextureAtlasTextureRegionFactory.createTiledFromSource( | |
atlas, | |
new ColorKeyBitmapTextureAtlasSourceDecorator(sourceAtlas, RectangleBitmapTextureAtlasSourceDecoratorShape | |
.getDefaultInstance(), android.graphics.Color.rgb(255, 0, 255)), 0, 0, width / tileWidth, height / tileHeight); | |
atlas.load(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment