Well I only wanted to implement saving and got carried away.

I cleaned the code up a bit. Everything auto-saves now (every 10s)
except for achievements. Maybe we should look at them together.
This commit is contained in:
Kevin Dungs
2014-08-04 16:56:53 +02:00
committed by Tadej Novak
parent 014c84239a
commit fa12f3c14e
7 changed files with 347 additions and 230 deletions
+6 -2
View File
@@ -12,6 +12,9 @@ var ObjectStorage = (function() {
},
load: function(key) {
return JSON.parse(_s.getItem(key));
},
clear: function() {
_s.clear();
}
};
} catch (e) {
@@ -19,7 +22,8 @@ var ObjectStorage = (function() {
+ ' If you refresh the page, all progress will be lost');
return {
save: function(key, item) {},
load: function(key) { return null; }
load: function(key) { return null; },
clear: function() {}
};
};
});
})();