mirror of
https://github.com/motajs/template.git
synced 2026-09-18 21:20:20 +08:00
15 lines
382 B
TypeScript
15 lines
382 B
TypeScript
import { IMapRawData, IMapStore } from './types';
|
|
|
|
export class MapStore implements IMapStore {
|
|
/** 地图存储映射 */
|
|
private readonly maps: Map<string, IMapRawData> = new Map();
|
|
|
|
getMap(floorId: string): IMapRawData | null {
|
|
return this.maps.get(floorId) ?? null;
|
|
}
|
|
|
|
addMap(map: IMapRawData): void {
|
|
this.maps.set(map.floorId, map);
|
|
}
|
|
}
|