fix: 小地图缩放比例 & 存储

This commit is contained in:
AncTe committed 2024-04-21 14:48:44 +08:00
1 parent 0fa07e0605
commit 020551bd90
2 files changed
+24 -17

No files matched your search

+9
View File
@@ -98,6 +98,15 @@ export class GameStorage<T extends object = any> {
static get(key: string) {
return this.list.find(v => v.key === key);
}
/**
* 与Symbol.for类似
*/
static for(key: string) {
const s = this.get(key);
if (s) return s;
else return new GameStorage(key);
}
}
window.addEventListener('beforeunload', () => {