Skip to content

Instantly share code, notes, and snippets.

@MobiDevelop
Created July 7, 2013 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MobiDevelop/bf6aad209256f6eb65d2 to your computer and use it in GitHub Desktop.
Save MobiDevelop/bf6aad209256f6eb65d2 to your computer and use it in GitHub Desktop.
package com.example.preloader.gen;
import com.badlogic.gdx.backends.gwt.preloader.DefaultAssetFilter;
public class ExampleAssetFilter extends DefaultAssetFilter {
@Override
public String getBundleName (String file) {
file = file.replace('\\', '/');
if (file.contains("data/levels/")) {
file = file.substring(file.indexOf("data/levels/") + "data/levels/".length());
String bundle = file;
if (file.contains("/")) {
bundle = file.substring(0, file.indexOf("/"));
}
return bundle;
}
return super.getBundleName(file);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment