Funktionierender Punktestand durch Äpfel und Blaubeeren
This commit is contained in:
@@ -14,6 +14,7 @@ class Loop{
|
||||
this.game.playGround.resetOverlay();
|
||||
const tiles = data.playground.tiles;
|
||||
|
||||
// Spielfeld Zeichenen
|
||||
tiles.forEach((row, x) => {
|
||||
row.forEach((tile, y) => {
|
||||
if(!tile) return;
|
||||
@@ -23,11 +24,21 @@ class Loop{
|
||||
tile.deg
|
||||
)
|
||||
|
||||
this.game.playGround.setOverlay(x, y, overlay);
|
||||
}
|
||||
else if(tile.class === "Fruit"){
|
||||
const overlay = new Overlay(
|
||||
`./assets/Früchte/${tile.type}.png`
|
||||
)
|
||||
|
||||
this.game.playGround.setOverlay(x, y, overlay);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// Score Anzeigen
|
||||
this.game.uiManager.score.innerText = `${data.score}`;
|
||||
|
||||
this.game.playGround.draw();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user