From d786f935279ac147ae8d4b1f4f9a93b2d4edee0d Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 21 Jun 2020 16:47:40 +0200 Subject: [PATCH] Changed ressources.js --- engine/ressources.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/ressources.js b/engine/ressources.js index 47c23f8..4aec9a6 100755 --- a/engine/ressources.js +++ b/engine/ressources.js @@ -31,7 +31,7 @@ dragonblocks.textures = {}; dragonblocks.loadTexture = function(path){ new dragonblocks.Texture(path); }; -(_ => { +{ let textures = $.getJSON({ url: "api.php", method: "POST", @@ -39,7 +39,7 @@ dragonblocks.loadTexture = function(path){ }).responseJSON; for(let i in textures) dragonblocks.loadTexture(textures[i]); -})(); +} dragonblocks.getTexture = function(texture){ if(! texture) return "none"; @@ -75,7 +75,7 @@ dragonblocks.getSound = function(sound){ else return sound; }; -(_ => { +{ let sounds = $.getJSON({ url: "api.php", method: "POST", @@ -83,7 +83,7 @@ dragonblocks.getSound = function(sound){ }).responseJSON; for(let i in sounds) dragonblocks.loadSound(sounds[i]); -})(); +} dragonblocks.playSound = function(sound){ new Audio(dragonblocks.getSound(sound)).play(); } -- 2.44.0