use of playn.core.AutoClientBundleWithLookup in project playn by threerings.
the class HtmlAssets method getSound.
@Override
public Sound getSound(String path) {
String url = pathPrefix + path;
AutoClientBundleWithLookup clientBundle = getBundle(path);
if (clientBundle != null) {
String key = getKey(path);
DataResource resource = (DataResource) getResource(key, clientBundle);
if (resource != null) {
url = resource.getSafeUri().asString();
}
} else {
url += ".mp3";
}
return adaptSound(url);
}
use of playn.core.AutoClientBundleWithLookup in project playn by threerings.
the class HtmlAssets method getImage.
protected HtmlImage getImage(String path, Scale scale) {
String url = pathPrefix + path;
AutoClientBundleWithLookup clientBundle = getBundle(path);
if (clientBundle != null) {
String key = getKey(path);
ImageResource resource = (ImageResource) getResource(key, clientBundle);
if (resource != null) {
url = resource.getSafeUri().asString();
}
}
return adaptImage(url, scale);
}
Aggregations