mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
更新无限地图
This commit is contained in:
1
JisolGameCocos/assets/resources/config/game/GMap.json
Normal file
1
JisolGameCocos/assets/resources/config/game/GMap.json
Normal file
@@ -0,0 +1 @@
|
||||
{"60001":{"id":60001,"mapName":"天空城","map1":"map/MAP6/MAP6_1/spriteFrame","map2":"map/MAP6/MAP6_2/spriteFrame","map3":"map/MAP6/MAP6_3/spriteFrame","map1OffsetY":100,"map2OffsetY":400,"map3OffsetY":400}}
|
11
JisolGameCocos/assets/resources/config/game/GMap.json.meta
Normal file
11
JisolGameCocos/assets/resources/config/game/GMap.json.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "d0ea1d51-329d-4f0e-83cf-33182eaa13f0",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
55
JisolGameCocos/assets/resources/config/ts/TableGMap.ts
Normal file
55
JisolGameCocos/assets/resources/config/ts/TableGMap.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
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;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "57cb0026-1494-41ca-948c-346b43746aa7",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user