public void download() {
// download texture
for(Connection conn : getTextureConnections().getConnections()) {
if (conn instanceof ConnectionURL) {
try {
new URLDownload(new URL(getSource(), ((ConnectionURL) conn).getUrl()), this, DownloadType.TEXTURE).startDownload();
break;
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
// download heightfield
for(Connection conn : getHeightfieldConnections().getConnections()) {
if (conn instanceof ConnectionURL) {
try {
new URLDownload(new URL(getSource(), ((ConnectionURL) conn).getUrl()), this, DownloadType.HEIGHTFIELD).startDownload();
break;
} catch (MalformedURLException e) {
e.printStackTrace();
}
}