save progress

This commit is contained in:
biglyderv 2025-03-05 20:16:34 -05:00
parent 70a3bfa2bd
commit be6730d109
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
2 changed files with 26 additions and 8 deletions
docs/js

View file

@ -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)