JisolGame/JisolGameCocos/assets/resources/config/ts/TableGRoleSkillSpine.ts

35 lines
918 B
TypeScript
Raw Normal View History

2023-10-30 02:34:11 +08:00
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
export class TableGRoleSkillSpine {
static TableName: string = "GRoleSkillSpine";
static getAllConfig(): { [id: string]: TableGRoleSkillSpine } {
return JsonUtil.get(TableGRoleSkillSpine.TableName);
}
static getConfig(id: number | string) {
return TableGRoleSkillSpine.getAllConfig()[id] as TableGRoleSkillSpine;
}
private data: any;
init(id: number) {
var table = JsonUtil.get(TableGRoleSkillSpine.TableName);
this.data = table[id];
this._id = id;
}
/** 技能SpineId */ private _id: number = 0;
/** 技能SpineId */
get id(): number {
return this.data.id;
}
/** 说明 */
get text(): string {
return this.data.text;
}
/** spine路径 */
get spine(): string {
return this.data.spine;
}
}