Commit b2caa5cf authored by Matyáš Latner's avatar Matyáš Latner

#140 Game assets are loaded only for specific difficulty

parent ebc9830a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -23,6 +23,10 @@ final assetsDirName = "assets"
final assetsSourceDirName = "src"
final assetsDestinationDirName = "dest"
final assetsGameDirectory = "game"
final assetsGameGlobalDirectory = "_global"
final assetsGameCommonDifficultyDirectory = "common"
final String ASSETS_DOWNLOAD_URL = "https://www.tablexia.cz/static/assets/"
System.setProperty("javax.net.ssl.trustStore", new File("${project(":android").projectDir.absolutePath}/assets/keystore/tablexiaTrustKeystore").getAbsolutePath());
......@@ -171,10 +175,20 @@ task prepareGraphicAssets(dependsOn: prepareAssets) {
new File("${assetsDir.absolutePath}/${assetsSourceDirName}/").eachDir() { langDir ->
langDir.eachDir() { sectionDir ->
sectionDir.eachDir() { atlasDir ->
TexturePacker.process(settings,
"${atlasDir}",
"${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/",
"${atlasDir.name}")
if (assetsGameDirectory.equals(sectionDir.name) && !assetsGameGlobalDirectory.equals(atlasDir.name)) {
atlasDir.eachDir() { difficultyDir ->
String packFileName = assetsGameCommonDifficultyDirectory.equals(difficultyDir.name) ? atlasDir.name : difficultyDir.name;
TexturePacker.process(settings,
"${difficultyDir}",
"${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/",
"${packFileName}")
}
} else {
TexturePacker.process(settings,
"${atlasDir}",
"${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/",
"${atlasDir.name}")
}
}
}
}
......