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
|
// Aligatoren bewegen
|
||||||
function moveAlligators() {
|
function moveAlligators() {
|
||||||
alligators.forEach(alligator => {
|
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
|
// Kollisionserkennung
|
||||||
function checkCollisions() {
|
function checkCollisions() {
|
||||||
// Aligatoren
|
// Aligatoren
|
||||||
|
|||||||
Reference in New Issue
Block a user