add game config

This commit is contained in:
Bui
2018-10-27 22:42:28 +01:00
parent 5fcdca89e5
commit 2598a5014d
9 changed files with 34 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ class loadSong{
resolve()
})
img.id = "music-bg"
img.src = "/songs/" + id + "/bg.png"
img.src = gameConfig.songs_baseurl + id + "/bg.png"
document.getElementById("assets").appendChild(img)
}))
@@ -34,7 +34,7 @@ class loadSong{
songObj.sound.gain = snd.musicGain
resolve()
}else{
snd.musicGain.load("/songs/" + id + "/main.mp3").then(sound => {
snd.musicGain.load(gameConfig.songs_baseurl + id + "/main.mp3").then(sound => {
songObj.sound = sound
resolve()
}, reject)
@@ -51,7 +51,7 @@ class loadSong{
})
}
getSongPath(selectedSong){
var directory = "/songs/" + selectedSong.folder + "/"
var directory = gameConfig.songs_baseurl + selectedSong.folder + "/"
if(selectedSong.type === "tja"){
return directory + "main.tja"
}else{