mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-05-28 23:41:31 +00:00
fixed bugs in World refactoring, in main.js
This commit is contained in:
parent
ba784981cd
commit
4993d9a450
|
@ -146,7 +146,7 @@
|
|||
|
||||
function loop(worlds, interval, callback) {
|
||||
(function continueLoop(tick) {
|
||||
if (worlds.isEmpty()) {
|
||||
if (worlds.finished()) {
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
|
@ -179,7 +179,7 @@
|
|||
});
|
||||
loop(worlds, frameDuration, function() {
|
||||
debugAnimationCounter++;
|
||||
canvas.drawWorld(worlds.getCurrentWorld());
|
||||
canvas.drawWorld(worlds.getPreviousWorld(), worlds.getCurrentWorld());
|
||||
});
|
||||
loop(worlds, 1000, function() {
|
||||
debugSecondsCounter++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user