mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-29 05:24:30 +08:00
fix: 小地图缩放比例 & 存储
This commit is contained in:
1 parent
0fa07e0605
commit
020551bd90
2 files changed
+24
-17
No files matched your search
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user