43 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-10-26 03:06:44 +08:00
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;
}
2023-10-30 02:34:11 +08:00
/** 角色技能Id列表 */
get roleSkillIds(): number[] {
return this.data.roleSkillIds;
2023-10-27 02:38:08 +08:00
}
/** 角色攻击范围 */
get roleAttackRange(): number {
return this.data.roleAttackRange;
}
2023-10-26 03:06:44 +08:00
}