๐ Hi, Iโm @nicolasgramlich
nicolasgramlich / andenginetexturepackerextension Goto Github PK
View Code? Open in Web Editor NEWAndEngine - TexturePacker Extension
Home Page: http://www.andengine.org
AndEngine - TexturePacker Extension
Home Page: http://www.andengine.org
๐ Hi, Iโm @nicolasgramlich
If you have a TexturePack and want to change its texture the asset filename must not be the same or it won't change the texture.
For example:
I have a texture pack ( myTexturePack ) and I want to change it for different chapters.
myTexturePack = texturepackLoader.loadFromAsset("gfx/chapter1/myGFX.xml", "gfx/chapter1/");
//we load it
myTexturePack.load();
//then we want to change it (*forget unloading stuff)
myTexturePack = texturePackLoader.loadFromAsset("gfx/chapter2/myGFX.xml", "gfx/chapter2/");
myTexturePack.load();
At this point we would aspect to have the graphics from chapter 2 loaded, but this doesn't happen because of the check made in the parser.
final String file = SAXUtils.getAttributeOrThrow(pAttributes, TexturePackParser.TAG_TEXTURE_ATTRIBUTE_FILE);
if(this.mTextureManager.hasMappedTexture(file)) {
return this.mTextureManager.getMappedTexture(file);
}
The string should contain the whole path not just the filename or there should be a reference somewhere saying that the names of the files must be different.
~korn3l
The following code starting at 156 is incorrect, showing the error
_The constructor BitmapTexture(TextureManager, BitmapTexture.BitmapTextureFormat, TextureOptions) is undefined_
return new BitmapTexture(this.mTextureManager, BitmapTextureFormat.fromPixelFormat(pixelFormat), textureOptions) {
@Override
protected InputStream onGetInputStream() throws IOException {
return TexturePackParser.this.onGetInputStream(file);
}
};
It requires an IInputStreamOpener as an argument. The problem I can quickly see is this class needs access to the asset manager, which it currently does not have.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.