22 lines
606 B
TypeScript
22 lines
606 B
TypeScript
import { pinus } from "pinus";
|
||
import { GVGBattleData } from "../gvg/gvgBattleMemory";
|
||
|
||
// 积分点占领情况,groupId_serverType_cityId -> GVGBattleData
|
||
const gvgBattleMap: Map<string, GVGBattleData> = new Map();
|
||
|
||
export function getGVGBattleData(groupKey: string) {
|
||
if(!gvgBattleMap.has(groupKey)) {
|
||
gvgBattleMap.set(groupKey, new GVGBattleData(groupKey));
|
||
pinus.app.set('gvgBattleMap', gvgBattleMap);
|
||
}
|
||
return gvgBattleMap.get(groupKey);
|
||
}
|
||
|
||
export function getGVGBattleMap() {
|
||
return gvgBattleMap;
|
||
}
|
||
|
||
export function clearBattleMemory() {
|
||
gvgBattleMap.clear();
|
||
}
|