Fix: moveRivers() -> moveLogs() Aufruf
This commit is contained in:
18
index.html
18
index.html
@@ -284,6 +284,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Bäume bewegen
|
||||
function moveLogs() {
|
||||
logs.forEach(log => {
|
||||
log.x += log.speed * log.direction;
|
||||
if (log.x < -200) log.x = canvas.width;
|
||||
if (log.x > canvas.width) log.x = -200;
|
||||
});
|
||||
}
|
||||
|
||||
// Aligatoren bewegen
|
||||
function moveAlligators() {
|
||||
alligators.forEach(alligator => {
|
||||
@@ -295,15 +304,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Bäume bewegen
|
||||
function moveLogs() {
|
||||
logs.forEach(log => {
|
||||
log.x += log.speed * log.direction;
|
||||
if (log.x < -200) log.x = canvas.width;
|
||||
if (log.x > canvas.width) log.x = -200;
|
||||
});
|
||||
}
|
||||
|
||||
// Kollisionserkennung
|
||||
function checkCollisions() {
|
||||
// Aligatoren
|
||||
|
||||
Reference in New Issue
Block a user