falling blocks dont continue falling on refresh
This commit is contained in:
parent
2c3b9cbba0
commit
c2498cdf11
2 changed files with 8 additions and 6 deletions
|
@ -298,11 +298,10 @@ function animLoop() {
|
|||
}
|
||||
else if (gameState === 0) { //start screen
|
||||
requestAnimFrame(animLoop);
|
||||
if (importing) {
|
||||
update();
|
||||
}
|
||||
render();
|
||||
debugger;
|
||||
if (importing) {
|
||||
update();
|
||||
}
|
||||
render();
|
||||
}
|
||||
else if (gameState == -2) { //initialization screen just before starting
|
||||
requestAnimFrame(animLoop);
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
function exportSaveState() {
|
||||
var state = {};
|
||||
|
||||
if(gameState == 1 || gameState == -1 || gameState == 0) {
|
||||
if(gameState == 1 || gameState == -1 || (gameState == 0 && localStorage.getItem('saveState') !== undefined)) {
|
||||
debugger
|
||||
MainClock.blocks.map(function(block){block.distFromHex /= settings.scale});
|
||||
blocks.map(function(block){block.distFromHex /= settings.scale})
|
||||
state = {
|
||||
clock: MainClock,
|
||||
blocks: blocks,
|
||||
|
|
Loading…
Reference in a new issue