hextris/js/save-state.js
2014-05-25 23:52:35 -04:00

16 lines
247 B
JavaScript

function exportSaveState() {
var state = {};
if(gameState == 1 || gameState == -1) {
state = {
clock: MainClock,
blocks: blocks,
score: score,
wavegen: waveone,
gdx: gdx,
gdy: gdy,
}
}
return JSONfn.stringify(state);
}