mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
35
JisolGameCocos/assets/resources/config/ts/TableGRole.ts
Normal file
35
JisolGameCocos/assets/resources/config/ts/TableGRole.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRole {
|
||||
static TableName: string = "GRole";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRole } {
|
||||
return JsonUtil.get(TableGRole.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRole.getAllConfig()[id] as TableGRole;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRole.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 角色名称 */
|
||||
get roleName(): string {
|
||||
return this.data.roleName;
|
||||
}
|
||||
/** Spine地址 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "9038eb60-394b-4c67-a5cc-ebd05040f85c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user