]> git.lizzy.rs Git - dragonblocks.git/commitdiff
Changed ressources.js 3.0
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 21 Jun 2020 14:47:40 +0000 (16:47 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 21 Jun 2020 14:47:40 +0000 (16:47 +0200)
engine/ressources.js

index 47c23f88c0ecffdab740e5bd9f59216ff51887eb..4aec9a652857a7b8b92181c0aed1e8fc09f5abcd 100755 (executable)
@@ -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();
 }