mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
35 lines
937 B
TypeScript
35 lines
937 B
TypeScript
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
|
|
|
export class TableGRoleAttackBullet {
|
|
static TableName: string = "GRoleAttackBullet";
|
|
|
|
static getAllConfig(): { [id: string]: TableGRoleAttackBullet } {
|
|
return JsonUtil.get(TableGRoleAttackBullet.TableName);
|
|
}
|
|
|
|
static getConfig(id: number | string) {
|
|
return TableGRoleAttackBullet.getAllConfig()[id] as TableGRoleAttackBullet;
|
|
}
|
|
|
|
private data: any;
|
|
|
|
init(id: number) {
|
|
var table = JsonUtil.get(TableGRoleAttackBullet.TableName);
|
|
this.data = table[id];
|
|
this._id = id;
|
|
}
|
|
/** Id */
|
|
private _id: number = 0;
|
|
|
|
/** Id */
|
|
get id(): number {
|
|
return this.data.id;
|
|
}
|
|
/** 子弹名称 */
|
|
get bulletName(): string {
|
|
return this.data.bulletName;
|
|
}
|
|
/** 子弹地址 */
|
|
get bulletSrc(): string {
|
|
return this.data.bulletSrc;
|
|
}
|
|
} |