diff --git a/js/allg.js b/js/allg.js index 83cba46..67d0e78 100644 --- a/js/allg.js +++ b/js/allg.js @@ -2,9 +2,16 @@ let playerAnim = []; let tomAnim = []; let enemyAnim = []; +fillArrays(); + function fillArrays() { fillArray("fuchs_", 8, playerAnim); fillArray("tom_", 3, tomAnim); fillArray("enemy_",3, enemyAnim); } + +playerAnim.forEach(function(player) +{ + console.log(player); +}); diff --git a/js/funktionen.js b/js/funktionen.js index be3d9fd..84c7dee 100644 --- a/js/funktionen.js +++ b/js/funktionen.js @@ -1,5 +1,5 @@ -function fillArray(name, number) +function fillArray(name, number, playerAnim) { for (let i = 1; i++; i <= number) { playerAnim[i] = name + i + ".png";