From 916bb96e4f663fc1565f197d24b23cd5c1aece2f Mon Sep 17 00:00:00 2001 From: "NB-PBG2H23ABR\\bib" Date: Thu, 27 Jun 2024 09:36:34 +0200 Subject: [PATCH] uzfd7t --- js/allg.js | 7 +++++++ js/funktionen.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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";