Skip to content

Commit

Permalink
maps preloader
Browse files Browse the repository at this point in the history
  • Loading branch information
ominousg committed Jan 11, 2023
1 parent 8ff70b7 commit 3724dda
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/js/assets/preloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Created by horacio on 3/22/16.
*/

define(['lib/pixi', 'json!../../preload_config/preload_sounds.json','json!../../preload_config/preload_graficos.json'],
function (PIXI, PreloadSounds, PreloadGraficos) {
define(['lib/pixi', 'json!../../preload_config/preload_sounds.json','json!../../preload_config/preload_graficos.json', 'json!../../preload_config/preload_mapas.json'],
function (PIXI, PreloadSounds, PreloadGraficos, PreloadMapas) {

class Preloader {
constructor(assetManager) {
Expand Down Expand Up @@ -38,6 +38,10 @@ define(['lib/pixi', 'json!../../preload_config/preload_sounds.json','json!../../

loader.add("indices", "indices/graficos.json");

for (let mapas of PreloadMapas) {
loader.add(mapas, "mapas/mapa" + mapas + ".json");
}

for (let grafico of PreloadGraficos) {
loader.add(grafico, "graficos/" + grafico + ".png");
}
Expand Down
11 changes: 11 additions & 0 deletions client/preload_config/preload_mapas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
"1",
"34",
"59",
"60",
"62",
"168",
"196",
"272",
"286"
]

0 comments on commit 3724dda

Please sign in to comment.