JisolGame/JisolGameCocos/assets/resources/config/ts/TableGRoleAttackEffect.ts
2023-10-30 02:34:11 +08:00

39 lines
1.0 KiB
TypeScript

import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
export class TableGRoleAttackEffect {
static TableName: string = "GRoleAttackEffect";
static getAllConfig(): { [id: string]: TableGRoleAttackEffect } {
return JsonUtil.get(TableGRoleAttackEffect.TableName);
}
static getConfig(id: number | string) {
return TableGRoleAttackEffect.getAllConfig()[id] as TableGRoleAttackEffect;
}
private data: any;
init(id: number) {
var table = JsonUtil.get(TableGRoleAttackEffect.TableName);
this.data = table[id];
this._id = id;
}
/** Id */
private _id: number = 0;
/** Id */
get id(): number {
return this.data.id;
}
/** 效果名称 */
get effectName(): string {
return this.data.effectName;
}
/** spine路径 */
get spine(): string {
return this.data.spine;
}
/** 动画名称 */
get animation(): string {
return this.data.animation;
}
}