import { ZooId } from "./zooId"; export class ZooMgr { private static _inst: ZooMgr; public static get inst(): ZooMgr { if (this._inst == null) { this._inst = new ZooMgr(); } return this._inst; } zooMap: Map = new Map(); add(zooId: ZooId){ this.zooMap.set(zooId.id, zooId); } remove(zooId: ZooId){ this.zooMap.delete(zooId.id); } get(id: number){ return this.zooMap.get(id); } }