refactor: combat system

This commit is contained in:
AncTe committed 2026-10-03 16:04:20 +08:00
1 parent d306d11bce
commit e25ef3fa93
9 files changed
+1319 -167

No files matched your search

@@ -75,6 +75,18 @@ export class TileStore implements ITileStore {
}
}
identity(token: number | string): [number, string] | [] {
if (typeof token === 'number') {
const id = this.numMap.get(token);
if (isNil(id)) return [];
else return [token, id];
} else {
const num = this.idMap.get(token);
if (isNil(num)) return [];
else return [num, token];
}
}
/** 删除一组旧的图块定义及其双向索引 */
private deleteBy(num: number, id: string): void {
this.dataMap.delete(num);