mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 20:46:14 -04:00
Build 29079805
This commit is contained in:
parent
8e4e67e33b
commit
871a7f9c31
13 changed files with 68 additions and 39 deletions
|
@ -26,7 +26,7 @@ export function setSettingValue<T>(key: string, value: T) {
|
|||
cachedSettings[key] = value;
|
||||
}
|
||||
}
|
||||
setInterval(() => {
|
||||
export function commitSettingsChangesToLocalStorage() {
|
||||
try {
|
||||
for (let key of needsSaving) {
|
||||
localStorage.setItem(key, JSON.stringify(cachedSettings[key]));
|
||||
|
@ -35,7 +35,8 @@ setInterval(() => {
|
|||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
setInterval(commitSettingsChangesToLocalStorage, 500);
|
||||
|
||||
export function getTotalScore() {
|
||||
return getSettingValue("breakout_71_total_score", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue