This commit is contained in:
Jan Breitkreuz 2024-06-27 09:36:34 +02:00
parent 093deefef8
commit 916bb96e4f
2 changed files with 8 additions and 1 deletions

View File

@ -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);
});

View File

@ -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";