save progress
This commit is contained in:
parent
70a3bfa2bd
commit
be6730d109
2 changed files with 26 additions and 8 deletions
docs/js
|
@ -1,4 +1,4 @@
|
|||
var nothingness = 1, nGain = 0.003;
|
||||
var nothingness = (window.localStorage.getItem('nothings') || 1) * 1, nGain = 0.003;
|
||||
var getBonus = 0;
|
||||
|
||||
var mx = 0, my = 0;
|
||||
|
@ -71,3 +71,9 @@ document.querySelector('canvas').addEventListener('click', async (e) => {
|
|||
getBonus += 0.01;
|
||||
clicking = false;
|
||||
})
|
||||
|
||||
setInterval(function () {
|
||||
window.localStorage.setItem('nothings', nothingness);
|
||||
window.localStorage.setItem('cubes', cubePos.length);
|
||||
window.localStorage.setItem('upgrades', JSON.stringify(upgrades));
|
||||
}, 1000)
|
Loading…
Add table
Add a link
Reference in a new issue