mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
|
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||
|
|
||
|
export class TableGMap {
|
||
|
static TableName: string = "GMap";
|
||
|
|
||
|
static getAllConfig(): { [id: string]: TableGMap } {
|
||
|
return JsonUtil.get(TableGMap.TableName);
|
||
|
}
|
||
|
|
||
|
static getConfig(id: number | string) {
|
||
|
return TableGMap.getAllConfig()[id] as TableGMap;
|
||
|
}
|
||
|
|
||
|
private data: any;
|
||
|
|
||
|
init(id: number) {
|
||
|
var table = JsonUtil.get(TableGMap.TableName);
|
||
|
this.data = table[id];
|
||
|
this._id = id;
|
||
|
}
|
||
|
/** id */
private _id: number = 0;
|
||
|
|
||
|
/** id */
|
||
|
get id(): number {
|
||
|
return this.data.id;
|
||
|
}
|
||
|
/** 地图名称 */
|
||
|
get mapName(): string {
|
||
|
return this.data.mapName;
|
||
|
}
|
||
|
/** 地图1(前) */
|
||
|
get map1(): string {
|
||
|
return this.data.map1;
|
||
|
}
|
||
|
/** 地图2(后) */
|
||
|
get map2(): string {
|
||
|
return this.data.map2;
|
||
|
}
|
||
|
/** 地图3(天空) */
|
||
|
get map3(): string {
|
||
|
return this.data.map3;
|
||
|
}
|
||
|
/** 地图1(前) 偏移量Y */
|
||
|
get map1OffsetY(): number {
|
||
|
return this.data.map1OffsetY;
|
||
|
}
|
||
|
/** 地图2(后) 偏移量Y */
|
||
|
get map2OffsetY(): number {
|
||
|
return this.data.map2OffsetY;
|
||
|
}
|
||
|
/** 地图2(后) 偏移量Y */
|
||
|
get map3OffsetY(): number {
|
||
|
return this.data.map3OffsetY;
|
||
|
}
|
||
|
}
|